I can't seem to be able to get hold of a EJB's home interface using the following simple code. This code works when the Web Application runs under IBM's Websphere and as a standalone app, but not when the application is transfered to Tomcat.
The code is:
// Initial context already found Okay
// Simple look up
Object objref = ctx.lookup("StockHoldings");
StockHoldingsHome home = (StockHoldingsHome) javax.rmi.PortableRemoteObject.narrow (objref,StockHoldingsHome.class);
// Get hold of the remote interface
m_StockHoldings = home.create(); // This fails
The error message is:
RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.net.MalformedURLException: no protocol: Files/Apache
This error occurs even when running sample EJB from Text books.
Both the JBOSS and Apache Tomcat installation have not been changed - they're installed as default straight out of the box.
Thanks in advance.
Application Server JBOSS 3.0.4 Web Server Jakarta Tomcat 4.1.12
Sounds like you need to include some of the jboss/client jar files in Catalina's classpath. jnp-client.jar and jboss-client.jar for sure - there may be others.
Catalina_home/common/classes/lib should work. I think server/lib will also work.
I always fumble through this error myself. Not very scientific I know :-)