8 Replies Latest reply on Jan 21, 2005 9:47 AM by chris bono

    rmi-iiop

    chris bono Newbie

      WindowsXP
      Sun1.4.2_05
      JBoss3.2.3

      I am deploying an ejb that has a reference to a POJO. The POJO extends another POJO that extends another POJO.

      The deployment is failing w/ the following message at deploy time. Any ideas as to what is causing this? Thanks


      [ERROR]@[17 Jan 2005 12:35:12,281] [org.jboss.ejb.StatelessSessionContainer] : Initialization failed
      java.lang.IllegalArgumentException: Class org.foo.UserVO already has TypeCode.
      at org.jboss.iiop.rmi.ir.InterfaceRepository.addTypeCode(InterfaceRepository.java:345)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.addValue(InterfaceRepository.java:974)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.addClass(InterfaceRepository.java:750)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.getTypeCode(InterfaceRepository.java:312)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.addArray(InterfaceRepository.java:814)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.addClass(InterfaceRepository.java:723)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.getTypeCode(InterfaceRepository.java:312)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.addValue(InterfaceRepository.java:992)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.addValue(InterfaceRepository.java:953)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.addClass(InterfaceRepository.java:750)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.getTypeCode(InterfaceRepository.java:312)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.addValue(InterfaceRepository.java:992)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.addClass(InterfaceRepository.java:750)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.getTypeCode(InterfaceRepository.java:312)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.addValue(InterfaceRepository.java:992)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.addValue(InterfaceRepository.java:953)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.addClass(InterfaceRepository.java:750)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.getTypeCode(InterfaceRepository.java:312)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.addOperations(InterfaceRepository.java:647)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.addInterface(InterfaceRepository.java:920)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.addClass(InterfaceRepository.java:730)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.getTypeCode(InterfaceRepository.java:312)
      at org.jboss.iiop.rmi.ir.InterfaceRepository.mapClass(InterfaceRepository.java:138)
      at org.jboss.proxy.ejb.IORFactory.create(IORFactory.java:251)
      at org.jboss.ejb.StatelessSessionContainer.createService(StatelessSessionContainer.java:168)
      at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)

        • 1. Re: rmi-iiop
          chris bono Newbie

          So I have tracked this down to what I think is a bug in the iiop registry implementation. I think it is too strict.

          Suppose the following:

          class A extends B {
          }

          class B implements java.io.Serializable {
          private A[] theAs;
          ...
          }

          During the mapping process of A all of its refernced types are mapped as well and it reaches up to its parent classes/intf which in this case is B. Then all of Bs referenced types are mapped which in this case includes the reference back down to the A class which the registry throws out as the type already being mapped.

          I know that the reference back down to a child from the parent is a bit strange and not so OO but the object model is already in place and I have to work w/ what is here.

          Is there any rmi-iiop consistency/validity rules that would be violated by this type of relation or is this just a too strict implementation of the iiop registry?

          Thanks

          • 2. Re: rmi-iiop
            Adrian Brock Master

            This was fixed in JBoss4

            I know of no current plans to backport the spec compliant RMI/IIOP implementation
            from JBoss4 to 3.2.x

            • 3. Re: rmi-iiop
              chris bono Newbie

              Thanks for the info Adrian. I am trying to find a concise list of release notes for changes between 3.2.x and 4.0.x but all I seem to come up w/ is changes between 4.0.xa and 4.0.xb. I am trying to make an argument for upgrading to 4.0.

              Thanks

              • 4. Re: rmi-iiop
                Scott Stark Master

                Actually the 4.0 iiop impl has been merged to 3.2 to fix jdk1.5 issues so the InterfaceRepository in 3.2 is the same as 4.0 in the 3.2 branch. This was in the 3.2.7RC1 release. None of the csiv2 stuff was brought over to 3.2.

                • 5. Re: rmi-iiop
                  chris bono Newbie

                  How many other iiop issues were fixed from 3.2.3 to 3.2.7RC1? I am trying to decide whether to bump up or not. The fix above is a simple 2 liner in InterfaceRepository and ContainerImplDelegate but I would rather not have to maintain that myself. If it were up to me I would jump to 4.0x :)

                  Is there a simple way to do the gap on the releases in jira?

                  • 6. Re: rmi-iiop
                    chris bono Newbie

                    I still experienced the same issue on 3.2.7RC1 --
                    "Class xxx already has TypeCode".

                    • 7. Re: rmi-iiop
                      Adrian Brock Master

                      Looking at CVS, Scott's backport (v1.3.4.2) did not make it into 3.2.7RC1 (v1.3.4.1)

                      http://cvs.sourceforge.net/viewcvs.py/jboss/contrib/iiop/src/main/org/jboss/iiop/rmi/Util.java?rev=1.8&view=log

                      • 8. Re: rmi-iiop
                        chris bono Newbie

                        I did just verify that this is resolved in 4.0.1. I know that was well-known but I just wanted to wrap this post off w/ a sanity check.