views:

58

answers:

1

My Project has 2 java files (A.java and B.java in same package). A.java uses methods in B.java. And, an external jar has been added in the project build path. In order to create a web service (bottom up) from the class, I created a new Dynamic Web Project in Eclipse with axis2 as the runtime platform, and imported A.java and B.java source files. Next, since all my methods that need to be exposed are contained in A.java, I right click on it and created web service using the standard settings. When I deploy the web service on my apache, I get "Fault Service" and a few ClassNotFound Exceptions for some of the classes in my external jar file (I have already imported it as an external jar).

Does the external jar needs to be imported in another way?

+1  A: 

I would expect a deployable application to be self contained, hence the "external" jars need to be included in my application. In my environment (WebSphere) you can also deploy external jars in some "shared" places and special directories, but for simple cases I prefer my app to be be self contained.

So, either include the JARs in WEB-INF/lib or package the app in an EAR file, place the JARs in teh root of the EAR and adjust the Manifest for your WAR to refer to those JARs.

djna