ssh weblogic jndi

望各位帮帮忙,在使用JNDI作为数据源时回报错:

下面是配置文件:

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd" default-autowire="byName" default-lazy-init="true">


class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">


classpath*:config/jdbc.properties
classpath*:config/hibernate.properties







pointcut="execution(* oms.service..*.*(..))"
advice-ref="txAdvice" />



pointcut="execution(* oms.service.scan.impl.*Service*.*(..))"
advice-ref="txAdvice" />









class="org.springframework.jndi.JndiObjectFactoryBean">

${DataSource.JNDI}


false



${DataSource.factory}
${DataSource.url}
${DataSource.user}
${DataSource.pwd}





class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">



classpath*:/net/northking/oms/entity





${hibernate.dialect}


${hibernate.show_sql}







class="org.springframework.orm.hibernate3.HibernateTransactionManager">




class="org.springframework.jdbc.core.JdbcTemplate">







在一个service中调用另一个service中的save方法后就会报错。
报错信息:
org.springframework.transaction.IllegalTransactionStateException: Pre-bound JDBC Connection found! HibernateTransactionManager does not support running within DataSourceTransactionManager if told to manage the DataSource itself. It is recommended to use a single HibernateTransactionManager for all transactions on a single DataSource, no matter whether Hibernate or JDBC access.
at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:427)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:350)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:262)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:101)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631)
at net.northking.oms.service.scan.impl.SdiBmsArcAccountServiceImpl$$EnhancerByCGLIB$$3347cb1d.saveSdiBmsArc()
at net.northking.oms.service.scan.impl.SdiArcArchiveToEcmServiceImpl.sdiArcArchiveToEcm(SdiArcArchiveToEcmServiceImpl.java:84)
at net.northking.oms.service.scan.impl.SdiArcArchiveToEcmServiceImpl$$FastClassByCGLIB$$e336bdb7.invoke()
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631)
at net.northking.oms.service.scan.impl.SdiArcArchiveToEcmServiceImpl$$EnhancerByCGLIB$$cae5997c.sdiArcArchiveToEcm()
Hibernate: update SDI_BMS_ARC set CODE=?, NAME=?, DESCRIPTION=?, TYPE=?, INDEX_NO=?, STATUS=?, STATUS_CODE=?, PARENT_ID=?, CREATEOR=?, CREATE_TIME=?, PRIORITY=?, ORG_CODE=?, TELLER_CODE=?, TR_DATE=?, IMAGE_NUM=?, FRONT_NUM=?, DOC_NUM=?, CAPTURER=?, CAPTURE_TIME=?, INPUTER=?, INPUT_TIME=?, OCR_SERVER_ID=?, AUTO_MATCH_SERVER_ID=?, AUDIT_OK_NUM=?, EXCEPTION_REASON=?, IS_NEED_AUTO_MATCH=?, CHECK_IMAGE_TOTAL_FILES=?, CHECK_IMAGE_TOTAL_DB=? where ID=?
at net.northking.oms.struts.action.scan.daemon.SdiAutoUpdateCatelogToDfc.run(SdiAutoUpdateCatelogToDfc.java:46)

你可能感兴趣的:(ssh weblogic jndi)