[jboss-user] [JBoss Microcontainer] - Re: How to isolate ClassLoader in JBoss 6

swapnil narvekar do-not-reply at jboss.com
Wed Dec 7 09:12:17 EST 2011


swapnil narvekar [http://community.jboss.org/people/swapnil_narya] created the discussion

"Re: How to isolate ClassLoader in JBoss 6"

To view the discussion, visit: http://community.jboss.org/message/640316#640316

--------------------------------------------------------------
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+
+
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/640316#640316]

Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2114]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111207/a47cb28b/attachment-0001.html 


More information about the jboss-user mailing list