2 Replies Latest reply on Mar 29, 2012 10:29 AM by aarti R

    Moving from jboss 4.2.2ga to jboss 5.1.2

    aarti R Newbie

      We are moving from 4.2.2ga to jboss5.1.2 where am seeing the below exception and not able to figure out the root cause. This is ejb jar in our ear and we are using ejb3. I have got app working to soem extent with our product version with ejb2.Can someone pls help me figure out the issue . i have build the ear with java 1.5    

       

      16:29:11,648 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
      16:29:11,668 INFO  [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/LiferayPool' to JNDI name 'java:jdbc/LiferayPool'
      16:29:11,769 INFO  [TomcatDeployment] deploy, ctxPath=/admin-console
      16:29:11,849 INFO  [config] Initializing Mojarra (1.2_13-b01-FCS) for context '/admin-console'
      16:29:13,330 INFO  [TomcatDeployment] deploy, ctxPath=/
      16:29:13,922 INFO  [TomcatDeployment] deploy, ctxPath=/hello
      16:29:14,123 INFO  [TomcatDeployment] deploy, ctxPath=/jmx-console
      16:29:15,962 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/C:/software/jboss-5.1.2/jboss-eap-5.1.2/jboss-eap-5.1/jboss-as/server/default/deploy/clearorbit.ear/ state=PreReal mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: Error deploying connect.jar: bad magic number: e
      at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
      at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:61)
      at org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer.deploy(AbstractSimpleVFSRealDeployer.java:56)
      at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1172)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1225)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1113)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:789)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:699)
      at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
      at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
      at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
      at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)
      at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)
      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
      at org.jboss.Main.boot(Main.java:221)
      at org.jboss.Main$1.run(Main.java:556)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: java.io.IOException: bad magic number: e
      at javassist.bytecode.ClassFile.read(ClassFile.java:718)
      at javassist.bytecode.ClassFile.<init>(ClassFile.java:109)
      at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:663)
      at org.jboss.ejb3.Ejb3Deployment.deployUrl(Ejb3Deployment.java:653)
      at org.jboss.ejb3.Ejb3Deployment.deploy(Ejb3Deployment.java:616)
      at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:493)
      at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:182)
      ... 35 more
      16:29:16,006 INFO  [ProfileServiceBootstrap] Loading profile: ProfileKey@19172db[domain=default, server=default, name=default]
      16:29:16,007 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

      DEPLOYMENTS IN ERROR:
        Deployment "vfszip:/C:/software/jboss-5.1.2/jboss-eap-5.1.2/jboss-eap-5.1/jboss-as/server/default/deploy/clearorbit.ear/" is in error due to the following reason(s): java.io.IOException: bad magic number: e

      16:29:16,016 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080

        • 1. Re: Moving from jboss 4.2.2ga to jboss 5.1.2
          Wolf-Dieter Fink Master

          Use google and you will find things like this:

          Each class file starts with special 4 bytes equal to the hexadecimal value of 0xCAFEBABE (cool, huh?) - this number identifies the class file format and is humorously named "Magic Number". When you get an error from the JVM saying "Bad Magic Number", it simply means the class file it is trying to load is corrupt (or perhaps the JVM is corrupt).
          The solution is usually to recompile all your classes.

          • 2. Re: Moving from jboss 4.2.2ga to jboss 5.1.2
            aarti R Newbie

            Thanks, i tried to rebuild my jar. But actually my ejb jar  referenced other jars  from manifest.mf. one of them clover.jar has some issue with class files. I put the ear on jboss 6.0 to see if i get different error and it pointed out actual class thats how i figured out the jar which had the issue.