Announcement Announcement Module
Collapse
No announcement yet.
HibernateTransactionManager Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • HibernateTransactionManager

    i execute my program, get the following errorjava.lang.NoSuchMethodErrororg.springframewor k.orm.hibernate3.HibernateTransactionManager

    ************************************************** *********

    alpha:/var/apache-tomcat-7.0.34/logs # env | grep CLASSPATH

    CLASSPATH=/usr/java/jdk1.6.0/lib/dt.jar:/usr/java/jdk1.6.0/lib/tools.jar:/var/apache-tomcat-7.0.34/lib:/var/apache-tomcat-7.0.34/lib/jsp-api.jar:/var/apache-tomcat-7.0.34/lib/servlet-api.jar:/var/apache-tomcat-7.0.34/lib/mysql-connector-java-5.0.5-bin.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-convention-plugin-2.3.7.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-core-2.3.7.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/xwork-core-2.3.7.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-io-2.0.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-lang3-3.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-logging-1.1.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/hibernate3.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/dom4j-1.6.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/slf4j-api-1.6.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/commons-collections-3.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/jta-1.1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/antlr-2.7.6.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/javassist-3.12.0.GA.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/struts2-spring-plugin-2.3.7.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/spring-core-3.0.5.RELEASE.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/spring-web-3.0.5.RELEASE.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/spring-context-3.0.5.RELEASE.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/spring-beans-3.0.5.RELEASE.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/spring-asm-3.0.5.RELEASE.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/spring-aop-3.0.5.RELEASE.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/spring-expression-3.0.5.RELEASE.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/spring-dao-2.0-rc1.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib:/spring-jdbc-3.2.0.RC2.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/spring-tx-3.2.0.RC2.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/aopalliance-1.0.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/spring-aspects-3.2.0.RC2.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/asm-commons-3.3.jar:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib/spring-orm-3.2.0.RC2.jar



    ************************************************** *************************************

    alpha:/var/apache-tomcat-7.0.34/webapps/ecommerce/WEB-INF/lib # ls *.jar

    antlr-2.7.6.jar commons-lang-2.4.jar mchange-commons-java-0.2.3.3.jar spring-expression-3.0.5.RELEASE.jaraopalliance-1.0.jar commons-lang3-3.1.jar ognl-3.0.5.jar spring-jdbc-3.2.0.RC2.jaraopalliance-alpha1.jar commons-logging-1.1.1.jar slf4j-api-1.6.1.jar spring-orm-3.2.0.RC2.jarasm-3.3.jar dom4j-1.6.1.jar spring-aop-3.0.5.RELEASE.jar spring-test-3.0.5.RELEASE.jarasm-commons-3.3.jar freemarker-2.3.19.jar spring-asm-3.0.5.RELEASE.jar spring-tx-3.2.0.RC2.jaraspectjweaver-1.6.6.jar hibernate-jpa-2.0-api-1.0.1.Final.jar spring-aspects-3.2.0.RC2.jar spring-web-3.0.5.RELEASE.jarc3p0-0.9.2-pre8.jar hibernate3.jar spring-beans-3.0.5.RELEASE.jar struts2-convention-plugin-2.3.7.jarcommons-collections-3.1.jar javassist-3.11.0.GA.jar spring-context-3.0.5.RELEASE.jar struts2-core-2.3.7.jarcommons-fileupload-1.2.2.jar javassist-3.12.0.GA.jar spring-core-3.0.5.RELEASE.jar struts2-spring-plugin-2.3.7.jarcommons-io-2.0.1.jar jta-1.1.jar spring-dao-2.0-rc1.jar xwork-core-2.3.7.jar


    ************************************************** *******************************************

    applicationContext.xml

    <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schem...ring-beans.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schem...ing-tx-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">

    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">....</bean>

    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSes sionFactoryBean"> <property name="dataSource" ref="dataSource"/> <property name="mappingResources"> <list> <value>Acctsecurity.hbm.xml</value> </list> </property></bean>

    <bean id="loginAction" class="neuco.AcctAction" scope="prototype"> <property name="mgr" ref="acctmgr"/></bean>

    <bean id="acctsecurityDao" class="neuco.AcctsecurityDaoHibernate"> <property name="sessionFactory" ref="sessionFactory"/></bean>

    <bean id="acctmgr" class="neuco.AcctManagerImpl"> <property name="acctsecurityDao" ref="acctsecurityDao"/></bean>

    <bean id="transactionManager" class="org.springframework.orm.hibernate3.Hibernat eTransactionManager"> <property name="sessionFactory" ref="sessionFactory"/></bean>

    <tx:advice id="txAdvice" transaction-manager="transactionManager"> <tx:attributes>

    <tx:method name="get*" read-only="true"/>

    <tx:method name="*"/> </tx:attributes>

    </tx:advice>

    <aop:config> <aopointcut id="leePointcut" expression="execution(* neuco.*Impl.*(..))"/> <aop:advisor advice-ref="txAdvice" pointcut-ref="leePointcut"/></aop:config>

    </beans>~
    Last edited by sh_thorn_bird; Mar 5th, 2013, 12:51 AM.

  • #2
    Please use [ code][/code ] tags when posting code/xml/stacktraces that way it remains readable. I removed the other posts which needed approval...

    You are mixing different spring versions don't do that you have both 3.0.5 and 3.2.0 in your classpath either use 3.0.5 or 3.2.0 don't use both.

    Comment

    Working...
    X