2 Replies Latest reply on Apr 17, 2008 2:42 PM by Esteve Aviles

    JNDI not bound spring + Hibernate JPA

    Esteve Aviles Newbie

      Hi everybody,
      I've been surfing the web for the 'CONNECTION NOT BOUND' error and its everywhere, but without a clean solution.
      I've tried every combination without success.
      I'm using spring 2.5, hibernate 3.2 with JPA.

      My config files are as follows:
      Spring:
      Code:

      <jee:jndi-lookup id="dataSource" jndi-name="Oracle"
      resource-ref="false"/>



      web.xml
      Code:

      <resource-ref>
      <res-ref-name>OracleDS</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>



      JBoss:
      Code:

      <jboss-web>
      <resource-ref>
      <res-ref-name>OracleDS</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <jndi-name>java:OracleDS</jndi-name>
      </resource-ref>
      </jboss-web>


      In the jmx-console:
      +- OracleDS (in java: namespace)

      I'am using Oracle 10g.

      It works fine in Jboss 4.0.5 and Tomcat 5.5.20, but fails on Jboss 4.0.4 and JBoss 4.2.2.

      I don't understand how a simple thing like JNDI lookup can bring such a storm of confusion.

      Thank you very much.