I have JBoss 3 running on a Win2K server and Tomcat 5 running on another Win2K server.
I have a test application which works fine. However trying to access the EJB from a tomcat page I get an error.
The tomcat error message:
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: no protocol: 5.0/shared/classes/]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:647)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at org.apache.jsp.SessionBeanTest_jsp._jspService(SessionBeanTest_jsp.java:59)
The error happens at the lookup in the JSP, code is:
Properties JNDIProperties = new Properties() ;
JNDIProperties.setProperty( Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory" ) ;
JNDIProperties.setProperty( Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" ) ;
JNDIProperties.setProperty( Context.PROVIDER_URL, "jnp://192.168.1.107:1099" ) ;
Context context = new InitialContext( JNDIProperties );
Object ref = context.lookup("HelloWorld");
Any pointers much appreciated.