Hi,
I got an exception when deploying my application to Jboss:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: jndi not bound
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName"> <value>jndi/myAppliDS</value> </property> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean" singleton="true" > <property name="dataSource"> <ref bean="dataSource"></ref> </property> <property name="mappingResources"> <list> <value>Address.hbm.xml</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">xxx.yyy.zzz.hibernate.RdbDialect</prop> <prop key="hibernate.cglib.use_reflection_optimizer">false</prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.default_batch_fetch_size">16</prop> <prop key="hibernate.max_fetch_depth">1</prop> <prop key="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</prop> <prop key="jta.UserTransaction">java:comp/UserTransaction</prop> <prop key="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</prop> <!-- prop key="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.OC4JTransactionManagerLookup</prop--> <prop key="hibernate.connection.release_mode">auto</prop> </props> </property> </bean>
<prop key="hibernate.connection.datasource">java:/comp/env/jndi/myAppliDS</prop>in the hibernateProperties, but the problem still remains! If anyone has a tip.
Wrong forum - not what JBoss/Spring integration is about.
I suggest using Spring forum.