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
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????
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
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????