TOMCAT 5 + EJB

G

GoostleeK

Hi.

I have an EJB cart running on JBOSS container. I have also JSP application
under Tomcat wchich uses this EJB component. The problem is when I'm trying
to get an instance of my remote object I get this exception:

javax.naming.CommunicationException [Root exception is
java.lang.ClassNotFoundException: ProductsCartHome (no security manager: RMI
class loader disabled)] at org.jnp.interfaces.NamingContext.lookup

the code is:

Hashtable env = new Hashtable();
env.put("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
env.put("java.naming.factory.url.pkgs",
"org.jboss.naming:eek:rg.jnp.interfaces");
env.put("java.naming.provider.url", "localhost:1099");
try {
out = response.getWriter();
InitialContext ctx = new InitialContext(env);
Object ref = ctx.lookup("ProductsCart"); //exception is thrown here
ProductsCartHome productsCartHome = (ProductsCartHome)
PortableRemoteObject.narrow(ref,
ProductsCartHome.class);
MyCart = productsCartHome.create();
}
catch (Exception e) {
e.printStackTrace(out);
}

But I think the code is ok., because when I put it in standalone client
application it works fine. The problem begins when I put it into JSP...

Any suggestions, what's the reason????
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top