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