[jboss-user] [JNDI/Naming/Network] - Connecting to legacy JBoss 3.0.3

whafrog do-not-reply at jboss.com
Wed Apr 23 15:51:45 EDT 2008


I've converted a web-app from running on Weblogic/EJB2 to Jboss 4.2.0/EJB3.  The app needs to connect to a message queue hosted by a legacy app running on JBoss (3.0.3).  The old Weblogic version used the jbossall-client.jar from 3.0.3, however, the new version shouldn't need that, correct?

However, when I try to connect to the 3.0.3 legacy server from JBoss 4.2.0, I get the following error:

javax.naming.CommunicationException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
  | java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
  | java.lang.ClassNotFoundException: org.jnp.interfaces.FastNamingProperties (no security manager: RMI class loader disabled)

If I include the jbossall-client.jar from 4.2.0 in the web app, I get the following error:

13:48:30,562 ERROR Exception sending context initialized event to listener instance of class
  | org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
  | java.lang.IncompatibleClassChangeError

I found this jira issue:  http://jira.jboss.org/jira/browse/JBAS-5048

...which suggests that the process is attempting to serialize the FastNamingProperties class to the remote client (which does not exist in JBoss 3.0.3).  The suggested workaround is to break the lookup into two.  However, I'm not sure how to work around it in my case:

Hashtable p = new Hashtable();
  | p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
  | p.put(Context.PROVIDER_URL, "jnp://legacyserver:1099");
  | p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
  | Context context = new InitialContext(p);
  | QueueConnectionFactory factory = (QueueConnectionFactory)initial.lookup("ConnectionFactory");
  | Queue queue = (Queue)initial.lookup("queue/testQueue");

Any workaround advice?  TIA...


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

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



More information about the jboss-user mailing list