10 Replies Latest reply: Dec 9, 2011 6:05 AM by swapnil narvekar RSS

How to isolate ClassLoader in JBoss 6

swapnil narvekar Newbie

Hello All,

     I have a .war file.File name is 'test.war'.

 

     I am trying to deploy it on JBOSS-6.0.0-xxxx-CR1 .I am getting an exception along with stack trace as follows:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

WARN  [ClassLoaderManager] Unexpected error during load of:org.apache.commons.collections.DoubleOrderedMap$2$1: java.lang.IllegalAccessError: class org.apache.commons.collections.DoubleOrderedMap$2$1 cannot access its superclass org.apache.commons.collections.DoubleOrderedMap$DoubleOrderedMapIterator

    at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_17]

    at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [:1.6.0_17]

    at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:52) [jboss-classloader.jar:2.2.0.Alpha9]

    at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:650) [jboss-classloader.jar:2.2.0.Alpha9]

    at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:609) [jboss-classloader.jar:2.2.0.Alpha9]

    at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_17]

    at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:608) [jboss-classloader.jar:2.2.0.Alpha9]

    at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:585) [jboss-classloader.jar:2.2.0.Alpha9]

    at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:156) [jboss-classloader.jar:2.2.0.Alpha9]

    at org.jboss.classloader.spi.filter.FilteredDelegateLoader.doLoadClass(FilteredDelegateLoader.java:141) [jboss-classloader.jar:2.2.0.Alpha9]

    at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:132) [jboss-classloader.jar:2.2.0.Alpha9]

    at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:461) [jboss-classloader.jar:2.2.0.Alpha9]

    at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:262) [jboss-classloader.jar:2.2.0.Alpha9]

    at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:161) [jboss-classloader.jar:2.2.0.Alpha9]

    at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:260) [jboss-classloader.jar:2.2.0.Alpha9]

    at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1152) [jboss-classloader.jar:2.2.0.Alpha9]

    at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:886) [jboss-classloader.jar:2.2.0.Alpha9]

    at org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:505) [jboss-classloader.jar:2.2.0.Alpha9]

    at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:450) [jboss-classloader.jar:2.2.0.Alpha9]

    at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [:1.6.0_17]

    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) [:1.6.0_17]

    at java.lang.Class.forName0(Native Method) [:1.6.0_17]

    at java.lang.Class.forName(Class.java:247) [:1.6.0_17]

    at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.resolveComplexTypeInfo(IntrospectionTypeInfoFactoryImpl.java:458) [jboss-reflect.jar:2.2.0.Alpha9]

    at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.getTypeInfo(IntrospectionTypeInfoFactoryImpl.java:414) [jboss-reflect.jar:2.2.0.Alpha9]

    at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactory.getTypeInfo(IntrospectionTypeInfoFactory.java:54) [jboss-reflect.jar:2.2.0.Alpha9]

    at org.jboss.config.plugins.AbstractConfiguration.getTypeInfo(AbstractConfiguration.java:121) [jboss-reflect.jar:2.2.0.Alpha9]

    at org.jboss.kernel.plugins.config.AbstractKernelConfig.getTypeInfo(AbstractKernelConfig.java:95) [jboss-kernel.jar:2.2.0.Alpha10]

    at org.jboss.kernel.plugins.config.AbstractKernelConfigurator.getTypeInfo(AbstractKernelConfigurator.java:102) [jboss-kernel.jar:2.2.0.Alpha10]

    at org.jboss.scanning.plugins.visitor.ConfiguratorReflectProvider.getTypeInfo(ConfiguratorReflectProvider.java:47) [:1.0.0.Alpha7]

    at org.jboss.scanning.plugins.visitor.CachingReflectProvider.getTypeInfo(CachingReflectProvider.java:52) [:1.0.0.Alpha7]

    at org.jboss.scanning.plugins.visitor.ReflectResourceVisitor.getTypeInfo(ReflectResourceVisitor.java:60) [:1.0.0.Alpha7]

    at org.jboss.scanning.plugins.visitor.ReflectResourceVisitor.getClassInfo(ReflectResourceVisitor.java:72) [:1.0.0.Alpha7]

    at org.jboss.scanning.plugins.visitor.ReflectResourceVisitor.doVisit(ReflectResourceVisitor.java:107) [:1.0.0.Alpha7]

    at org.jboss.scanning.plugins.visitor.ReflectResourceVisitor.visit(ReflectResourceVisitor.java:86) [:1.0.0.Alpha7]

    at org.jboss.scanning.annotations.plugins.AnnotationsScanningPlugin.visit(AnnotationsScanningPlugin.java:89) [:1.0.0.Alpha7]

    at org.jboss.scanning.spi.helpers.ScanningPluginWrapper.visit(ScanningPluginWrapper.java:112) [:1.0.0.Alpha7]

    at org.jboss.classloading.plugins.visitor.FederatedResourceVisitor.visit(FederatedResourceVisitor.java:101) [jboss-classloading.jar:2.2.0.Alpha9]

    at org.jboss.classloading.plugins.vfs.VFSResourceVisitor.visit(VFSResourceVisitor.java:264) [jboss-classloading-vfs.jar:2.2.0.Alpha9]

    at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:407) [jboss-vfs.jar:3.0.0.CR5]

    at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:409) [jboss-vfs.jar:3.0.0.CR5]

    at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:409) [jboss-vfs.jar:3.0.0.CR5]

    at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:409) [jboss-vfs.jar:3.0.0.CR5]

    at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:409) [jboss-vfs.jar:3.0.0.CR5]

    at org.jboss.vfs.VirtualFile.visit(VirtualFile.java:395) [jboss-vfs.jar:3.0.0.CR5]

    at org.jboss.classloading.plugins.vfs.VFSResourceVisitor.visit(VFSResourceVisitor.java:102) [jboss-classloading-vfs.jar:2.2.0.Alpha9]

    at org.jboss.deployers.vfs.plugins.classloader.VFSDeploymentClassLoaderPolicyModule.visit(VFSDeploymentClassLoaderPolicyModule.java:181) [:2.2.0.Alpha8]

    at org.jboss.scanning.plugins.DeploymentUnitScanner.scan(DeploymentUnitScanner.java:111) [:1.0.0.Alpha7]

    at org.jboss.scanning.spi.helpers.UrlScanner.scan(UrlScanner.java:96) [:1.0.0.Alpha7]

    at org.jboss.scanning.deployers.ScanningDeployer.deploy(ScanningDeployer.java:90) [:1.0.0.Alpha7]

    at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.Alpha8]

    at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.Alpha8]

    at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.Alpha8]

    at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.Alpha8]

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

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

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

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

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

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

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

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

    at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.Alpha8]

    at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.Alpha8]

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

    at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.20101110-CR1]

    at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:130) [:0.1.0.Alpha1]

    at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:148) [:0.1.0.Alpha1]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    at org.jboss.profileservice.dependency.ProfileServiceController.activate(ProfileServiceController.java:188) [:0.1.0.Alpha1]

    at org.jboss.profileservice.AbstractProfileService.activateProfile(AbstractProfileService.java:170) [:0.1.0.Alpha1]

    at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:117) [:0.1.0.Alpha1]

    at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:89) [:0.1.0.Alpha1]

    at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:97) [:0.1.0.Alpha1]

    at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:130) [:6.0.0.20101110-CR1]

    at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.20101110-CR1]

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

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

    at java.lang.Thread.run(Thread.java:619) [:1.6.0_17]

 

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

      I have observed that it is because of commons-collections-3.2.1.jar  in web-inf\lib is conflicting with commons-collections-3.2.jar which is present in the default\deployers\jsf.deployer\MyFaces-2.0\jsf-libs

     

       To remove this exception I have decided to load isolated classloader  for my  .war file.

