users@jax-rpc.java.net

Re: FW: WS on tomcat 3.2.4: work? [SOLVED]

From: ps <pedro-b-salazar_at_PTINOVACAO.PT>
Date: Tue, 04 Feb 2003 17:50:59 +0000

I solved my problem!

The approach of bknoth (see
http://forum.java.sun.com/thread.jsp?forum=331&thread=299545) works fine
with my case. My _problem_ was about the classloader to use!

The piece of code from JAXRPCContextListener source where it retrieves
the classloader fails on tomcat 3.2.4 when the classLoader returned by
"Thread.currentThread().getContextClassLoader();" cannot find the WS
classes (ties) on my war package! If I force to second choice (the
classloader from the current class -> no outside if), it works fine!

"
classLoader = (URLClassLoader)
Thread.currentThread().getContextClassLoader(); // <- not work!
if (classLoader == null) {
 classLoader = (URLClassLoader) getClass().getClassLoader(); // <- work!
}
"

Now, I don't know yet if this classloader problem is also the same on
the JAXRPCServlet class (without my proxy class), or if is really the
issue referred by bknoth which is also reflected on tomcat 3.2.x.
To answer this question I must debug the jaxrpc package, but I don't
have the time for now.

thanks,
Pedro Salazar.

On Tue, 2003-02-04 at 14:52, ps wrote:
> Ton,
>
> with tomcat 4.x, I have no problem on deploy my web service. I'm getting
> problems with tomcat 3.2.4, and I already have a hint about the possible
> cause in these url:
>
> http://forum.java.sun.com/thread.jsp?forum=331&thread=299545
>
> I follow the advice on the url from bknoth, but I'm having now another
> exception - but I confirm that this approach tries to run (parse) before
> the init() method.
>
> My _new_ exception is below and I don't know why is happening since I
> have the referred class in WEB-INF/classes/:
>
> -- BEGIN EXCEPTION --
> - ProxyJAXRPCServlet initializing <-- WARNING MESSAGES FROM MY PROXY
> - ProxyJAXRPCServlet parsing exception <--
> class not found: PT.psalazar.test.service.Test
> at
> com.sun.xml.rpc.server.http.JAXRPCRuntimeInfoParser.loadClass(JAXRPCR
> untimeInfoParser.java:152)
> at
> com.sun.xml.rpc.server.http.JAXRPCRuntimeInfoParser.parseEndpoints(JA
> XRPCRuntimeInfoParser.java:55)
> at
> com.sun.xml.rpc.server.http.JAXRPCRuntimeInfoParser.parse(JAXRPCRunti
> meInfoParser.java:31)
> at PT.ptinovacao.jaxrpc.ProxyJAXRPCServlet.init(Unknown Source)
> at
> org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
> at org.apache.tomcat.core.Handler.init(Handler.java:215)
> at
> org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
> at
> org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOn
> StartupInterceptor.java:130)
> at
> org.apache.tomcat.core.ContextManager.initContext(ContextManager.java
> :491)
> at
> org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
> at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
> at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:240)
> - JAX-RPC servlet initializing
> - missing context information
> -- END EXCEPTION --
>
> Any hint?
>
> thanks,
> Pedro Salazar.
>
> On Tue, 2003-02-04 at 14:32, Harkink, Ton wrote:
> > Pedro,
> > I made a mistake in the Tomcat version. It is 4.1
> >
> > I developed my Webservice in the JWSDP. That has a built-in Tomcat.
> > When I was finished, I put the war file in the regular Tomcat 4.1
> > I put the jaxrpc jars in common/lib and the jaxm and registry war files
> > in webbapps.
> > I expected that I had to change server.xml but that was not necessary.
> >
> > What error do you get?
> >
> > Ton
>
> --
> <ps>
> pedro-b-salazar_at_ptinovacao.pt
> key id: 0E129E31D803BC61
--
<ps>
pedro-b-salazar_at_ptinovacao.pt
key id: 0E129E31D803BC61