3 Replies Latest reply on Dec 1, 2002 9:54 PM by n_ton

    Weird error in one package, but not another

    n_ton

      Hi,

      I'm running JBoss 3.0.4 on RedHat 7.3 using Sun's JDK 1.3.1_06. I have two classes in two different packages. Both classes are nearly identical except for their names. Both call stateless session beans.

      For example:

      package package1;

      public class FirstBean {
      public static FirstBean getFirstBean(int id) {
      try {
      SesseionBeanHome sbh = (SessionBeanHome)EJBUtil.getHome("session-bean", SessionBeanHom.class);
      SessionBeanRemote = sbh.create();
      }
      catch appropriate exceptions;
      }
      }
      }

      package package2;

      public class SecondBean {
      public static SecondBean getSecondBean(int id) {
      try {
      SesseionBean2Home sbh = (SessionBean2Home)EJBUtil.getHome("session-bean2", SessionBean2Hom.class);
      SessionBean2Remote = sbh.create();
      }
      catch appropriate exceptions;
      }
      }
      }

      A call to FirstBean.getFirstBean() works great, but a call to SecondBean.getSecondBean() yields:

      [java] 1) testGetSecondBean(test.SecondBeanTest)java.lang.ExceptionInInitializerError: org.omg.CORBA.INITIALIZE: cannot instantiate com.sun.corba.se.internal.javax.rmi.CORBA.Util minor code: 0 completed: No
      [java] at javax.rmi.CORBA.Util.createDelegateIfSpecified(Util.java:303)
      [java] at javax.rmi.CORBA.Util.(Util.java:48)
      [java] at javax.rmi.PortableRemoteObject.createDelegateIfSpecified(PortableRemoteObject.java:177)
      [java] at javax.rmi.PortableRemoteObject.(PortableRemoteObject.java:56)
      [java] at EJBUtil.getHome(Unknown Source)
      [java] at SecondBean.getSecondBean(Unknown Source)
      [java] at test.SecondBeanTest.testGetSecondBean(Unknown Source)
      [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208)
      [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150)
      [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:415)
      [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163)
      [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
      [java] at org.apache.tools.ant.Task.perform(Task.java:319)
      [java] at org.apache.tools.ant.Target.execute(Target.java:309)
      [java] at org.apache.tools.ant.Target.performTasks(Target.java:336)
      [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
      [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
      [java] at org.apache.tools.ant.Main.runBuild(Main.java:610)
      [java] at org.apache.tools.ant.Main.start(Main.java:196)
      [java] at org.apache.tools.ant.Main.main(Main.java:235)

      Both call the same EJBUtil.getHome() method. And I've checked everything I can think of to figure out what might be different between the two packages. I even copied the working file to the non-working file and changed all the names thinking there was something in the file, but it still didn't work.

      It might be interesting to note that subsequent calls to the same method yield NoClassDefFoundErrors, but I figure that's because of this initial error.

      Anyone have any ideas of what else I can check?

      Any help would be greatly appreciated.