which class produces the CNFE? M- ----- Original Message ----- Wrom: LHPQQWOYIYZUNNYCGPKYLEJGDGVCJVTLBXFGGMEPYOQKE To: <axis-user@ws.apache.org> Sent: Friday, December 07, 2007 7:33 AM Subject: java.lang.NoClassDefFoundError exception. Service impl class not picking up external jars in /lib.
Hi everyone, I'm attempting to deploy a Web Service from a simple Java class by creating a service archive and deploying it to WSAS (Web Services Application Server). However, I'm having trouble invoking this service. The structure of my service is given below (which I then deployed as an .aar file): - Grouper.aar - META-INF - services.xml - lib - *.jar - conf - sources.xml - test - GrouperWS.class However, GrouperWS.class is not seeing the lib/*.jar in its classpath. I get java.lang.NoClassDefFoundError exceptions when I invoke GrouperWS. I've followed the advice given previously in this mailing list but to no avail. I would really appreciate any insight or help in this matters. My services.xml and GrouperWS.java is provided below for added clarity. Cheers. Regards Sanjay package test; import java.io.InputStream; import org.apache.axis2.AxisFault; import org.apache.axis2.context.MessageContext; import org.apache.axis2.description.AxisService; import edu.internet2.middleware.grouper.SubjectFinder; import edu.internet2.middleware.subject.Subject; import edu.internet2.middleware.subject.SubjectNotFoundException; import edu.internet2.middleware.subject.SubjectNotUniqueException; public class GrouperWS { private final static String GROUPER_PROPERTIES = "conf/sources.xml"; public String loadResource() throws AxisFault, SubjectNotFoundException, SubjectNotUniqueException{ MessageContext context = MessageContext.getCurrentMessageContext(); AxisService service = context.getAxisService(); ClassLoader loader = service.getClassLoader(); InputStream in = loader.getResourceAsStream(GROUPER_PROPERTIES); if (in != null) { String subjectId = "[EMAIL PROTECTED]"; Subject subject = SubjectFinder.findById(subjectId); String user = subject.getId(); return user; } else { return "An error as occured"; } } } //end of GrouperWS <service name="Grouper" scope="application"> <description> This is the Grouper Service </description> <parameter name="ServiceTCCL">composite</parameter> <messageReceivers> <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/> <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/> </messageReceivers> <parameter name="ServiceClass"> test.GrouperWS </parameter> </service> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]