• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with classes from included jar libraries

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I need some help on developing Web service application. I'm using axis 2 to develop Web service. I have axis.war on glassfish 3 server. I have created a web server application in Netbeans and I have deployed it on server using axis plugin. My application is dependent on some jar libraries. I added it to the compile libraries list in NetBeansTenb, but they are not available to the web service. I checked, and all jars are there. AAR file is in /WEB-INF/services, and jar files are inside of the AAR in lib directory.

When I'm using SoapUI NetBeans plugin to test it, I got errors indicating that class from library is not available.
This is the error I got when I'm trying to access web service through the browser window:

INFO: [ERROR] The endpoint reference (EPR) for the Operation not found is /axis2/services/UserManagementWS?wsdl/setCurrentUser?username=ddd and the WSA Action = null

and this is error I got when I try to test service using soapUI plugin for NetBeans:

INFO: [ERROR] Exception occurred while trying to invoke service method setCurrentUser
java.lang.ExceptionInInitializerError
at com.corridor.services.user.UserManagementWS.setCurrentUser(UserManagementWS.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194)
at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:63)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:167)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:142)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:431)
at org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:462)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
at com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
at com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570)
at com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
at com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
at com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)
Caused by: org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException
at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:204)
at org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANodeFromClassLoader(NodeFactoryImpl.java:37)
at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:178)
at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:100)
at org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:182)
at org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:63)
at com.corridor.app.ServiceLocator.<init>(ServiceLocator.java:40)
at com.corridor.app.ServiceLocator.<clinit>(ServiceLocator.java:27)
... 46 more
Caused by: java.lang.NullPointerException
at org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.start(RuntimeBootStrapper.java:116)
at org.apache.tuscany.sca.node.impl.NodeImpl.initRuntime(NodeImpl.java:473)
at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:197)
... 53 more
INFO: [ERROR] org.apache.axis2.AxisFault


How can I make these jars visible for my web service?

Thanks
Zoran
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

zoran jeremic wrote:


I can tell from the stacktrace that you are not developing a typical web service, but a SCA application using Apache Tuscany.
Getting the Apache Tuscany dependencies right is not a trivial task - I would recommend using Maven and working from one of their samples, using the pom file from the sample that is closest to what you are trying to accomplish.
Best wishes!
 
zoran jeremic
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ivan Krizsan wrote:

I can tell from the stacktrace that you are not developing a typical web service, but a SCA application using Apache Tuscany.
Getting the Apache Tuscany dependencies right is not a trivial task - I would recommend using Maven and working from one of their samples, using the pom file from the sample that is closest to what you are trying to accomplish.
Best wishes!



This is Tuscany SCA application that I'm trying to wrap within typical web service (I'm using Axis2). The main reason for this is it has to be used by PHP application and I didn't found a stable support in PHP for SCA services.
However, I think that this is not a problem with Tuscany libraries, but with how eclipse plugin for Axis2 pack these libraries. Probably it is missing some manifest information for these jars. If I manually copy these libraries somewhere on the classpath, it works fine.

Zoran
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
Just curious: Why do you use Axis to create a web service when you can have Tuscany do that for you?
Tuscany will, as far as I know, even use Axis when exposing web services.
Best wishes!
 
zoran jeremic
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ivan Krizsan wrote:Hi!
Just curious: Why do you use Axis to create a web service when you can have Tuscany do that for you?
Tuscany will, as far as I know, even use Axis when exposing web services.
Best wishes!



That was my primary idea. However, I found a lot of difficulties to configure Tuscany to expose a web service to the external web application, so I tried in this way that seems like easier solution at the moment. Now I'm back to the Tuscany. I solved the problem by migrating from 1.6 to 2.0 version, and it works now.

Thanks.
 
reply
    Bookmark Topic Watch Topic
  • New Topic