It smells like there is a different version of Hibernate deployed with your JBoss installation that is being used rather than the Appfuse libraries. I am not sure how that happens, but I know JBoss and Hibernate are really close friends and could be packaged together. Do you get a similar error in Tomcat? The issue is not with the transaction manager but with how Hibernate is handling your annotated classes.

-Dusty


On Aug 4, 2008, at 6:51 AM, ensoreus wrote:


Hi,

      I am using AppFuse version 2.0.2. When I try to deploy the
application on JBoss I get the following error:

ERROR [ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name
'org .springframework.transaction.interceptor.TransactionInterceptor#0': Cannot resolve reference to bean 'transactionManager' while setting bean
property 'transactionManager'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'transactionManager' defined in class path resource
[applicationContext-dao.xml]: Cannot resolve reference to bean
'sessionFactory' while setting bean property 'sessionFactory'; nested
exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource
[applicationContext-dao.xml]: Invocation of init method failed; nested
exception is org.hibernate.AnnotationException:
java.lang.NoSuchMethodException:
org.hibernate.validator.ClassValidator.<init>(java.lang.Class,
java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator,
java.util.
Map, org.hibernate.annotations.common.reflection.ReflectionManager)

I am using an Oracle db 10g. The data source bean is declared as follows:
   <jee:jndi-lookup id="dataSource" jndi-name="java:AuctionDS"/>

 The auction-ds.xml in JBoss instance /deploy folder is:

<datasources>
  <local-tx-datasource>

<!-- The jndi name of the DataSource, it is prefixed with java:/ --> <!-- Datasources are not available outside the virtual machine -->
     <jndi-name>AuctionDS</jndi-name>

<connection-url>jdbc:oracle:thin:@localhost:1521:oracle</connection- url>
     <driver-class>oracle.jdbc.OracleDriver</driver-class>
     <user-name>auction</user-name>
     <password>****</password>
     <min-pool-size>5</min-pool-size>
     <max-pool-size>20</max-pool-size>

  </local-tx-datasource>
 </datasources>

  The transaction manager bean is declared as:
   <!-- Transaction manager for a single Hibernate SessionFactory
(alternative to JTA) -->
   <bean id="transactionManager"

class ="org.springframework.orm.hibernate3.HibernateTransactionManager">
       <property name="sessionFactory" ref="sessionFactory"/>
   </bean>

What am I doing wrong? Why does the application deploy fine on Jetty Server with the Spring pooled data source, but doesn't work with a JNDI data
source in JBOSS?
   Any help at all would be highly appreciated.
   Thanks.

Andrei

--
View this message in context: 
http://www.nabble.com/Problems-trying-to-deploy-AppFuse-on-JBoss-tp18811689s2369p18811689.html
Sent from the AppFuse - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to