0 Replies Latest reply on Nov 27, 2002 9:44 AM by Panagiotis Korros

    Classloading questions

    Panagiotis Korros Newbie

      I want to deploy a system made by 3 or more ear files.

      The first (admin.ear) contains an administration application to administer the other two. The other two ears contain the same ejbs with different jboss configurations bound to different jndi paths.

      When I am using a single unified classloader to load all the ears there is no problem and everything works great, but I want to deploy each application in a different classloaders so I can have different versions of the code in each one. (of course the ejb home and remote interfaces will remain the same). When I use jboss-app.xml and define different loader repositories for each ear the two applications work as before but the admin application can't access the ejbs in the ears. When I deploy the admin application in tomcat and the other two in jboss there is no problem. When all applications run inside jboss the error is:

      1. without a jndi.properties file in the ear java.lang.ClassCastException at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
      at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
      at ecentric.objects.ejbimpl.EJBNodeFactory.getSystemInfo(EJBNodeFactory.java:106)
      at ecentric.objects.ejbimpl.EJBNodeFactory.login(EJBNodeFactory.java:610)

      2. with a jndi.properties file in the ear

      16:21:59,668 ERROR [LogInterceptor] EJBException:
      javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract ecentric.ejb.SystemInfo ecentric.ejb.SystemInfoHome.create()
      throws javax.ejb.CreateException,java.rmi.RemoteException
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invokeHome(StatelessSessionContainer.java:597)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:206)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:57)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
      ....

      Does anyone have a clue what is wrong? What is the correct way to deploy such an application in jboss 3.x?

      I am using Jboss 3.04-tomcat4.0.6 on Windows 2000 AS SP3 and sun j2sdk 1.4.1