struts+spring+hibernate的问题,请教高手,多谢!!!!

llyjava 2005-07-18 06:25:59
采用了struts+spring+hibernate框架,采用了org.springframework.transaction.jta.JtaTransactionManager管理事务,采用了xa驱动,设置了支持本地事务,Supports Local Transaction,可是运行后,出现了如下错误,这是什么原因,谢谢?
[net.sf.hibernate.util.JDBCExceptionReporter]-[WARN] SQL Error: -6, SQLState:
2005-07-13 18:06:43,921 [net.sf.hibernate.util.JDBCExceptionReporter]-[ERROR] XA error: XAER_PROTO : Routine was invoked in an inproper context start() failed on resource 'myPool': XAER_PROTO : Routine was invoked in an inproper context
javax.transaction.xa.XAException
at oracle.jdbc.xa.OracleXAResource.disallowLocalTxnMode(OracleXAResource.java:1047)
at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:153)
at weblogic.jdbc.wrapper.VendorXAResource.start(VendorXAResource.java:50)
at weblogic.jdbc.jta.DataSource.start(DataSource.java:604)
at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1069)
at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1001)
at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:203)
at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:419)
at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1230)
at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1193)
at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:371)
at weblogic.jdbc.jta.DataSource.connect(DataSource.java:329)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:298)
at org.springframework.orm.hibernate.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:75)
at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3264)
at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3244)
at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:65)
at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:704)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:185)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:950)
at net.sf.hibernate.loader.Loader.list(Loader.java:941)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1512)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
at org.springframework.orm.hibernate.HibernateTemplate$24.doInHibernate(HibernateTemplate.java:620)
at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:312)
at org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:616)
at com.jandar.services.dao.hibernate.GgPoliceInfoDAOImpl.findPoliceinfo(GgPoliceInfoDAOImpl.java:32)
at com.jandar.services.spring.business.GgBusinessAppyTempImpl.queryPoliceinfo(GgBusinessAppyTempImpl.java:1210)
at com.jandar.services.spring.business.GgBusinessAppyTempImpl.findPoliceInfo(GgBusinessAppyTempImpl.java:969)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:282)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
at $Proxy41.findPoliceInfo(Unknown Source)
at com.jandar.struts.action.GgPoliceInfoQueryAction.execute(GgPoliceInfoQueryAction.java:78)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at com.jandar.sys.EncodeActionServlet.process(EncodeActionServlet.java:36)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1053)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:387)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6310)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3622)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2569)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
...全文
527 点赞 收藏 6
写回复
6 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
wxw850227 2005-12-08
顶!~
回复
whyxx 2005-12-06
weblogic要想支持XA的话,是要专门购买lisence的,免费的开发版是不支持的
回复
cnyxlxw 2005-11-28
up
回复
daizs 2005-11-26
看看數據源是否有問題!
回复
llyjava 2005-07-19
ding
回复
llyjava 2005-07-18
数据库是oracle,应用服务器是weblogic的。
回复
相关推荐
发帖
Java
创建于2007-09-28

4.7w+

社区成员

Java相关技术讨论
申请成为版主
帖子事件
创建了帖子
2005-07-18 06:25
社区公告
暂无公告