HI,
I'm using Oracle AppServer, and want hibernate to use session bean CMT, and I'm trying to provide it a JNDI-bound datasource to use.
I get the following error:
Code:
INFO: JNDI InitialContext properties:{java.naming.provider.url=ormi://localhost:x23891/current-workspace-app, java.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory}
09-Jul-2004 14:09:19 net.sf.hibernate.connection.DatasourceConnectionProvider configure
SEVERE: Could not find datasource: java:comp/env/jdbc/MyDS
javax.naming.NameNotFoundException: jdbc/MyDS not found in Application Client
at com.oracle.naming.J2EEContext.getSubContext(J2EEContext.java:93)
I'm thinking that this is probably because I have not specified the principal/credentials for JNDI in the hibernate.cgf.xml, but I cannot find out how to do that anywhere, i.e. what are the properties called that hibernate expects?
Here's my config file as it is now....
Code:
<hibernate-configuration>
<session-factory>
<property name="connection.datasource">java:comp/env/jdbc/MyDS</property>
<property name="dialect">net.sf.hibernate.dialect.OracleDialect</property>
<property name="jndi.class">com.evermind.server.ApplicationClientInitialContextFactory</property>
<property name="jndi.url">ormi://localhost:23891/current-workspace-app</property>
<mapping resource="Person.hbm.xml"/>
</session-factory>
</hibernate-configuration>
any help appreciated!
mike