[jboss-jira] [JBoss JIRA] Commented: (EJBTHREE-978) Deployer should ignore files that Javassist throws a "non class file" exception for

Jan Ulrich (JIRA) jira-events at lists.jboss.org
Wed Sep 2 05:34:23 EDT 2009


    [ https://jira.jboss.org/jira/browse/EJBTHREE-978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12484107#action_12484107 ] 

Jan Ulrich commented on EJBTHREE-978:
-------------------------------------

I had the same problem with the db2-driver under a jboss 5.1.0 and here the debugging is even harder because my stacktrace does not give any indication that the db2 driver might be the cause of the problem. Obviously in this scenario the driver is required by my sar and it would be very helpful, if the deployer would state which class is causing the problem or ignore the invalid class (which would be ok is this case)

10:27:51,858 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/D:/server/jboss-5.1.0.GA/server/ms
kp/deploy/deploy.last/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error deploying JBossCacheLoader.sar: bad magic number: cba78dd8
        at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196)
        at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:99)
        at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45)
        at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
        at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
        at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
        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:361)
        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
        at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
        at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
        at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
        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:619)
Caused by: java.io.IOException: bad magic number: cba78dd8
        at javassist.bytecode.ClassFile.read(ClassFile.java:689)
        at javassist.bytecode.ClassFile.<init>(ClassFile.java:85)
        at org.jboss.ejb3.Ejb3Deployment.deployElement(Ejb3Deployment.java:661)

> Deployer should ignore files that Javassist throws a "non class file" exception for
> -----------------------------------------------------------------------------------
>
>                 Key: EJBTHREE-978
>                 URL: https://jira.jboss.org/jira/browse/EJBTHREE-978
>             Project: EJB 3.0
>          Issue Type: Bug
>         Environment: JBoss 4.0.5 GA with EJB3 deployer and IBM DB2 JDBC driver v3.3.54
>            Reporter: Josh Devins
>         Attachments: server.snipped.log
>
>
> This is a follow-up to a Javassist issue # JASSIST-34.
> For some reason, the IBM DB2 JDBC jar file contains a class that does not start with the magic code "0xCAFEBABE". When the EJB3 deployer looks at this jar file and scans the classes in it, Javassist is throwing an IOException with message "non class file". This is entirely useless to the end user since there is no information given about what class file or jar file is in error.
> Javassist should be throwing a more descriptive exception (as per the issue JASSIST-34), and the EJB3 deployer should simply skip that file and output a warning telling the user/developer what jar file and class was in error.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list