Hi all,
I've been using OJB API for a while. Until now, I've used only
repository_database configurated to access a database directly.
But now I need to configure it to access a database using a JNDI DataSource.
I'm using Tomcat 5.0.28, Postgres 7.4 and OJB 1.0.1.
So, I made available a JNDI Resource "mydatasource", and this resource is
accessable ( I wrote a tiny jsp page to lookup for this object and
everything looks fine ).
Then a change the file "repository_database.xml" ( where I keep my database
configuration ) to :
<jdbc-connection-descriptor
jcd-alias="default"
default-connection="true"
platform="PostgreSQL"
jdbc-level="3.0"
jndi-datasource-name="mydatasource"
batch-mode="false"
useAutoCommit="2"
ignoreAutoCommitExceptions="false">
But when I try to configure OJB to connect to this datasource, I only get an
exception :
org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl -
Naming Exception while looking up DataSource (jdbc/siemens-hpps)
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:768)
at org.apache.naming.NamingContext.lookup(NamingContext.java:151)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
...
Can anyone help with this problem ?
Thanks a lot !
Julio
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]