3 Replies Latest reply on Dec 20, 2011 10:54 AM by Sandeep Dixit

    I am getting error trying to scan <jar-file> with root cause java.lang.IllegalArgumentException: Null export policy

    Sandeep Dixit Newbie

      Hi,

       

      While upgrading from JBoss 5 to Jboss 6, I am getting the following error:

       

      My ear contains this file builder-ejb.jar that has only xml files in its meta-inf (persistence.xml, etc.) all class files are in the ear's/lib folder. I have also added jboss-scanning.xml with empty body (from what I understand it will skip scanning for the jar). What am I missing here? Any pointers will be highly appreciated.

       

      Thanks,

      Sandeep

       

      ERROR STARTS BELOW:

       

      22:31:04,386 INFO  [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=oecrm1.6.3RC1-derby-jboss.ear/builder-ejb.jar#fndPersistenceUnit

      22:31:04,387 INFO  [Ejb3Configuration] Processing PersistenceUnitInfo [

                name: fndPersistenceUnit

                ...]

      22:31:04,389 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=oecrm1.6.3RC1-derby-jboss.ear/builder-ejb.jar#fndPersistenceUnit state=Create: java.lang.RuntimeException: error trying to scan <jar-file>: vfs:/Users/sdixit/Documents/jboss-6.1.0.Final/server/default/deploy/oecrm1.6.3RC1-derby-jboss.ear/builder-ejb.jar/

                at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:854) [:3.6.6.Final]

                at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:594) [:3.6.6.Final]

                at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) [:3.6.6.Final]

                at org.jboss.jpa.builder.DefaultCEMFBuilder.build(DefaultCEMFBuilder.java:47) [:1.0.2-alpha-4]

                at org.jboss.as.jpa.scanner.HackCEMFBuilder.build(HackCEMFBuilder.java:49) [:6.1.0.Final]

                at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:275) [:1.0.2-alpha-4]

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_26]

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_26]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_26]

                at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_26]

                at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60) [jboss-reflect.jar:2.2.1.SP1]

                at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.1.SP1]

                at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) [jboss-reflect.jar:2.2.1.SP1]

                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257) [jboss-kernel.jar:2.2.0.SP2]

                at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47) [jboss-kernel.jar:2.2.0.SP2]

                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125) [jboss-kernel.jar:2.2.0.SP2]

                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72) [jboss-kernel.jar:2.2.0.SP2]

                at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:202) [jboss-kernel.jar:2.2.0.SP2]

                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.SP2]

                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:894) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:641) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:182) [:2.2.2.GA]

                at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:58) [:2.2.2.GA]

                at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:63) [:2.2.2.GA]

                at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.2.GA]

                at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.2.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.2.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.2.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571) [:2.2.2.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1603) [:2.2.2.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.2.GA]

                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.2.GA]

                at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.2.GA]

                at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.2.GA]

                at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.1.0.Final]

                at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]

                at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151) [:0.2.2]

                at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94) [:0.2.2]

                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.SP2]

                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.SP2]

                at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.java:190) [:0.2.2]

                at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87) [:0.2.2]

                at org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215) [:0.2.2]

                at org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159) [:0.2.2]

                at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:112) [:0.2.2]

                at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:87) [:0.2.2]

                at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91) [:0.2.2]

                at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:132) [:6.1.0.Final]

                at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.1.0.Final]

                at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]

                at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]

                at java.lang.Thread.run(Thread.java:680) [:1.6.0_26]

      Caused by: java.lang.IllegalArgumentException: Null export policy

                at org.jboss.classloading.plugins.vfs.PackageVisitor.<init>(PackageVisitor.java:117) [jboss-classloading-vfs.jar:2.2.1.GA]

                at org.jboss.classloading.plugins.vfs.PackageVisitor.determineAllPackages(PackageVisitor.java:87) [jboss-classloading-vfs.jar:2.2.1.GA]

                at org.jboss.scanning.hibernate.ScannerImpl.getPackagesInJar(ScannerImpl.java:245) [:1.0.0.GA]

                at org.jboss.as.jpa.scanner.HackTLScanner.getPackagesInJar(HackTLScanner.java:57) [:6.1.0.Final]

                at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:483) [:3.6.6.Final]

                at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:851) [:3.6.6.Final]

                ... 80 more

       

       

      2

        • 1. Re: I am getting error trying to scan <jar-file> with root cause java.lang.IllegalArgumentException: Null export policy
          Sandeep Dixit Newbie

          Also below is my jboss-classloading.xml in ear's/META-INF

           

          <classloading xmlns="urn:jboss:classloading:1.0" name="oecrm.ear"

            domain="oecrm_domain">

                    parent-domain="Ignored"

                    export-all="NON_EMPTY"

                    import-all="true">  

          </classloading> 

          • 2. Re: I am getting error trying to scan <jar-file> with root cause java.lang.IllegalArgumentException: Null export policy
            Sandeep Dixit Newbie

            Another piece of info: here is my persistence.xml

             

               <persistence-unit name="fndPersistenceUnit" transaction-type="JTA">

                    <jta-data-source>java:/OhioedgeDS</jta-data-source>

                                <jar-file>lib/attribute-ejblib.jar</jar-file>

                                <jar-file>lib/builder-ejblib.jar</jar-file>

                                <jar-file>lib/cust-ejblib.jar</jar-file>

                                <jar-file>lib/doc-ejblib.jar</jar-file>

                                <jar-file>lib/order-ejblib.jar</jar-file>

                                <jar-file>lib/org-ejblib.jar</jar-file>

                                <jar-file>lib/proc-ejblib.jar</jar-file>

                                <jar-file>lib/prod-ejblib.jar</jar-file>

                                <jar-file>lib/tool-ejblib.jar</jar-file>

                                <jar-file>lib/vendor-ejblib.jar</jar-file>

                    <properties>

              <!-- automatically create or drop tables -->

              <!-- property name="hibernate.hbm2ddl.auto" value="create-drop" / -->

              <!-- SQL-Logging -->

                        <property name="hibernate.show_sql" value="true"></property>

                        <property name="useColumnNamesInFindColumn" value="true"></property>

                        <property name="useOldAliasMetadataBehavior" value="true"></property>

                    </properties>

                </persistence-unit>

            </persistence>

            • 3. Re: I am getting error trying to scan <jar-file> with root cause java.lang.IllegalArgumentException: Null export policy
              Sandeep Dixit Newbie

              Found a solution - it has to do with my jboss-classloading.xml. I removed it (as well as xerces classes from jars included in the ear) and the error went away. I guess I need to revisit the jboss-classloading.xml again to properly implement it.

               

              Sandeep