Error creating bean with name 'transactionManager' defined in file

2009-12-15 16:11:09 [ERROR]-[org.springframework.web.context.ContextLoader] Context initialization Failed

 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in file [F:/workspace/.Metadata/.plugins/org.eclipse.wst.server.core/tmp6/wtpwebapps/CcsReport/WEB-INF/classes/applicationContext-resources.xml]: Invocation of init method Failed; nested exception is java.lang.IllegalStateException: No JTA UserTransaction available - specify either 'userTransaction' or 'userTransactionName' or 'transactionManager' or 'transactionManagerName'

    at org.springframework.beans.factory.support.AbstractAutowireCapablebeanfactory.initializeBean(AbstractAutowireCapablebeanfactory.java:1338)

    at org.springframework.beans.factory.support.AbstractAutowireCapablebeanfactory.doCreateBean(AbstractAutowireCapablebeanfactory.java:473)

    at org.springframework.beans.factory.support.AbstractAutowireCapablebeanfactory$1.run(AbstractAutowireCapablebeanfactory.java:409)

    at java.security.AccessController.doPrivileged(Native Method)

    at org.springframework.beans.factory.support.AbstractAutowireCapablebeanfactory.createBean(AbstractAutowireCapablebeanfactory.java:380)

    at org.springframework.beans.factory.support.Abstractbeanfactory$1.getobject(Abstractbeanfactory.java:264)

    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

    at org.springframework.beans.factory.support.Abstractbeanfactory.doGetBean(Abstractbeanfactory.java:261)

    at org.springframework.beans.factory.support.Abstractbeanfactory.getBean(Abstractbeanfactory.java:185)

    at org.springframework.beans.factory.support.Abstractbeanfactory.getBean(Abstractbeanfactory.java:164)

    at org.springframework.beans.factory.support.DefaultListablebeanfactory.preInstantiateSingletons(DefaultListablebeanfactory.java:429)

    at org.springframework.context.support.AbstractApplicationContext.finishbeanfactoryInitialization(AbstractApplicationContext.java:728)

    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)

    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)

    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)

    at org.springframework.web.context.ContextLoaderListener.contextinitialized(ContextLoaderListener.java:45)

    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)

    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)

    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)

    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

    at org.apache.catalina.core.StandardService.start(StandardService.java:516)

    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(UnkNown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(UnkNown Source)

    at java.lang.reflect.Method.invoke(UnkNown Source)

    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)

    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Caused by: java.lang.IllegalStateException: No JTA UserTransaction available - specify either 'userTransaction' or 'userTransactionName' or 'transactionManager' or 'transactionManagerName'

    at org.springframework.transaction.jta.JtaTransactionManager.checkUserTransactionAndTransactionManager(JtaTransactionManager.java:492)

    at org.springframework.transaction.jta.JtaTransactionManager.afterPropertiesSet(JtaTransactionManager.java:432)

    at org.springframework.beans.factory.support.AbstractAutowireCapablebeanfactory.invokeInitMethods(AbstractAutowireCapablebeanfactory.java:1369)

    at org.springframework.beans.factory.support.AbstractAutowireCapablebeanfactory.initializeBean(AbstractAutowireCapablebeanfactory.java:1335)

    ... 30 more

