Hi, You may want to try to remove all duplicate references to this capability from the CLASSPATH, and only have one in the jar included in your War. If I remember correctly, I had a problem before where if you have more than one of the same capability class in the classpath, Muse throws an error saying it is unable to find the class. Perhaps because it doesn't know which to load?
Also, when you unpack your War, you should have this: \WEB-INF\lib\http_management.jar And in your jar, it should look like this, including the full directory structure: \com\example\www\http_server\MyCapability.class -----Original Message----- From: MUSEME [mailto:[EMAIL PROTECTED] Sent: Monday, June 18, 2007 2:55 PM To: [email protected] Subject: Re: JavaClassNotFound for MyCapability class in Tomcat 6.0 and java.lang.NullPointerException Here's my muse.xml listing located in Tomcat 6.0\webapps\http-management\WEB-INF\classes My capability class for the http resource is defined below (in the muse.xml) as com.example.www.http_server.MyCapability In MyCapability.java I have the foll. package defined: // // MyCapability.java // Sun May 27 03:52:40 EDT 2007 // // package com.example.www.http_server; I can invoke MyCapability from DOS by entering Java com.example.www.http_server.MyCapability and it will find it in my CLASSPATH, where I have the jar specified. I compiled my Java code using JDK 1.6, could that be an issue with Tomccat 6.0 ? I don't beleive so as the doc suggests that Tomcat 6.0 supports JDK 1.5 and JDK 1.6. Thanks again. muse.xml ******* <resource-type use-router-persistence="true"> <context-path>http-server</context-path> <wsdl> <wsdl-file>/wsdl/http-server.wsdl</wsdl-file> <wsdl-port-type xmlns:pfx="http://www.example.com/http-server">pfx:HttpServerPortType</w sdl-port-type> </wsdl> <java-id-factory-class>org.apache.muse.core.routing.CounterResourceIdFac tory</java-id-factory-class> <java-resource-class>org.apache.muse.ws.resource.impl.SimpleWsResource</ java-resource-class> <desc:capability xmlns:desc="http://ws.apache.org/muse/descriptor"> <desc:capability-uri>http://www.example.com/http-server</desc:capability -uri> <desc:java-capability-class>com.example.www.http_server.MyCapability</de sc:java-capability-class> <init-param> <param-name>httpd-install-dir</param-name> <param-value>C:\Program Files\Apache Software Foundation\Apache2.2</param-value> </init-param> </desc:capability> <desc:capability xmlns:desc="http://ws.apache.org/muse/descriptor"> <desc:capability-uri>http://docs.oasis-open.org/wsdm/muws/capabilities/O perationalStatus</desc:capability-uri> <desc:java-capability-class>org.apache.muse.ws.dm.muws.impl.SimpleOperat ionalStatus</desc:java-capability-class> </desc:capability> <desc:capability xmlns:desc="http://ws.apache.org/muse/descriptor"> <desc:capability-uri>http://docs.oasis-open.org/wsdm/muws/capabilities/D escription</desc:capability-uri> <desc:java-capability-class>org.apache.muse.ws.dm.muws.impl.SimpleDescri ption</desc:java-capability-class> </desc:capability> <desc:capability xmlns:desc="http://ws.apache.org/muse/descriptor"> <desc:capability-uri>http://docs.oasis-open.org/wsdm/muws/capabilities/I dentity</desc:capability-uri> <desc:java-capability-class>org.apache.muse.ws.dm.muws.impl.SimpleIdenti ty</desc:java-capability-class> </desc:capability> <desc:capability xmlns:desc="http://ws.apache.org/muse/descriptor"> <desc:capability-uri>http://docs.oasis-open.org/wsdm/muws/capabilities/M anageabilityCharacteristics</desc:capability-uri> <desc:java-capability-class>org.apache.muse.ws.dm.muws.impl.SimpleManage abilityCharacteristics</desc:java-capability-class> </desc:capability> <desc:capability xmlns:desc="http://ws.apache.org/muse/descriptor"> <desc:capability-uri>http://schemas.xmlsoap.org/ws/2004/09/mex</desc:cap ability-uri> <desc:java-capability-class>org.apache.muse.ws.metadata.impl.SimpleMetad ataExchange</desc:java-capability-class> </desc:capability> <desc:capability xmlns:desc="http://ws.apache.org/muse/descriptor"> <desc:capability-uri>http://docs.oasis-open.org/wsrf/rpw-2/Get</desc:cap ability-uri> <desc:java-capability-class>org.apache.muse.ws.resource.properties.get.i mpl.SimpleGetCapability</desc:java-capability-class> </desc:capability> </resource-type> Daniel Jemiolo wrote: > > > > > > > are you sure that the class name in muse.xml and the package/directory > structure match? > > Dan > > > > MUSEME <[EMAIL PROTECTED]> wrote on 06/18/2007 02:14:42 PM: > >> >> I've specified the jar file for the MyCapability class just about > everywhere >> including the system CLASSPATH. It's already deployed in Tomcat. >> The > JVM >> can find it when I invoke it from DOS by searching the CLASSPATH > variable, >> but somehow Tomcat 6 cant. I would appreciate any help. >> >> MUSEME wrote: >> > >> > I run my test client to start httpd, but Tomcat 6.0 indicates that >> > it cannot find the Capability class with the following error >> > message displayed at the Tomcat DOS console >> > >> > java.lang.RuntimeException: [ID = 'JavaClassNotFound'] The Java >> > class specified was not found: >> > com.example.www.http_server.MyCapability. Make sure the correct class or .jar file is in the classpath. >> > >> > I'm not sure why I am getting this error. >> > My CLASSPATH contains the http_management.jar (which contains the >> > MyCapability class) and the >> > $TOMCAT_HOME\webapps\http-management\WEB-INF\lib also contains hte >> > http_management.jar file. >> > >> > The SOAP trace also showed the following: >> > >> > run: >> > [java] >> > [java] *** >> > [java] * HttpServerTest: Testing httpd WSDM Interface >> > [java] *** >> > [java] Calling Proxy >> > [java] --- Starting Apache (httpd) Server >> > [java] [CLIENT TRACE] SOAP envelope contents (outgoing): >> > [java] >> > [java] <soap:Envelope >> > xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> >> > >> > [java] <soap:Header> >> > [java] <wsa:To >> > xmlns:wsa="http://www.w3.org/2005/08/addressing">htt >> > p://localhost:8080/http-management/services/http-server</wsa:To> >> > [java] <wsa:Action >> > xmlns:wsa="http://www.w3.org/2005/08/addressing" >> >>http://www.example.com/http-server/Start</wsa:Action> >> > [java] <wsa:MessageID >> > xmlns:wsa="http://www.w3.org/2005/08/addressi >> > ng">uuid:0e5ca02b-90f0-ef45-480b-b17b9f113167</wsa:MessageID> >> > [java] <wsa:From >> > xmlns:wsa="http://www.w3.org/2005/08/addressing"> >> > [java] >> > <wsa:Address>http://www.w3.org/2005/08/addressing/role/a >> > nonymous</wsa:Address> >> > [java] </wsa:From> >> > [java] </soap:Header> >> > [java] <soap:Body> >> > [java] <pfx0:Start >> > xmlns:pfx0="http://www.example.com/http-server"/ >> >> >> > [java] </soap:Body> >> > [java] </soap:Envelope> >> > [java] >> > [java] [CLIENT TRACE] SOAP envelope contents (incoming): >> > [java] >> > [java] <soapenv:Envelope >> > [java] xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" >> > xmlns:ws >> > a="http://www.w3.org/2005/08/addressing"> >> > [java] <soapenv:Header> >> > [java] >> > <wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa: >> > To> >> > [java] <wsa:ReplyTo> >> > [java] >> > <wsa:Address>http://www.w3.org/2005/08/addressing/none</ >> > wsa:Address> >> > [java] </wsa:ReplyTo> >> > [java] >> > <wsa:MessageID>urn:uuid:EEB3EECBEE143B582211821867711863</ws >> > a:MessageID> >> > [java] >> > <wsa:Action>http://www.w3.org/2005/08/addressing/soap/fault< >> > /wsa:Action> >> > [java] <wsa:RelatesTo >> > wsa:RelationshipType="http://www.w3.org/2005/ >> > 08/addressing/reply">uuid:0e5ca02b-90f0-ef45-480b- >> b17b9f113167</wsa:RelatesTo> >> > [java] </soapenv:Header> >> > [java] <soapenv:Body> >> > [java] <soapenv:Fault> >> > [java] <soapenv:Code> >> > [java] > <soapenv:Value>soapenv:Sender</soapenv:Value> >> > [java] </soapenv:Code> >> > [java] <soapenv:Reason> >> > [java] <soapenv:Text xml:lang="en-US">null; nested >> > exceptio >> > n is: >> > [java] java.lang.NullPointerException</soapenv:Text> >> > [java] </soapenv:Reason> >> > [java] <soapenv:Detail/> >> > [java] </soapenv:Fault> >> > [java] </soapenv:Body> >> > [java] </soapenv:Envelope> >> > [java] >> > [java] org.apache.muse.ws.addressing.soap.SoapFault: null; >> > nested exception >> > is: >> > [java] java.lang.NullPointerException >> > [java] at >> > org.apache.muse.core.AbstractResourceClient.invoke(AbstractRe >> > sourceClient.java:298) >> > [java] at >> > org.apache.muse.core.AbstractResourceClient.invoke(AbstractRe >> > sourceClient.java:232) >> > [java] at >> > org.apache.muse.core.AbstractResourceClient.invoke(AbstractRe >> > sourceClient.java:211) >> > [java] at >> > com.example.www.http_server.testclient.http_serverProxy.start >> > (Unknown Source) >> > [java] at >> > com.example.www.http_server.testclient.HttpServerTest.main(Un >> > known Source) >> > >> >> -- >> View this message in context: http://www.nabble. >> com/JavaClassNotFound-for-MyCapability-class-in-Tomcat-6.0-and-java. >> lang.NullPointerException-tf3937693.html#a11181116 >> Sent from the Muse User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > -- View this message in context: http://www.nabble.com/JavaClassNotFound-for-MyCapability-class-in-Tomcat -6.0-and-java.lang.NullPointerException-tf3937693.html#a11184870 Sent from the Muse User mailing list archive at Nabble.com. --------------------------------------------------------------------- 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]
