Harry Sunarsa

Greenhorn
+ Follow
since Feb 15, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Harry Sunarsa

hi guys,

please advice,
I have a socket server for streaming twitter event - I use twitter4j and I want to make a webservice that act as client to that server, so could listen to every event occurs..

currently my system is working with only client-server socket connection. but i want to put it as webservice. Do you guys know and have the idea of what technology i must use? I have try to put my socket client program directly as webservice (axis 2) but doesnt work some guys told me to make it in a multithreading, but i dont know exactly the concept

thanks in advance

10 years ago
please help
currently I'm building a system that allowing the restful (jersey 1.12) to be invoked by some webservices (Axis2)
the scenario is like this:

client --> webservice (Axis2) --> restful services (Jersey 1.12) ... run in the tomcat Apache 7
there's some problem occurs whenever I try to invoke the jersey. says that

java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl

here the complete error in apache,

[ERROR] java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.jav
a:212)
at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic
(RPCMessageReceiver.java:117)
at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusines
sLogic(AbstractInOutMessageReceiver.java:40)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMe
ssageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReq
uest(HTTPTransportUtils.java:172)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:1
46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp
11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
AbstractProtocol.java:579)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoin
t.java:307)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.sun
.ws.rs.ext.RuntimeDelegateImpl
at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:112)

at javax.ws.rs.core.UriBuilder.newInstance(UriBuilder.java:69)
at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:80)
at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:99)
at wsPackage.TweetClass.getBaseURI(TweetClass.java:46)
at wsPackage.TweetClass.tweet(TweetClass.java:39)
... 29 more
Caused by: java.lang.ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateIm
pl
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1701)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1546)
at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:44)
at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:141)
at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:95)
... 34 more

I guess it's caused by missing some jars either in apache lib or in my axisservice lib
actually i put all the jersey jars into the axisservice lib,,, I have test the axis2 --> restful with the webservice test explorer in eclipse, it works just fine
but whenever i try it from a client (as i showed in the scenario above) it doesnt work.

Please advice, thanks in advance
10 years ago
ah come on, i ve told you many times,i will make a web service to invoke the restlet, in my previous reply i gave the architecture
10 years ago
yes, ihad already the restful servics, using jersey

if i put it in the normal class (just a common client for restfull service) it works fine
means that, i just make a class to consume the service, just a client
10 years ago
so, the scenario is like this

client --> webservices (Jaxws) --> restful (jersey)

i want to invoke the restful services by a webservice, because I'm creating a system workflow..about web-of-things

regards,
10 years ago
The problem is appears only when I import the jersey library into my code



if i put it in the normal class (just a common client for restfull service) it works fine.
is it because the jsr used in jsxws is jsr109? and how to switch it into jsr311 (the one that used in jersey)
10 years ago
I did that to...
i just realized that when i execute wsgen (from JSXws 2.2.5 ), it generate jsr109 webservice porject on eclipse project tree,,, what does it mean?
because in the jersey it use jsr311-api

is there any particular configuration on the classpath or path? please give me more detail advice

thanks a bunch
10 years ago
Hi guys,

I have problem in generating wsdl file using wsgen (JAX web service)

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jersey/api/cl
ient/config/ClientConfig
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
at java.lang.Class.privateGetPublicMethods(Class.java:2562)
at java.lang.Class.getMethods(Class.java:1427)
at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:
358)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.
java:246)
at com.sun.tools.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:247)
at com.sun.tools.ws.wscompile.WsgenTool.run(WsgenTool.java:126)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.sun.tools.ws.Invoker.invoke(Invoker.java:135)
at com.sun.tools.ws.WsGen.main(WsGen.java:57)
Caused by: java.lang.ClassNotFoundException: com.sun.jersey.api.client.config.Cl
ientConfig
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 14 more

currently am creating a webservice (JAX), that can invoke a restfull webservice (JERSEY)
here's my code:
C:\Users\HSunarsa\Documents\Kuliah\Thesis\ProgramSource\TwitterJAX>wsgen -classpath build/classes/ -wsdl -r WebContent/WEB-INF/wsdl -s src -d build/classes/ twitterJAX.Package.ClassServices


I have tried that code as a common client to invoke the restfull service and it works fine.
I put all the jersey jars file on the web-inf lib, but still when i try to use wsgen tool, always return error

Please help...
Thanks in advance
10 years ago
hi guys,

please help, I'm creating an application for sending an email that use gmail account as sender. but always return the exception, as shown below:

and here it is my program that i got from some forum
----

I have tried to use both port 465 & 587 but still always return error...

thanks in advance,
10 years ago