[jboss-user] [Spring Integration] New message: "Issue with LoadTimeWeaver"

David Webster do-not-reply at jboss.com
Wed Feb 10 11:53:54 EST 2010


User development,

A new message was posted in the thread "Issue with LoadTimeWeaver":

http://community.jboss.org/message/525504#525504

Author  : David Webster
Profile : http://community.jboss.org/people/dawebster

Message:
--------------------------------------------------------------
Trying to get a fairly simple .war file to deploy that runs fine in JBoss EWS (Tomcat).  This is a Spring JPA application, thus needing the LoadTimeWeaving classloading mechanism.  Pretty simple in JBoss EWS but have some trouble in JBoss EAP 5.0.1
 
Followed all the instructions here, put the jars on the server classpath.  Here is the Spring config for the database/JPA portion:
 
    <context:load-time-weaver weaver-class="org.jboss.instrument.classloading.JBoss5LoadTimeWeaver"/>
    <!--                Define below if using database                -->
    <!-- ============================================================ -->
    <!-- Define a datasource via jndi                                 -->
    <!-- ============================================================ -->
    <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
       <property name="jndiName" value="java:com.uprr.app.jbs.inventoryPoolTXDS"/>
    </bean>
    
    <!-- ============================================================ -->
    <!-- entityManagerFactory via a jndi lookup   -->
    <!-- ============================================================ -->
    <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
        <property name="persistenceUnitName" value="jbs_jpalib"/>
        <property name="dataSource" ref="dataSource"/>
    </bean>
 
    <!-- ============================================================ -->
    <!-- TransactionManager bean configuration                        -->
    <!-- ============================================================ -->
    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
        <property name="entityManagerFactory" ref="entityManagerFactory"/>
        <property name="nestedTransactionAllowed" value="true"/>
    </bean>
    <tx:annotation-driven transaction-manager="transactionManager"/>
 
After deploying the app, during Spring initialization I get the following error....seems almost like ClassCast type issue:
 
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name org.springframework.transaction.config.internalTransactionAdvisor': Cannot create inner bean '(inner bean)' of type [org.springframework.transaction.interceptor.TransactionInterceptor] while
setting bean property 'transactionInterceptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean
with name '(inner bean)': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exceptio
n is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in ServletContext resour
ce [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory';
 nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in Ser
vletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.Bean
NotOfRequiredTypeException: Bean named 'loadTimeWeaver' must be of type [org.springframework.instrument.classloading.LoadTimeWeaver], but was actually of type [org.jboss.instrument.classloading.JBoss5LoadTimeWeaver]
.
.
Big Stack Trace
.
.
.
 
 
 
Am I missing something fundamental?  thanks for any input...

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/525504#525504




More information about the jboss-user mailing list