I'm stuck and please need help on this.
I've used JDeveloper 10.1.3.3 to develop an app using TopLink. It works fine with the
embedded OC4J.
When deploying it on JBoss 4.2.2 I get the following error:
Cannot acquire data source [jdbc/MYDBDS]
javax.naming.InvalidNameException: Not a compound name: jdbc/MYDBDS
oracle.toplink.jndi.JNDIConnector.connect(JNDIConnector.java:100)
Here is the code that tries to establish the connection:
loader = new XMLSessionConfigLoader("META-INF/sessions.xml");
mgr = SessionManager.getManager();
session = (DatabaseSession)mgr.getSession(
loader,
"default",
Thread.currentThread().getContextClassLoader());
Here is the session.xml file extract:
jdbc/MYDBDS
<platform-class>oracle.toplink.platform.database.MySQL4Platform</platform-class>
Here is the mysql-dq.xml (JBoss DS def) extract:
<local-tx-datasource>
<jndi-name>MYDBDS</jndi-name>
I have tried various combinations of changing the toplink session and JBoss data source:
java:comp/env/jdbc/MYDBDS
comp/env/jdbc/MYDBDS
env/jdbc/MYDBDS
jdbc/MYDBDS
MYDBDS
I have also tried the solution described in this discussion:
http://forums.oracle.com/forums/message.jspa?messageID=1056712
It works getting by the JNDI lookup issue, but then I hit another error (can't get the
session to load descriptors from a specific xml).
Please help me.
Henkie
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4168056#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...