3 Replies Latest reply on Jan 19, 2009 5:13 PM by kabirkhan

    JarJaring MC artifacts in jboss AS 4.2 installer script

    kabirkhan

      https://jira.jboss.org/jira/browse/JBAOP-693

      The classes in the upgraded jboss-aop-jdk50.deployer/jboss-reflect.jar (MC 2) clash with the classes in JBoss AS 4.2.x's jboss-beans.deployer (MC 1), so we should use jarjar to rename its classes. There are no problems with the classes jboss-mdr.jar, but it probably won't hurt to do the same there. I have upgraded the release build to put jarjar.jar into jboss-aop-XXX/jboss-40-install/jboss-aop-jdk50.deployer so it is ready for use in the install build.xml.

      I would still like to keep all the individual jars in jboss-aop-jdk50.deployer, so we should just use jarjar to rename the classes. I've never actually used jarjar, but I think that should be possible. Maybe the install script should rename jboss-reflect.jar and jboss-mdr.jar to something like jboss-reflect-aop-${aopversion}.jar and jboss-mdr-aop-${aopversion}.jar to make it clearer that they are not the "original jars"?

      The top level packages in jboss-reflect.jar are:
      org.jboss.beans
      org.jboss.classadapter
      org.jboss.config
      org.jboss.joinpoint
      org.jboss.reflect

      The top-level packages in jboss-mdr.jar are:
      org.jboss.annotation
      org.jboss.metadata

      The install script should run jarjar on all the jars in jboss-aop-jdk50.deployer to do the following replacements (http://code.google.com/p/jarjar/wiki/GettingStarted for the notation):
      org.jboss.beans.++ -> org.jboss.jbossaop4deployermc2.beans.@1
      org.jboss.classadapter.++ -> org.jboss.jbossaop4deployermc2.classadapter.@1
      org.jboss.config.++ -> org.jboss.jbossaop4deployermc2.config.@1
      org.jboss.joinpoint.++ -> org.jboss.jbossaop4deployermc2.joinpoint.@1
      org.jboss.reflect.++ -> org.jboss.jbossaop4deployermc2.reflect.@1
      org.jboss.annotation.++ -> org.jboss.jbossaop4deployermc2.annotation.@1
      org.jboss.metadata.++ -> org.jboss.jbossaop4deployermc2.metadata.@1

        • 1. Re: JarJaring MC artifacts in jboss AS 4.2 installer script
          kabirkhan

          Fixed error in previous post

          • 2. Re: JarJaring MC artifacts in jboss AS 4.2 installer script
            flavia.rainone

            I also have to rename the org.jboss.beans package:

            Caused by: java.lang.RuntimeException: Unable to create a KernelInitializer based on the specified KernelConfig
             at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:156)
             at org.jboss.kernel.KernelFactory.assembleNewKernel(KernelFactory.java:99)
             at org.jboss.kernel.KernelFactory.newInstance(KernelFactory.java:67)
             at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.bootstrap(AbstractBootstrap.java:122)
             at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:91)
             at org.jboss.kernel.deployment.jboss.JBossBeanDeployment.getKernel(JBossBeanDeployment.java:126)
             ... 96 more
            Caused by: java.lang.NoSuchMethodError: org.jboss.beans.info.spi.BeanInfoFactory.getBeanInfo(Ljava/lang/ClassLoader;Lorg/jboss/classadapter/spi/ClassAdapter;)Lorg/jboss/beans/info/spi/BeanInfo;
             at org.jboss.kernel.plugins.config.AbstractKernelConfig.getBeanInfo(AbstractKernelConfig.java:60)
             at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.getImplementation(PropertyKernelConfig.java:155)
             at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.createKernelInitializer(PropertyKernelConfig.java:123)
             at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:150)
             ... 101 more
            


            • 3. Re: JarJaring MC artifacts in jboss AS 4.2 installer script
              kabirkhan

              Ah yes, you probably need all the root packages I mentioned (with and without the '++' - I'm not familiar with the notation)