You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Warren Crossing <Wa...@nocode.com.au> on 2001/04/03 06:59:23 UTC

java.net.MalformedURLException: unknown protocol: jndi

tomcat 4.0 beta2 

overview/symptom

A servlet instance invokes a method on an enterprise bean.. the bean is a
CLASS/STATIC field of the servlet  - execution occurs normally 
however when this servlet calls a class that invokes the same field
reference of the servlet class everything fails.
 
detail

1 AbstractPortal.service ( servlet ) does naming lookup for ejb and invokes
Manager.load method [ OK ] 
2 delegates processing to WorkFlow.processEvent 
3 WorkFlow invokes store method on AbstractPortal.Manager ejb reference
[FAILED] 
4 control returns to AbstractPortal
5 AbstractPortal.service ( servlet ) invokes Manager.store method [ OK ] 

both calls can c class access to org.jboss.ejb.plugins.jrmp.server in
www/WEB-INF/lib
step 3 cannot c ${CATALINA_HOME}/common/lib/jndi.jar and causes stack trace
1 

boundary condition 

if i take ${CATALINA_HOME}/common/lib/jndi.jar and place it in
www/WEB-INF/lib i receive stacktrace 2 @ point 1
i know the sequence works in tomcat 4.0 beta1 
launching catalina with -nonaming has no effect

assumption

org.apache.naming is not used in any calls..
the classloader that loaded AbstractPortal also loaded WorkFlow  
the classloader that loaded WorkFlow is used to access
AbstractPortal.Manager

question 

what is different about these calls.. 
1 form 3 from 5 ?? except 1 & 5 occur from the class with the STATIC
reference and is a servlet.. or something.. 
could it be a subtle classloader/classpath issue??

i will move the code around and try to reproduce it in a simple context..

stacktrace 1

java.lang.reflect.UndeclaredThrowableException:
java.net.MalformedURLException: unknown protocol: jndi
        at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC
all.java:245)
        at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
        at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Unknown
Source)
        at
org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(Stateless
SessionProxy.java:188)
        at $Proxy1.store(Unknown Source)
        at
nu.tradeforce.portal.content.WorkFlow.processEvent(WorkFlow.java:74)
        at
nu.tradeforce.portal.control.AbstractPortal.dispatch(AbstractPortal.java:110
)
        at
nu.tradeforce.portal.control.AbstractPortal.service(AbstractPortal.java:174)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

stack trace 2

javax.naming.CommunicationException.  Root exception is
java.rmi.ServerException: RemoteException occurred in server thread; nested
exception is:
        java.rmi.UnmarshalException: error unmarshalling arguments; nested
exception is:
        java.net.MalformedURLException: unknown protocol: jndi
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception
is:
        java.net.MalformedURLException: unknown protocol: jndi
java.net.MalformedURLException: unknown protocol: jndi
        at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC
all.java:245)
        at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
        at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:295)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:279)
        at javax.naming.InitialContext.lookup(InitialContext.java:354)
        at
nu.tradeforce.portal.control.AbstractPortal.lookupManager(AbstractPortal.jav
a:73)
        at
nu.tradeforce.portal.control.AbstractPortal.init(AbstractPortal.java:36)


its completly bugged my out!! any ideas?
-wozza