I searched , read discussions,forums regarrding it and I have taken following steps.

 

       1. Created -jboss-classloading.xml and placed it in WEB-INF

              WEB-INF\ jboss-classloading.xml

 

             contents :

 

                   <?xml version="1.0" encoding="UTF-8"?>

                   <!--See http://phytodata.wordpress.com/2010/10/21/demystifying-the-jboss5-jboss-classloading-xml-file-->

                   <classloading xmlns="urn:jboss:classloading:1.0"

                                 name="test.war"   

                                 domain="DefaultDomain"

                                 parent-first="false"

                                top-level-classloader="true"

                                export-all="NON_EMPTY"

                                import-all="true">

                     </classloading>

 


       2. Created -jboss-web.xml and placed it in WEB-INF

              WEB-INF\ jboss-web.xml

 

               Contents:

 

                           <?xml version="1.0" encoding="UTF-8"?>

                           <jboss-web>

                                       <class-loading java2ClassLoadingCompliance="false">

                                                 <loader-repository>

                                                           com.mastek:archive=test

                                                          <loader-repository-config>java2ParentDelegation=false</loader-repository-config>

                                                 </loader-repository>

                                       </class-loading>

                           </jboss-web>

 

 

      3. Created - jboss-app.xml and placed it in WEB-INF

               WEB-INF\classes\META-INF\jboss-app.xml

 

               Contents :

 

                         <?xml version="1.0" encoding="UTF-8"?>

                         <jboss-app>

                                  <loader-repository>com.mastek:loader=emhada</loader-repository>

                         </jboss-app>

 

 

 

              I took above mentioned steps but still that exception occurs.

 

              Please throw some light on this .So I Can solve this isolation of ClassLoader successfully.

  • 1. Re: How to isolate ClassLoader in JBoss 6
    Ales Justin Master

    The exception is thrown as part of scanning.

    Although scanning should follow the same classloading rules, it might be easier to just exclude this resources from being scanned.

    See this for more details on how to do that: http://java.dzone.com/articles/jboss-microcontainer-scanning

  • 2. Re: How to isolate ClassLoader in JBoss 6
    swapnil narvekar Newbie

    Hi Ales,

           Thanks for your reply.

    I read your replies which you did for similar kind of questions.

    and because of which only I am able to do this much of configuration .Once again thankful to you.

     

        Also, I have gone through the your link which you posted here.

        and also , Visited this link :

        http://phytodata.wordpress.com/2010/10/21/demystifying-the-jboss5-jboss-classloading-xml-file/

     

        by refering, these links I removed out jboss-web.xml and jboss-app.xml from war file and updated the jboss-classloading.xml as follows:

     

        <?xml version="1.0" encoding="UTF-8"?>

        <!--See http://phytodata.wordpress.com/2010/10/21/demystifying-the-jboss5-jboss-classloading-xml-file-->

        <classloading xmlns="urn:jboss:classloading:1.0"

                  name="test.war"   

                  domain="test.war"

                  parent-domain="test.war"

                  parent-first="false"

                  export-all="NON_EMPTY"

                  import-all="true">

        </classloading>

     

        i kept domain and parent-domain as same because I wanted to read jars from test.war only.and not from other .war files.

     

         But by doing this I got following DeploymentException :

         =====================================================================================================

         11:13:00,977 ERROR [AbstractKernelController] Error installing to ClassLoader: name=vfs:///D:/NSA/jboss-6.0.0.20101110-CR1/server/default/deploy/test.war state=Describe mode=Manual requiredState=ClassLoader: org.jboss.deployers.spi.DeploymentException: Error creating classloader for vfs:///D:/NSA/jboss-6.0.0.20101110-CR1/server/default/deploy/test.war

        at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.0.Alpha8]

        at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.createClassLoader(AbstractDeploymentContext.java:591) [:2.2.0.Alpha8]

        at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit.createClassLoader(AbstractDeploymentUnit.java:166) [:2.2.0.Alpha8]

        at org.jboss.deployers.spi.deployer.helpers.AbstractClassLoaderDeployer.deploy(AbstractClassLoaderDeployer.java:53) [:2.2.0.Alpha8]

        at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.Alpha8]

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.Alpha8]

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.Alpha8]

        at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.Alpha8]

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

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

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

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

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

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

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

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

        at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.Alpha8]

        at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.Alpha8]

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

        at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.20101110-CR1]

        at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:130) [:0.1.0.Alpha1]

        at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:148) [:0.1.0.Alpha1]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        at org.jboss.profileservice.dependency.ProfileServiceController.activate(ProfileServiceController.java:188) [:0.1.0.Alpha1]

        at org.jboss.profileservice.AbstractProfileService.activateProfile(AbstractProfileService.java:170) [:0.1.0.Alpha1]

        at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:117) [:0.1.0.Alpha1]

        at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:89) [:0.1.0.Alpha1]

        at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:97) [:0.1.0.Alpha1]

        at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:130) [:6.0.0.20101110-CR1]

        at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.20101110-CR1]

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

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

        at java.lang.Thread.run(Thread.java:619) [:1.6.0_17]

    Caused by: java.lang.IllegalStateException: Parent domain: emhada.war does not exist.

        at org.jboss.classloader.spi.ClassLoaderSystem.registerClassLoaderPolicy(ClassLoaderSystem.java:451) [jboss-classloader.jar:2.2.0.Alpha9]

        at org.jboss.classloading.spi.dependency.policy.ClassLoaderPolicyModule.registerClassLoaderPolicy(ClassLoaderPolicyModule.java:146) [jboss-classloading.jar:2.2.0.Alpha9]

        at org.jboss.deployers.plugins.classloading.AbstractLevelClassLoaderSystemDeployer.createClassLoader(AbstractLevelClassLoaderSystemDeployer.java:126) [:2.2.0.Alpha8]

        at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.createClassLoader(AbstractDeploymentContext.java:577) [:2.2.0.Alpha8]

        ... 44 more

     


    =====================================================================================================

        Can you tell me where I am doing mistake?Is my configuration (jboss-classLoading.xml) right?

  • 3. Re: How to isolate ClassLoader in JBoss 6
    swapnil narvekar Newbie

    Hi,

            I modified jboss-classloading.xml as follows:

     

        <?xml version="1.0" encoding="UTF-8"?>

        <!--See http://phytodata.wordpress.com/2010/10/21/demystifying-the-jboss5-jboss-classloading-xml-file-->

        <classloading xmlns="urn:jboss:classloading:1.0"

                  name="test.war"   

                  domain="test"

                  parent-first="false"

                  export-all="NON_EMPTY"

                  import-all="true">

        </classloading>

     

             It helped to solve above mentioned excpetion.And because of this configuration I got rid of the Original Exception also which has been posted in very first post.

              Thanks for all..

     

           But because of this configuration I got another deployment Exception.I am posting this stack trace too.

           ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

         

    11:51:51,219 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=emhada.war#persistenceUnit state=Create: java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence cannot be cast to javax.persistence.spi.PersistenceProvider

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

        at org.jboss.as.jpa.scanner.HackCEMFBuilder.build(HackCEMFBuilder.java:49) [:6.0.0.20101110-CR1]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) [:2.2.0.Alpha8]

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

        at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.Alpha8]

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.Alpha8]

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.Alpha8]

        at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571) [:2.2.0.Alpha8]

        at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.Alpha8]

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

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

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

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

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

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

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

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

        at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.Alpha8]

        at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.Alpha8]

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

        at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.20101110-CR1]

        at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:130) [:0.1.0.Alpha1]

        at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:148) [:0.1.0.Alpha1]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        at org.jboss.profileservice.dependency.ProfileServiceController.activate(ProfileServiceController.java:188) [:0.1.0.Alpha1]

        at org.jboss.profileservice.AbstractProfileService.activateProfile(AbstractProfileService.java:170) [:0.1.0.Alpha1]

        at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:117) [:0.1.0.Alpha1]

        at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:89) [:0.1.0.Alpha1]

        at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:97) [:0.1.0.Alpha1]

        at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:130) [:6.0.0.20101110-CR1]

        at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.20101110-CR1]

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

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

        at java.lang.Thread.run(Thread.java:619) [:1.6.0_17]

     

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

     

          I observed that %JBOSS_HOME% \common\lib\hibernate-entitymanager.jar is getting conflicting with WEB-INF\lib\hibernate-entitymanager-3.6.3.Final.jar

     

           But how is this possible eventhough I have set domain="test" .

           Is My observation Correct ?

           Please correct me If I am doing mistake .

  • 4. Re: How to isolate ClassLoader in JBoss 6
    Ales Justin Master



        <?xml version="1.0" encoding="UTF-8"?>

        <!--See http://phytodata.wordpress.com/2010/10/21/demystifying-the-jboss5-jboss-classloading-xml-file-->

        <classloading xmlns="urn:jboss:classloading:1.0"

                  name="test.war"   

                  domain="test.war"

                  parent-domain="test.war"

                  parent-first="false"

                  export-all="NON_EMPTY"

                  import-all="true">

        </classloading>

     

        i kept domain and parent-domain as same because I wanted to read jars from test.war only.and not from other .war files.

    This is like you being you're own parent. ;-)

    Of course it doesn't exist, it's just being created. :-)

  • 5. Re: How to isolate ClassLoader in JBoss 6
    Ales Justin Master

          I observed that %JBOSS_HOME% \common\lib\hibernate-entitymanager.jar is getting conflicting with WEB-INF\lib\hibernate-entitymanager-3.6.3.Final.jar

     

           But how is this possible eventhough I have set domain="test" .

           Is My observation Correct ?

           Please correct me If I am doing mistake .

    This is a hard issue to solve with current CL architecture.

    Search for an existing long thread which goes into details about this same issue -- bundled own Hibernate.

  • 6. Re: How to isolate ClassLoader in JBoss 6
    swapnil narvekar Newbie

    Hi Ales,

    Thanks for the reply.

     

        How do I  bundle own hibernate in jboss

  • 7. Re: How to isolate ClassLoader in JBoss 6
    swapnil narvekar Newbie

    hi ,

    I searched on the forum and I have come up following steps :

     

    1. Configure jboss-web.xml and placed it in WEB-INF

     

    <?xml version="1.0" encoding="UTF-8"?>

    <jboss-web>

        <context-root>emhada</context-root>

        <class-loading java2ClassLoadingCompliance="false">

        <loader-repository>

        com.mastek:loader=test.war

        <loader-repository-config>java2ParentDelegation=false</loader-repository-config>

        </loader-repository>

        </class-loading>

        <resource-ref>

                 <res-ref-name>jdbc/testDS</res-ref-name>

                 <res-type>javax.sql.DataSource</res-type>

                 <jndi-name>java:/jndi/MyEntityManagerFactory</jndi-name>

        </resource-ref>

    </jboss-web>

     

     

    2. and I added following two lines in persistance.xml :


                <property name="hibernate.validator.apply_to_ddl" value="false"/>

                <property name="hibernate.validator.autoregister_listeners" value="false" />

     

     

    But  got following exception.

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    19:33:20,256 INFO  [STDOUT] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Invocation of init method failed; nested exception is java.lang.IllegalStateException: No JTA UserTransaction available - specify either 'userTransaction' or 'userTransactionName' or 'transactionManager' or 'transactionManagerName'

     

    19:33:20,256 INFO  [STDOUT]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)

     

    19:33:20,256 INFO  [STDOUT]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)

     

    19:33:20,256 INFO  [STDOUT]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)

     

    19:33:20,256 INFO  [STDOUT]     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)

     

    19:33:20,256 INFO  [STDOUT]     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

     

    19:33:20,256 INFO  [STDOUT]     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)

     

    19:33:20,256 INFO  [STDOUT]     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)

     

    19:33:20,256 INFO  [STDOUT]     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)

     

    19:33:20,272 INFO  [STDOUT]     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)

     

    19:33:20,272 INFO  [STDOUT]     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)

     

    19:33:20,272 INFO  [STDOUT]     at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)

     

    19:33:20,272 INFO  [STDOUT]     at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)

     

    19:33:20,272 INFO  [STDOUT]     at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)

     

    19:33:20,272 INFO  [STDOUT]     at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3369)

     

    19:33:20,272 INFO  [STDOUT]     at org.apache.catalina.core.StandardContext.start(StandardContext.java:3828)

     

    19:33:20,287 INFO  [STDOUT]     at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:312)

     

    19:33:20,287 INFO  [STDOUT]     at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:149)

     

    19:33:20,287 INFO  [STDOUT]     at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)

     

    19:33:20,287 INFO  [STDOUT]     at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)

     

    19:33:20,287 INFO  [STDOUT]     at org.jboss.web.deployers.WebModule.start(WebModule.java:95)

     

    19:33:20,287 INFO  [STDOUT]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

     

    19:33:20,287 INFO  [STDOUT]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

     

    19:33:20,287 INFO  [STDOUT]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

     

    19:33:20,303 INFO  [STDOUT]     at java.lang.reflect.Method.invoke(Method.java:597)

     

    19:33:20,303 INFO  [STDOUT]     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

     

    19:33:20,303 INFO  [STDOUT]     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

     

    19:33:20,303 INFO  [STDOUT]     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

     

    19:33:20,303 INFO  [STDOUT]     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271)

     

    19:33:20,303 INFO  [STDOUT]     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670)

     

    19:33:20,303 INFO  [STDOUT]     at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)

     

    19:33:20,303 INFO  [STDOUT]     at $Proxy41.start(Unknown Source)

     

    19:33:20,303 INFO  [STDOUT]     at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:53)

     

    19:33:20,319 INFO  [STDOUT]     at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:41)

     

    19:33:20,319 INFO  [STDOUT]     at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

     

    19:33:20,319 INFO  [STDOUT]     at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

     

    19:33:20,319 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

     

    19:33:20,334 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)

     

    19:33:20,334 INFO  [STDOUT]     at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:301)

     

    19:33:20,334 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)

     

    19:33:20,334 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)

     

    19:33:20,334 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)

     

    19:33:20,334 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)

     

    19:33:20,334 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)

     

    19:33:20,334 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:894)

     

    19:33:20,350 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:641)

     

    19:33:20,350 INFO  [STDOUT]     at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:182)

     

    19:33:20,350 INFO  [STDOUT]     at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:58)

     

    19:33:20,350 INFO  [STDOUT]     at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

     

    19:33:20,365 INFO  [STDOUT]     at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)

     

    19:33:20,365 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)

     

    19:33:20,365 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832)

     

    19:33:20,365 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550)

     

    19:33:20,365 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571)

     

    19:33:20,365 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491)

     

    19:33:20,381 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)

     

    19:33:20,381 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)

     

    19:33:20,381 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)

     

    19:33:20,381 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)

     

    19:33:20,381 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)

     

    19:33:20,381 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)

     

    19:33:20,381 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939)

     

    19:33:20,381 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654)

     

    19:33:20,397 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983)

     

    19:33:20,397 INFO  [STDOUT]     at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076)

     

    19:33:20,397 INFO  [STDOUT]     at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679)

     

    19:33:20,397 INFO  [STDOUT]     at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106)

     

    19:33:20,459 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:130)

     

    19:33:20,459 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:148)

     

    19:33:20,459 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94)

     

    19:33:20,459 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)

     

    19:33:20,459 INFO  [STDOUT]     at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)

     

    19:33:20,459 INFO  [STDOUT]     at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

     

    19:33:20,459 INFO  [STDOUT]     at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

     

    19:33:20,475 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

     

    19:33:20,475 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379)

     

    19:33:20,475 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044)

     

    19:33:20,475 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083)

     

    19:33:20,475 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322)

     

    19:33:20,475 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246)

     

    19:33:20,475 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139)

     

    19:33:20,475 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939)

     

    19:33:20,490 INFO  [STDOUT]     at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654)

     

    19:33:20,490 INFO  [STDOUT]     at org.jboss.profileservice.dependency.ProfileServiceController.activate(ProfileServiceController.java:188)

     

    19:33:20,490 INFO  [STDOUT]     at org.jboss.profileservice.AbstractProfileService.activateProfile(AbstractProfileService.java:170)

     

    19:33:20,490 INFO  [STDOUT]     at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:117)

     

    19:33:20,490 INFO  [STDOUT]     at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:89)

     

    19:33:20,490 INFO  [STDOUT]     at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:97)

     

    19:33:20,506 INFO  [STDOUT]     at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:130)

     

    19:33:20,506 INFO  [STDOUT]     at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56)

     

    19:33:20,506 INFO  [STDOUT]     at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827)

     

    19:33:20,506 INFO  [STDOUT]     at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417)

     

    19:33:20,522 INFO  [STDOUT]     at java.lang.Thread.run(Thread.java:619)

     

    19:33:20,522 INFO  [STDOUT] Caused by: java.lang.IllegalStateException: No JTA UserTransaction available - specify either 'userTransaction' or 'userTransactionName' or 'transactionManager' or 'transactionManagerName'

     

    19:33:20,522 INFO  [STDOUT]     at org.springframework.transaction.jta.JtaTransactionManager.checkUserTransactionAndTransactionManager(JtaTransactionManager.java:473)

     

    19:33:20,522 INFO  [STDOUT]     at org.springframework.transaction.jta.JtaTransactionManager.afterPropertiesSet(JtaTransactionManager.java:413)

     

    19:33:20,522 INFO  [STDOUT]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)

     

    19:33:20,522 INFO  [STDOUT]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)

     

    19:33:20,522 INFO  [STDOUT]     ... 91 more

     

     

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    I am trying to find out the solution but It would be nice If  you give me a hint to get rid of these exception

  • 8. Re: How to isolate ClassLoader in JBoss 6
    Ales Justin Master

    You're missing this in your spring xml:

     

    19:33:20,256 INFO  [STDOUT] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Invocation of init method failed; nested exception is java.lang.IllegalStateException: No JTA UserTransaction available - specify either 'userTransaction' or 'userTransactionName' or 'transactionManager' or 'transactionManagerName'

  • 9. Re: How to isolate ClassLoader in JBoss 6
    swapnil narvekar Newbie

    Hi Ales ,

    Thanks fro a reply.

     

    Actually I have made following changes in jboss-classloading.xml.

    and it helped to got rid of this exception.

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    <?xml version="1.0" encoding="UTF-8"?>

    <!--See http://phytodata.wordpress.com/2010/10/21/demystifying-the-jboss5-jboss-classloading-xml-file-->

    <classloading xmlns="urn:jboss:classloading:1.0"

                  name="test.war"   

                  domain="test"

                  parent-first="false"

                  export-all="NON_EMPTY"

                  import-all="true">

        <parent-policy>

          <before-filter>

           <javabean xmlns="urn:jboss:javabean:2.0" class="org.jboss.classloader.plugins.filter.NegatingClassFilter">

            <constructor>

             <parameter>

              <javabean xmlns="urn:jboss:javabean:2.0" class="org.jboss.classloader.spi.filter.PackageClassFilter">

               <constructor>

                <parameter>org.hibernate,org.apache.commons.collections,com.sun.mail.smtp</parameter>

               </constructor>

              </javabean>

             </parameter>

            </constructor>

           </javabean>

          </before-filter>

        </parent-policy>             

    </classloading>

     

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

     

    after making these changes my web application deployed successfully.

    But when I tried to login into my web-application by login-form it gave an excpetion. java.lang.LinkageError : LoaderConstraintException


    please refer the link where I mentioned the complete scenario.

    http://community.jboss.org/message/640547#640547

     

    I request you to read that scenario.

     

     


  • 10. Re: How to isolate ClassLoader in JBoss 6
    swapnil narvekar Newbie

    Hi all..

            above mentioned error comes because of two instances of classloader loads that class - org.hibernate.Transaction.

     

            Can you tell the way to avoid loading of same class by two classloader.?

     

         Any property do I set in jboss-classloading.xml to use only one instance of  classLoader to resolve it.

     

                But I dont understand How two classloaders come into the picture.