[jboss-user] [JNDI/Naming/Network] - Accessing EJB through HTTPS Invoker

eeldor do-not-reply at jboss.com
Wed Feb 28 06:49:49 EST 2007


Hi,

I'm trying to access ejb3 beans through RMI over HTTP using jboss4 app server.

these are the configurations I did: 
1) I've configured my jndi.properties with the following:

java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory
java.naming.provider.url=http://localhost:1099/invoker/JNDIFactory

2) configured the deploy/http-invoker.sar/META-INF/jboss-service.xml and http-invoker.war/WEB-INF/web.xml as written in the jboss tutorial.

BUT, in the client's main, when reaching the 
context = new InitialContext();

I get the following exception:

javax.naming.NamingException: Failed to retrieve Naming interface [Root exception is java.lang.ClassCastException: java.rmi.MarshalledObject]
	at org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamingContextFactory.java:84)
	at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
	at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
	at javax.naming.InitialContext.init(Unknown Source)
	at javax.naming.InitialContext.(Unknown Source)
	at test.lib.Ejb3Client.createContext(Ejb3Client.java:178)
	at test.lib.Ejb3Client.main(Ejb3Client.java:199)
Caused by: java.lang.ClassCastException: java.rmi.MarshalledObject
	at org.jboss.naming.HttpNamingContextFactory.getNamingServer(HttpNamingContextFactory.java:135)
	at org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamingContextFactory.java:80)
	... 6 more
Exception in thread "main" java.lang.RuntimeException: javax.naming.NamingException: Failed to retrieve Naming interface [Root exception is java.lang.ClassCastException: java.rmi.MarshalledObject]
	at test.lib.Ejb3Client.createContext(Ejb3Client.java:187)
	at test.lib.Ejb3Client.main(Ejb3Client.java:199)
Caused by: javax.naming.NamingException: Failed to retrieve Naming interface [Root exception is java.lang.ClassCastException: java.rmi.MarshalledObject]
	at org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamingContextFactory.java:84)
	at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
	at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
	at javax.naming.InitialContext.init(Unknown Source)
	at javax.naming.InitialContext.(Unknown Source)
	at test.lib.Ejb3Client.createContext(Ejb3Client.java:178)
	... 1 more
Caused by: java.lang.ClassCastException: java.rmi.MarshalledObject
	at org.jboss.naming.HttpNamingContextFactory.getNamingServer(HttpNamingContextFactory.java:135)
	at org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamingContextFactory.java:80)
	... 6 more


does anyone has a clue about the problem?

regards,
Elad

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4023588#4023588

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4023588



More information about the jboss-user mailing list