09-12-15 16:11:09 () StandardContext.listenerStart : Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in file [F:/workspace/.Metadata/.plugins/org.eclipse.wst.server.core/tmp6/wtpwebapps/CcsReport/WEB-INF/classes/applicationContext-resources.xml]: Invocation of init method Failed; nested exception is java.lang.IllegalStateException: No JTA UserTransaction available - specify either 'userTransaction' or 'userTransactionName' or 'transactionManager' or 'transactionManagerName'

    at org.springframework.beans.factory.support.AbstractAutowireCapablebeanfactory.initializeBean(AbstractAutowireCapablebeanfactory.java:1338)

    at org.springframework.beans.factory.support.AbstractAutowireCapablebeanfactory.doCreateBean(AbstractAutowireCapablebeanfactory.java:473)

    at org.springframework.beans.factory.support.AbstractAutowireCapablebeanfactory$1.run(AbstractAutowireCapablebeanfactory.java:409)

    at java.security.AccessController.doPrivileged(Native Method)

    at org.springframework.beans.factory.support.AbstractAutowireCapablebeanfactory.createBean(AbstractAutowireCapablebeanfactory.java:380)

    at org.springframework.beans.factory.support.Abstractbeanfactory$1.getobject(Abstractbeanfactory.java:264)

    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

    at org.springframework.beans.factory.support.Abstractbeanfactory.doGetBean(Abstractbeanfactory.java:261)

    at org.springframework.beans.factory.support.Abstractbeanfactory.getBean(Abstractbeanfactory.java:185)

    at org.springframework.beans.factory.support.Abstractbeanfactory.getBean(Abstractbeanfactory.java:164)

    at org.springframework.beans.factory.support.DefaultListablebeanfactory.preInstantiateSingletons(DefaultListablebeanfactory.java:429)

    at org.springframework.context.support.AbstractApplicationContext.finishbeanfactoryInitialization(AbstractApplicationContext.java:728)

    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)

    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)

    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)

    at org.springframework.web.context.ContextLoaderListener.contextinitialized(ContextLoaderListener.java:45)

    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)

    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)

    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)

    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

    at org.apache.catalina.core.StandardService.start(StandardService.java:516)

    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(UnkNown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(UnkNown Source)

    at java.lang.reflect.Method.invoke(UnkNown Source)

    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)

    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Caused by: java.lang.IllegalStateException: No JTA UserTransaction available - specify either 'userTransaction' or 'userTransactionName' or 'transactionManager' or 'transactionManagerName'

    at org.springframework.transaction.jta.JtaTransactionManager.checkUserTransactionAndTransactionManager(JtaTransactionManager.java:492)

    at org.springframework.transaction.jta.JtaTransactionManager.afterPropertiesSet(JtaTransactionManager.java:432)

    at org.springframework.beans.factory.support.AbstractAutowireCapablebeanfactory.invokeInitMethods(AbstractAutowireCapablebeanfactory.java:1369)

    at org.springframework.beans.factory.support.AbstractAutowireCapablebeanfactory.initializeBean(AbstractAutowireCapablebeanfactory.java:1335)

    ... 30 more

09-12-15 16:11:09 () StandardContext.start : Error listenerStart

09-12-15 16:11:09 () StandardContext.start : Context [] startup Failed due to prevIoUs errors

09-12-15 16:11:09 () ApplicationContext.log : Closing Spring root WebApplicationContext

09-12-15 16:11:10 () Http11Protocol.start : Starting Coyote HTTP/1.1 on http-8080

09-12-15 16:11:10 () ChannelSocket.init : JK: ajp13 listening on /0.0.0.0:8009

09-12-15 16:11:10 () JkMain.start : Jk running ID=0 time=0/30  config=null

09-12-15 16:11:10 () Catalina.start : Server startup in 3790 ms

 

 

 

 

 解决方案 tomcat

 

Context.xml

 

 

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

<!--

  Licensed to the Apache Software Foundation (ASF) under one or more

  contributor license agreements.  See the NOTICE file distributed with

  this work for additional information regarding copyright ownership.

  The ASF licenses this file to You under the Apache License,Version 2.0

  (the "License"); you may not use this file except in compliance with

  the License.  You may obtain a copy of the License at

 

      http://www.apache.org/licenses/LICENSE-2.0

 

  Unless required by applicable law or agreed to in writing,software

  distributed under the License is distributed on an "AS IS" BASIS,

  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,either express or implied.

  See the License for the specific language governing permissions and

  limitations under the License.

--><!-- The contents of this file will be loaded for each web application --><Context>

 

    <!-- Default set of monitored resources -->

    <WatchedResource>WEB-INF/web.xml</WatchedResource>

   

    <!-- Uncomment this to disable session persistence across Tomcat restarts -->

    <!--

    <Manager pathname="" />

    -->

 

    <!-- Uncomment this to enable Comet connection tacking (provides events

         on session expiration as well as webapp lifecycle) -->

    <!--

    <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />

    -->

 

  <Resource name="jdbc/xxx"

           auth="Container"

            type="javax.sql.DataSource"

           username="sa"

           password="sa"

            driverClassName="net.sourceforge.jtds.jdbc.Driver"

            url="jdbc:jtds:sqlserver://192.168.0.10:1433;DatabaseName=kugou"

            maxActive="8"

            maxIdle="4"/>

           

    <Transaction factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>

</Context>

相关文章

SELECT a.*,b.dp_name,c.pa_name,fm_name=(CASE WHEN a.fm_n...
if not exists(select name from syscolumns where name=&am...
select a.*,pano=a.pa_no,b.pa_name,f.dp_name,e.fw_state_n...
要在 SQL Server 2019 中设置定时自动重启,可以使用 Window...
您收到的错误消息表明数据库 &#39;EastRiver&#39; 的...
首先我需要查询出需要使用SQL Server Profiler跟踪的数据库标...