12 Replies Latest reply on Jan 6, 2004 6:43 AM by mpalicka

    Having problem deploying cmp error (BCEL)

    markymarc

      I get this Error when I try to deploy me cmp(Whats wrong?):

      11:54:55,853 INFO [MainDeployer] Starting deployment of package: file:/opt/jboss/server/default/deploy/tst-generic.jar
      11:54:57,354 INFO [EjbModule] Creating
      11:54:57,371 INFO [EjbModule] Deploying SimpleEJB
      11:54:58,058 INFO [EntityContainer] Creating
      11:54:58,085 INFO [EntityInstancePool] Creating
      11:54:58,086 INFO [EntityInstancePool] Created
      11:54:58,119 INFO [EntityContainer] Created
      11:54:58,120 INFO [EjbModule] Created
      11:54:58,123 INFO [EjbModule] Starting
      11:54:58,124 INFO [EntityContainer] Starting
      11:55:05,896 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=ejb/Simple,service=EJB
      java.lang.NoSuchMethodError: org.apache.bcel.generic.InstructionFactory.createNewArray(Lorg/apache/bcel/generic/Type;S)Lorg/apache/bcel/generic/AllocationInstruction;
      at org.jboss.proxy.compiler.ProxyImplementationFactory.createProxyMethod(ProxyImplementationFactory.java:319)
      at org.jboss.proxy.compiler.ProxyCompiler.getCode(ProxyCompiler.java:167)
      at org.jboss.proxy.compiler.Runtime.makeProxyType(Runtime.java:66)
      at org.jboss.proxy.compiler.ProxyCompiler.(ProxyCompiler.java:76)
      at org.jboss.proxy.compiler.Proxies$Impl.newTarget(Proxies.java:603)
      at org.jboss.proxy.compiler.Proxies.newTarget(Proxies.java:78)
      at org.jboss.proxy.compiler.Proxy.newProxyInstance(Proxy.java:49)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateBeanClassInstanceCommand.(JDBCCreateBeanClassInstanceCommand.java:52)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createCreateBeanClassInstanceCommand(JDBCCommandFactory.java:106)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:477)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:410)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:160)
      at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:340)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy13.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:394)
      at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy31.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:330)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy13.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:394)
      at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy11.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:543)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:632)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
      at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:273)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:394)
      at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy5.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:632)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:383)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:290)
      at org.jboss.Main.boot(Main.java:150)
      at org.jboss.Main$1.run(Main.java:388)
      at java.lang.Thread.run(Thread.java:536)
      11:55:05,939 INFO [EjbModule] Started
      11:55:05,940 INFO [EJBDeployer] Deployed: file:/opt/jboss/server/default/deploy/tst-generic.jar
      11:55:05,973 INFO [MainDeployer] Deployed package: file:/opt/jboss/server/default/deploy/tst-generic.jar

        • 1. Re: Having problem deploying cmp error (BCEL)
          morgan

          I was using 3.2.2 RC3 (on WinXP Pro w/JDK 1.4.2_01) with no problems; but after switching to RC4 I get the same error message as Markymarc. Does anyone have any idea what might be causing this? or better yet, how to fix it?

          Thanks!

          • 2. Re: Having problem deploying cmp error (BCEL)

            Post an example,
            a stacktrace with a generic error message isn't much use
            to anybody.

            Regards,
            Adrian

            • 3. Re: Having problem deploying cmp error (BCEL)
              levsen

              Adrian,

              I'm having the same problem, what exactly do you want 'xcept a stack trace? The source code of my bean? There is no bcel in it I swear. (Funny thing is also that it did work before with 3.2.2RC4, dunno what I did to break it.)

              My config: JBoss 3.2.2 RC4 (I need this one 'cause it fixes other things.) WinXP Pro, mySQL with jdbc-connector 3.0.8, jdk 1.4.1_02.

              Email me for more details.

              • 4. Re: Having problem deploying cmp error (BCEL)
                dcartier

                I have also found a similar situation using JBoss 3.2.2

                When I deploy an ear containing 3 EJB's, 2 deploy fine , but the third throws an error.

                E.g. java.lang.NoSuchMethodError: org.apache.bcel.generic.InstructionFactory: method createNewArray(Lorg/apache/bcel/generic/Type;S)Lorg/apache/bcel/generic/Instruction; not found]

                After trying to figure this out for awhile I have determined the following:

                This error occurs with the IBM 1.4.1 JDK on Linux.
                It does *NOT* occur with the Sun 1.4.2_02 JDK on Linux.
                It does *NOT* occur with the IBM 1.4 JDK on Linux.

                I have no idea why this happens. I have eliminated any unneccessary deployed files to try to make sure that I do not have an older BCEL included somewhere along the line. I searched the IBM JDK classes to see if they perhaps included it for some weird reason. No luck.

                I can get by for now by using the IBM 1.4 JDK, but this really worries me for the future.

                Anyone have any advice on where to look next?

                Dennis

                • 5. Re: Having problem deploying cmp error (BCEL)
                  dcartier

                  Ok, I recompiled under the IBM JDK 1.4.1 from source and it no longer throws the exception. I am not sure how this fixes it, I thought all 1.4.x JVM's were created equal, but just that it fixes it.

                  Dennis

                  • 6. Re: Having problem deploying cmp error (BCEL)
                    acristi

                    I also had this problem deplying CMPs. Make sure you don't have in $JRE_HOME/lib/endorsed/ xalan.jar and xercesImpl.jar. They gave me hardtimes until I discovered this.

                    • 7. I guess I'm wrong ...
                      acristi

                      It should be enough to work by removing xsltc.jar from $JRE_HOME/lib/endorsed/ !

                      • 8. Re: Having problem deploying cmp error (BCEL)
                        dcartier

                        Hmm, this got me to thinking, the IBM JDK has to have a XML parser included somewhere ... I have located it, and BCEL!!, in $JRE_HOME/lib/xml.jar. This explains why the IBM 1.4.1 JDK had such a problem with JBoss 3.2.2 compiled against BCEL 5.1. Obviously the BCEL included with the JDK is an older version.

                        I also looked at the xml.jar included in the IBM 1.4.0 JDK and it does not included BCEL.

                        So anyone wanting to use the IBM 1.4.1 JDK, recompile JBoss from source and you should be good to go.

                        Another possibility may be to remove the BCEL that is included in the xml.jar and substitue in the version 5.1 version that JBoss expects, but I am not sure if this would lead to instability in the IBM classes that are expecting the older version of BCEL.

                        Dennis

                        • 9. Re: I guess I'm wrong ...
                          mpalicka

                          I encountered the same problem. I installed the Java Web Services Developer Pack 1.3 (from Sun). It contains some modified (?) libraries related to XML (dom.jar, sax.jar, xalan.jar, xsltc.jar, xercesImpl.jar). They should be installed in the JRE/lib/endorsed directory. Probably these JARs are not compatible with JBoss...

                          • 10. Re: Having problem deploying cmp error (BCEL)
                            alanbram

                            The other way to fix this, that does not require any recompilation, is as follows:

                            1. put the bcel.jar from $JBOSS/server/default/lib into its own special directory. (I like to use "./server/default/lib/endorsed/".)

                            2. set the JAVA_OPTS environment variable before starting JBoss:

                            export JAVA_OPTS="-Djava.endorsed.dirs=$JBOSS/server/default/lib/endorsed"

                            (or just do the equivalent thing by hacking inside bin/run.sh)

                            I guess it just boils down to which version of bcel.jar you want to use. The "endorsed dirs" trick allows you to use a version other than that bundled with the JDK.

                            • 11. Re: Having problem deploying cmp error (BCEL)
                              nicfournier

                              I had the same problem and looked in IBM JDK 1.4.1 Service Release 1 and they removed BCEL in xml.jar. So working fine here!

                              • 12. Re: I guess I'm wrong ...
                                mpalicka

                                The conflicting library in JWSDP is "xsltc.jar" (part of the Xalan project).
                                It contains some older version of BCEL in itself.