You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by rmattler <Ro...@gmail.com> on 2008/02/15 22:13:32 UTC

Spring applicationContext.xml error

I'm trying to get a Hibernate Spring Wicket app working and I'm stuck.  Don't
know where to start.  Any help would be appreciated.  If this is the wrong
forum let me know.  Thanks is advance.  

I'm get the following error:

Error creating bean with name 'txManagerBean' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
'entMgrFactoryBean' while setting bean property 'entityManagerFactory';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'entMgrFactoryBean' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Invocation of init method
failed; nested exception is java.lang.NoClassDefFoundError:
org/objectweb/asm/MethodVisitor


Here is my applicationContext.xml File:


	<bean
		id="txManagerBean"
		class="org.springframework.orm.jpa.JpaTransactionManager">
		<property
			name="entityManagerFactory" 
			ref="entMgrFactoryBean"/>
	</bean>
	<bean
		id="entMgrFactoryBean"
		class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
		<property
			name="persistenceUnitName" 
			value="bank"/>
	</bean>
	<tx:annotation-driven transaction-manager="txManagerBean"/>
		
	<bean
class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>

	<bean id="customerDAO"
		class="com.xxx.bank.DAO.HibernateCustomerDAO">
	</bean>

-- 
View this message in context: http://www.nabble.com/Spring-applicationContext.xml-error-tp15510193p15510193.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Spring applicationContext.xml error

Posted by James Carman <ja...@carmanconsulting.com>.
You need to check your classpath.  The asm library is required for
Hibernate.  Download hibernate and check the lib directory.  It has a
file that explains when/why you need certain dependencies.

On 2/15/08, rmattler <Ro...@gmail.com> wrote:
>
>  I'm trying to get a Hibernate Spring Wicket app working and I'm stuck.  Don't
>  know where to start.  Any help would be appreciated.  If this is the wrong
>  forum let me know.  Thanks is advance.
>
>  I'm get the following error:
>
>  Error creating bean with name 'txManagerBean' defined in ServletContext
>  resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
>  'entMgrFactoryBean' while setting bean property 'entityManagerFactory';
>  nested exception is org.springframework.beans.factory.BeanCreationException:
>  Error creating bean with name 'entMgrFactoryBean' defined in ServletContext
>  resource [/WEB-INF/applicationContext.xml]: Invocation of init method
>  failed; nested exception is java.lang.NoClassDefFoundError:
>  org/objectweb/asm/MethodVisitor
>
>
>  Here is my applicationContext.xml File:
>
>
>         <bean
>                 id="txManagerBean"
>                 class="org.springframework.orm.jpa.JpaTransactionManager">
>                 <property
>                         name="entityManagerFactory"
>                         ref="entMgrFactoryBean"/>
>         </bean>
>         <bean
>                 id="entMgrFactoryBean"
>                 class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
>                 <property
>                         name="persistenceUnitName"
>                         value="bank"/>
>         </bean>
>         <tx:annotation-driven transaction-manager="txManagerBean"/>
>
>         <bean
>  class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
>
>         <bean id="customerDAO"
>                 class="com.xxx.bank.DAO.HibernateCustomerDAO">
>         </bean>
>
>
>  --
>  View this message in context: http://www.nabble.com/Spring-applicationContext.xml-error-tp15510193p15510193.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org