Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JNDI datasource exception in weblogic application

User_CSC3OJan 16 2021

Hi,
I am migrating my weblogic from 12 to 14. When I try to launch the server that connects to an Oracle 11G database, I get :

Caused By: javax.naming.NameNotFoundException: remaining name: /comp.env.jdbc.DataSourceCand

components.xml :
<persistence:entity-manager-factory
name="altairEntityManagerFactory"
persistence-unit-name="aCand"/>

Persistence.xml :
<persistence-unit name="aCand">
<!--<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>-->
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<non-jta-data-source>java:comp/env/jdbc/DataSourceCand</non-jta-data-source>
<properties>
<property name="hibernate.dialect" value="${hibernate.dialect}"/>
<property name="hibernate.show_sql" value="${show.sql}"/>
...
</properties>
</persistence-unit>

</persistence>

And in weblogic I created a jndi datasource and linked it to AdminServer with
jndi name = jdbc/DataSourceCand
name = DataSourceCand

I tester the connexion to the datasource from weblogic console and It works but I get this exception when I launch the datasource :

Caused By: javax.naming.NameNotFoundException: remaining name: /comp.env.jdbc.DataSourceCand

I tried many values in <non-jta-data-source> tag like : jdbc/DataSourceCand and comp/env/jdbc/DataSourceCand and nothing works.

Thank you in advance.

Comments
Post Details
Added on Jan 16 2021
1 comment
749 views