ClassPath and Axis

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ClassPath and Axis

Mike Haller
Hey,

i hope someone can help me with this:

I'm using Jetty to deploy an Axis Web Service.
context = httpServer.addWebApplication("/myserver","../myserver/");
context.addClassPath("../server.core/bin/");
context.addClassPath("../server.xmldb/bin/");
context.addClassPath("../common.tools.axis/bin/");
context.addClassPath("../common.tools.castor/bin/");
context.addClassPath("../ws.client/bin/");
context.addClassPath("../common.model/bin/");

The current working directory is the root of my Eclipse workspace. The
paths prefixed by "../" are pointing to Java Projects within my Eclipse
workspace. The project "myserver" contains a web application with a
web.xml using Axis Servlet.

All classes are found, except the ones that are in "ws.client/bin/".
Axis tries to load the classes and doesn't find them. The classes are
described in a WSDD file - model classes are found (common.model), but
handlers are not (ws.client)

I have debugged the ClassUtils class, and can see that all other custom
classes are loaded, but I don't know why the this is not working.

This is the exception I get:

AXIS error

Sorry, something seems to have gone wrong... here are the details:

Fault - ; nested exception is:
        org.apache.axis.ConfigurationException:
java.lang.ClassNotFoundException: ws.client.handler.DebugHandler
java.lang.ClassNotFoundException: ws.client.handler.DebugHandler
        at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:193)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:168)
        at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:107)
        at
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getJavaClass(WSDDDeployableItem.java:353)
        at
org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:295)
        at
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
        at
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
        at
org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
        at
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
        at
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
        at
org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:422)
        at
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
        at
org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
        at
org.apache.axis.deployment.wsdd.WSDDDeployment.getService(WSDDDeployment.java:411)
        at
org.apache.axis.configuration.FileProvider.getService(FileProvider.java:243)
        at org.apache.axis.AxisEngine.getService(AxisEngine.java:311)
        at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:295)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
        at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:475)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
        at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:635)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
        at org.mortbay.http.HttpServer.service(HttpServer.java:954)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:814)
        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)
        at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: ClassPath and Axis

Mike Haller
Hey,

some additional notes:

- jetty is started within an Eclipse Java Project, and some of the
exceptions could be solved by adding additional paths to the Launch
Configuration Classpath when starting my custom Java class (which itself
starts jetty).

Where is the difference between setting the classpath of the JVM vs.
adding classpath entries to the WebApplicationContext of jetty?

regards
Mike


Mike Haller schrieb:

> Hey,
>
> i hope someone can help me with this:
>
> I'm using Jetty to deploy an Axis Web Service.
> context = httpServer.addWebApplication("/myserver","../myserver/");
> context.addClassPath("../server.core/bin/");
> context.addClassPath("../server.xmldb/bin/");
> context.addClassPath("../common.tools.axis/bin/");
> context.addClassPath("../common.tools.castor/bin/");
> context.addClassPath("../ws.client/bin/");
> context.addClassPath("../common.model/bin/");
>
> The current working directory is the root of my Eclipse workspace. The
> paths prefixed by "../" are pointing to Java Projects within my Eclipse
> workspace. The project "myserver" contains a web application with a
> web.xml using Axis Servlet.
>
> All classes are found, except the ones that are in "ws.client/bin/".
> Axis tries to load the classes and doesn't find them. The classes are
> described in a WSDD file - model classes are found (common.model), but
> handlers are not (ws.client)
>
> I have debugged the ClassUtils class, and can see that all other custom
> classes are loaded, but I don't know why the this is not working.
>
> This is the exception I get:
>
> AXIS error
>
> Sorry, something seems to have gone wrong... here are the details:
>
> Fault - ; nested exception is:
>     org.apache.axis.ConfigurationException:
> java.lang.ClassNotFoundException: ws.client.handler.DebugHandler
> java.lang.ClassNotFoundException: ws.client.handler.DebugHandler
>     at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>     at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:193)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:168)
>     at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:107)
>     at
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.getJavaClass(WSDDDeployableItem.java:353)
>
>     at
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.makeNewInstance(WSDDDeployableItem.java:295)
>
>     at
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
>
>     at
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
>
>     at
> org.apache.axis.deployment.wsdd.WSDDChain.makeNewInstance(WSDDChain.java:125)
>
>     at
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
>
>     at
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
>
>     at
> org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:422)
>
>     at
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
>
>     at
> org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
>
>     at
> org.apache.axis.deployment.wsdd.WSDDDeployment.getService(WSDDDeployment.java:411)
>
>     at
> org.apache.axis.configuration.FileProvider.getService(FileProvider.java:243)
>
>     at org.apache.axis.AxisEngine.getService(AxisEngine.java:311)
>     at
> org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:295)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
>     at
> org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
>
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
>     at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
>     at
> org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:475)
>
>     at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
>     at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
>     at
> org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:635)
>
>     at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
>     at org.mortbay.http.HttpServer.service(HttpServer.java:954)
>     at org.mortbay.http.HttpConnection.service(HttpConnection.java:814)
>     at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)
>     at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)
>     at
> org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
>     at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
>     at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Jetty-support mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-support



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support