wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes Migration of JBoss 4.0.2 to JBoss 6.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Migration of JBoss 4.0.2 to JBoss 6.0" Watch "Migration of JBoss 4.0.2 to JBoss 6.0" New topic
Author

Migration of JBoss 4.0.2 to JBoss 6.0

prasad phatak
Greenhorn

Joined: Sep 18, 2011
Posts: 5
Hi, I am trying to migrate from Jboss 4.0.2 to JBoss 6.0, and eclipse in throwing this error
please help me with a suggestion at the earliest.

javax.naming.NamingException: Could not dereference object [Root exception is java.lang.ClassNotFoundException: org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy]
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1135)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:690)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.etp.dim.jms.Connection_Datasource.get_datasource(Connection_Datasource.java:67)
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

prasad, welcome to Java Ranch!

We need more details. When did this exception get thrown? When you started the app server or while you were running your app? And what kind of app? A standalone client, or an app deployed to the app server?

If the error occurred while running your app, please post the relevant code, highlighting the relevant line causing the exception.

If you are running a standalone app, what JARs did you include in the classpath? (The missing class is in client/jboss-client.jar)


JBoss In Action
prasad phatak
Greenhorn

Joined: Sep 18, 2011
Posts: 5
Hi Peter,Thanks for replying my Query

This error occurs when start my App,this app is deployed to the server. I think the problem is with jndi lookup. Because when I try to debug the code it is not able to create Context Object even after passing proper arguments.

also help me in find the correct jar for org.jboss.jmx.adaptor.rmi.RMIAdaptor, This class is present in Jboss 4.0.2 jar(jboss-jmx.jar) but I am not able to find relevant jar in JBoss 6.0,I have also checked with client/jboss-jmx.jar, but could not find it.
Please help me with these queries.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

Yes, the problem is with the JNDI lookup. Are you sure it is with a deployed app? If so, then there was a lot more to the stack trace. Could you post the full stack trace and the dozen or so log entries before and after the stack trace? I'm note sure if your source would help, but post it anyway (at least the Connection_Datasource.get_datasource() method, and highlight line 67).

The org.jboss.jmx.adaptor.rmi.RMIAdaptor class is in client/jmx-invoker-adaptor-client.jar and common/lib/jmx-adaptor-plugin.jar. Don't you have a tool that helps lookup classes in JARs? JBoss Tattletale can help with that (though it is a little overkill for this task).
prasad phatak
Greenhorn

Joined: Sep 18, 2011
Posts: 5
Hi Peter,
Now the application starts successfully on Jboss 6.0, but get errors related to java.rmi.UnmarshalException . I am posting the printStack below, please help me with this

javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: org.hornetq.jms.referenceable.SerializableObjectRefAddr (no security manager: RMI class loader disabled)]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:707)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.etp.dim.jms.JMSManager.jndiLookup(JMSManager.java:1371)
at com.etp.dim.jms.JMSManager.getQueueConnectionFactory(JMSManager.java:1347)
at com.etp.dim.jms.JMSManager.connectToJMS(JMSManager.java:517)
at com.etp.dim.jms.JMSManager.<init>(JMSManager.java:72)
at com.etp.dim.process.SenderReceiver.run(SenderReceiver.java:96)
Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: org.hornetq.jms.referenceable.SerializableObjectRefAddr (no security manager: RMI class loader disabled)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
... 7 more
Caused by: java.lang.ClassNotFoundException: org.hornetq.jms.referenceable.SerializableObjectRefAddr (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readArray(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at sun.rmi.server.UnicastRef.unmarshalValue(Unknown Source)
... 10 more
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

This looks like the stack trace from a client app. Did you include the client\hornetq-jms-client.jar in the classpath? That JAR contains the missing class.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Migration of JBoss 4.0.2 to JBoss 6.0
 
Similar Threads
JNDI question in JBoss environment
java.net.ConnectException when connecting when lookup EJB
Cannot deploy
EJB 3 Eclipse Jboss issues
Error with EJB Lookup from jsp for jboss/eclipse