13 Replies Latest reply on May 15, 2011 8:14 PM by Denis Forveille

    Unable to deploy Weld application on Aix

    Mike Finkenzeller Newbie
      Seem to be running into some sort of classloader issue on Aix with Weld. The application deploys fine on MACOSX, Linux and Windows.

      The application is being deployed to JBoss6.0.0.Final on default profile running JDK6.

      2011-02-08 13:48:30,593 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (Thread-7) Error installing to Start: name=vfs:///usr/local/SOA/jboss/server/prelude/deploy/prelude-soa-rest-api.war_WeldBootstrapBean state=Create: org.jboss.weld.exceptions.WeldException: by java.lang.NoClassDefFoundError: org.jboss.weldx.transaction.org$jboss$weld$bean-jboss$classloader:id="vfs:$$$usr$local$SOA$jboss$server$prelude$deployers$resteasy$deployer"-Built-in-UserTransaction_$$_WeldProxy
              at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:285) [:6.0.0.Final]

      I tried changing the class loader settings for my WAR file in the jboss-web.xml file but that did not seem to be the issue. I was able to isolate the issue to when it is trying to deploy...

      <!-- Access to the JTA UserTransaction, and synchronization registration -->
         <bean name="JBossTransactionServices" class="org.jboss.weld.integration.transaction.JBossTransactionServices">
            <constructor>
               <parameter><inject bean="TransactionManager"/></parameter>
            </constructor>    
         </bean>

      Anyone run into something similar to this before or have any suggestions? Thanks
        • 1. Re: Unable to deploy Weld application on Aix
          Mike Finkenzeller Newbie
          A little more info on this....

          2011-02-14 14:49:04,760 TRACE [org.jboss.classloader.spi.base.BaseClassLoader] (Thread-7) BaseClassLoader@376a376a{bootstrap-classloader:0.0.0$MODULE} class not found sun.reflect.GeneratedMethodAccessor124
          2011-02-14 14:49:04,739 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (Thread-7) Error installing to Start: name=vfs:///usr/local/SOA/jboss/server/prelude/deploy/prelude-soa-rest-api.war_WeldBootstrapBean state=Create: org.jboss.weld.exceptions.WeldException: by java.lang.NoClassDefFoundError: org.jboss.weldx.transaction.org$jboss$weld$bean-jboss$classloader:id="vfs:$$$usr$local$SOA$jboss$server$prelude$deployers$resteasy$deployer"-Built-in-UserTransaction_$$_WeldProxy
                  at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:285) [:6.0.0.Final]
          • 2. Re: Unable to deploy Weld application on Aix
            Mike Finkenzeller Newbie

            For fun I tried to deploy the weld numberguess example and it failed as well. I also tested this with IBM JDK 32/64 bit and on two different AIX releases (5.3 and 6.1). All scenarios and combination's fail.

            • 3. Re: Unable to deploy Weld application on Aix
              Ales Justin Master

              "sun.reflect.GeneratedMethodAccessor124" looks like some Sun specific class crawled in.


              I'll try to locate it, or, I wouldn't mind if you try as well. :-)

              • 4. Re: Unable to deploy Weld application on Aix
                Ales Justin Master

                Although this comes from TRACE, so it's probably not relevant ... hmmm ...

                • 5. Re: Unable to deploy Weld application on Aix
                  Marius Bogoevici Newbie

                  Mike,


                  I wonder if it's an AIX or IBM JDK issue.


                  Can you try the app (if you didn't do that already) with the IBM JDK (preferrably the same version as Aix) on Linux or Windows?


                  • 6. Re: Unable to deploy Weld application on Aix
                    Mike Finkenzeller Newbie

                    I can give it a shot with the IBM JDK on Linux.

                    • 7. Re: Unable to deploy Weld application on Aix
                      Stuart Douglas Master

                      This is probably an error with the proxy generation that is specific to the IBM JDK. Would it be possible to get a full stacktrace?


                      Stuart

                      • 8. Re: Unable to deploy Weld application on Aix
                        Mike Finkenzeller Newbie
                        2011-02-22 08:41:09,648 INFO  [org.jboss.weld.Version] (HDScanner) WELD-000900 1.1.0 (CR3)
                        2011-02-22 08:41:10,354 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner) Error installing to Start: name=vfs:///usr/local/SOA/jboss/server/prelude/deploy/prelude-soa-rest-api.war_WeldBootstrapBean state=Create: org.jboss.weld.exceptions.WeldException: by java.lang.NoClassDefFoundError: org.jboss.weldx.transaction.org$jboss$weld$bean-jboss$classloader:id="vfs:$$$usr$local$SOA$jboss$server$prelude$deploy$prelude-soa-rest-api$war"-Built-in-UserTransaction_$$_WeldProxy
                                at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:285) [:6.0.0.Final]
                                at org.jboss.weld.bean.proxy.ProxyFactory.create(ProxyFactory.java:212) [:6.0.0.Final]
                                at org.jboss.weld.bean.builtin.ee.AbstractEEBean.<init>(AbstractEEBean.java:46) [:6.0.0.Final]
                                at org.jboss.weld.bean.builtin.ee.UserTransactionBean.<init>(UserTransactionBean.java:60) [:6.0.0.Final]
                                at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:197) [:6.0.0.Final]
                                at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:363) [:6.0.0.Final]
                                at org.jboss.weld.integration.deployer.env.helpers.BootstrapBean.boot(BootstrapBean.java:92) [:6.0.0.Final]
                                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0]
                                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) [:1.6.0]
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) [:1.6.0]
                                at java.lang.reflect.Method.invoke(Method.java:611) [:1.6.0]
                                at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60) [jboss-reflect.jar:2.2.0.GA]
                                at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.0.GA]
                                at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) [jboss-reflect.jar:2.2.0.GA]
                                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257) [jboss-kernel.jar:2.2.0.GA]
                                at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47) [jboss-kernel.jar:2.2.0.GA]
                                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125) [jboss-kernel.jar:2.2.0.GA]
                                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72) [jboss-kernel.jar:2.2.0.GA]
                                at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:202) [jboss-kernel.jar:2.2.0.GA]
                                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.GA]
                                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.GA]
                                at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.GA]
                                at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.GA]
                                at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.GA]
                                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
                                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
                                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
                                at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
                                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
                                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
                                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
                                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
                                at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]
                                at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.GA]
                                at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.GA]
                                at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]
                                at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]
                                at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:240) [:0.2.2]
                                at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]
                                at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]
                                at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]
                                at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]
                                at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]
                                at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]
                                at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]
                                at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]
                                at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]
                                at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]
                                at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]
                                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:452) [:1.6.0]
                                at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:328) [:1.6.0]
                                at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:161) [:1.6.0]
                                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:109) [:1.6.0]
                                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:192) [:1.6.0]
                                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:216) [:1.6.0]
                                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897) [:1.6.0]
                                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919) [:1.6.0]
                                at java.lang.Thread.run(Thread.java:736) [:1.6.0]
                        Caused by: javassist.CannotCompileException: by java.lang.NoClassDefFoundError: org.jboss.weldx.transaction.org$jboss$weld$bean-jboss$classloader:id="vfs:$$$usr$local$SOA$jboss$server$prelude$deploy$prelude-soa-rest-api$war"-Built-in-UserTransaction_$$_WeldProxy
                                at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:117) [:6.0.0.Final]
                                at org.jboss.weld.bean.proxy.ProxyFactory.createProxyClass(ProxyFactory.java:392) [:6.0.0.Final]
                                at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:281) [:6.0.0.Final]
                                ... 57 more
                        Caused by: java.lang.NoClassDefFoundError: org.jboss.weldx.transaction.org$jboss$weld$bean-jboss$classloader:id="vfs:$$$usr$local$SOA$jboss$server$prelude$deploy$prelude-soa-rest-api$war"-Built-in-UserTransaction_$$_WeldProxy
                                at java.lang.ClassLoader.defineClassImpl(Native Method) [:1.6.0]
                                at java.lang.ClassLoader.defineClass(ClassLoader.java:275) [:1.6.0]
                                at java.lang.ClassLoader.defineClass(ClassLoader.java:212) [:1.6.0]
                                at sun.reflect.GeneratedMethodAccessor124.invoke(Unknown Source) [:1.6.0]
                                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) [:1.6.0]
                                at java.lang.reflect.Method.invoke(Method.java:611) [:1.6.0]
                                at org.jboss.weld.util.bytecode.ClassFileUtils.toClass2(ClassFileUtils.java:143) [:6.0.0.Final]
                                at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:109) [:6.0.0.Final]
                                ... 59 more

                        2011-02-22 08:41:10,382 WARN  [org.jboss.profileservice.deployment.hotdeploy.HDScanner] (HDScanner) Scan failed: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
                        • 9. Re: Unable to deploy Weld application on Aix
                          Mike Finkenzeller Newbie

                          After some debugging I actually figured out what it does not like but not yet why.


                          The issue is actually the proxyName being used. I changed the proxyName to something simple in ProxyFactory and then the proxies started to generate, the application deployed, and the integration tests worked. That tested the whole stack (RESTEasy, WELD, etc.)


                          So, I guess next step is to figure out what it does not like about the proxyName.....

                          • 10. Re: Unable to deploy Weld application on Aix
                            Mike Finkenzeller Newbie
                            Changing this in ProxyFactory in method static String getProxyName(Class<?> proxiedBeanType, Set<? extends Type> typeClosure, Bean<?> bean)

                            String className = beanId.replace('.', '$').replace(' ', '_').replace('/', '$').replace(';', '$');

                            to this.....

                            String className = beanId.replace('.', '$').replace(' ', '_').replace('/', '$').replace(';', '$').replace(':','$').replace('[', '$');

                            So basically removing the ':' and '[' characters in the proxyName resolved the issue. Interesting.....
                            • 11. Re: Unable to deploy Weld application on Aix
                              fiorenzo pizza Newbie

                              can you share your library patched, to conduct tests on other AIX server?


                              thanks


                              Fiorenzo

                              • 12. Re: Unable to deploy Weld application on Aix
                                Sören Rex Newbie

                                There is a patch
                                for the corresponing JIRA Unable to deploy any Weld application(s) on AIX similar to Mike's workaround
                                which replaces : [ and ] in classnames.


                                I applied this patch to ProxyFactory in weld-1.1.0-Final. But this was not sufficient for our AIX JVM


                                $ /usr/java6/bin/java -version                  
                                 java version "1.6.0"
                                 Java(TM) SE Runtime Environment (build pap3260-20071123_01)
                                 IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 AIX ppc-32 jvmap3260-20071121_15015 (JIT enabled)
                                 J9VM - 20071121_015015_bHdSMR
                                 JIT  - r9_20071121_1330
                                 GC   - 20071031_AA)
                                 JCL  - 20071118_01
                                


                                Caused by: java.lang.ClassFormatError: JVMCFRE068 class name is invalid; class=org/jboss/weld/environment/se/org$jboss$weld$bean-classpath-ManagedBean-org$jboss$weld$environment$se$ShutdownManager$@javax$enterprise$context$ApplicationScoped()${}$$WeldClientProxy, offset=0


                                To get the ProxyFactory working on IBM's JVM I had to replace - @ ( ) { and } too.


                                • 13. Re: Unable to deploy Weld application on Aix
                                  Denis Forveille Novice

                                  Same problem here, but on Linux Centos 5.6 32 bits. JDK comes WebSphere v7.0.0.15 Linux
                                  bits



                                  Java version "1.6.0"
                                  Java(TM) SE Runtime Environment (build pxi3260sr9ifix-20110208_02(SR9+PM18528+IZ90220+IZ94423))
                                  IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260sr9-20101209_70480 (JIT enabled, AOT enabled)
                                  J9VM - 20101209_070480
                                  JIT  - r9_20101028_17488ifx3
                                  GC   - 20101027_AA)
                                  JCL  - 20110208_02