This content has been marked as final. Show 5 replies
Hi,1 person found this helpful
Just a brief note, the exception could also be because of a class loader conflict: loading two ojdbc5.jar files. We encountered this issue with Tomcat and the solution is to copy the ojdbc5.jar to the common lib directory ( $CATALINA_HOME/lib) and remove it from all of the application WEB-INF/lib directories.
I am trying to get this to work with tomcat now. But without success. The JNDI lookup does not seem to work. I am not that familiar with tomcat's config, so perhaps it is something I am doing wrong. Can someone help me out with the config files /
I have this in my META-INF/context.xml file:
<Context path="/joseki" debug="5" crossContect="true">
<Resource name="OracleSemDS" auth="Application"
username="XXX" password="XXX" maxActive="20" maxIdle="10"
and this in the web.xml file:
I get this error:
javax.naming.NameNotFoundException: Name OracleSemDS is not bound in this Context
So clearly the lookup isn't working. I am using tomcat 6.0.26
Hi, I managed to get Joseki working on Tomcat 6 with just this META-INF/context.xml file (no <resource-ref> section in web.xml needed):
<?xml version="1.0" encoding="UTF-8"?>
validationQuery="select 1 from dual"
However, it took a patched version of the sdordfclient.jar to get it working, the problem being that, in accordance with the J2EE spec, Tomcat (and Glassfish as well, I believe) puts the datasource in the "java:comp/env" JNDI namespace. The sdordfclient.jar has code responsible for finding that datasource but looks for it under simply "OracleSemDS".
your context.xml file looks good, I'll bet if you dig around, you'll find that "java:comp/env/OracleSemDS" is bound in Tomcat, you just need a sdordfclient.jar that is looking for it there.
Regarding my note, I meant that if the Joseki/Jena/Jena Adapter set up is not working properly and you see something like "caught: open: the connection from the datasource is not of OracleConnection type" in the log, it might be a jar conflict and we suggest copying the ojdbc*jar to Tomcat's common lib directory. That solved the problem in our instance.
As nyoung said, you will need a patched sdordfclient.jar to be able to use Tomcat or Glassfish with the Jena Adapter. If you have access to My Oracle Support, I can point you to its download location. Ping me at vladimir dot kolovski at oracle dot com.