Error creating bean with name 'sessionFactory'

Posted by Sunny Mate on Stack Overflow See other posts from Stack Overflow or by Sunny Mate
Published on 2010-03-30T02:33:34Z Indexed on 2010/03/30 5:03 UTC
Read the original article Hit count: 370

Filed under:
|

hi i am getting the following exception while running my application and my applicationContext.xml is

<?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:p="http://www.springframework.org/schema/p"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">


    <bean id="dataSource"
        class="org.apache.commons.dbcp.BasicDataSource">
        <property name="driverClassName"
            value="com.mysql.jdbc.Driver">
        </property>
        <property name="url" value="jdbc:mysql://localhost/SureshDB"></property>
        <property name="username" value="root"></property>
        <property name="password" value="root"></property>
    </bean>
    <bean id="sessionFactory"
        class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        <property name="dataSource">
            <ref bean="dataSource" />
        </property>
        <property name="hibernateProperties">
            <props>
                <prop key="hibernate.dialect">
                    org.hibernate.dialect.MySQLDialect
                </prop>
            </props>
        </property>
        <property name="mappingResources">
            <list>
                <value>com/jsfcompref/register/UserTa.hbm.xml</value></list>
        </property></bean>
    <bean id="UserTaDAO" class="com.jsfcompref.register.UserTaDAO">
        <property name="sessionFactory">
            <ref bean="sessionFactory" />
        </property>
    </bean>

    <bean id="UserTaService" class="com.jsfcompref.register.UserTaServiceImpl">
        <property name="userTaDao">
            <ref bean="UserTaDAO"/>
        </property>
    </bean>

    </beans>

Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V

any suggestion would be heplful

© Stack Overflow or respective owner

Related posts about spring

Related posts about java