I am running up against a java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleConnectionPoolDataSource exception when trying to run Jetty through Gradle and am running out of ideas. The jetty config in gradle points to an env file:
[jettyRun, jettyRunWar]*.jettyEnvXml = file('../resources/jetty/jetty-env.xml')
and within that file is JNDI config:
<New id="OracleDS" class="org.mortbay.jetty.plus.naming.Resource">
<Arg>java:comp/env/OracleDS</Arg>
<Arg>
<New class="oracle.jdbc.pool.OracleConnectionPoolDataSource">
...
</New>
</Arg>
</New>
I’ve been trying adding an extraClasspath to that file, setting the jetty.home system property, and adding dependencies to the jar (to the webapp and also to the buildscript). I’ve also tried the simpler OracleDataSource class. Any concrete advice would be enormously helpful.
Adding the library file to the webapp as a standard dependency did the trick.
providedRuntime files("$projectDir/../lib/ojdbc14.jar")I was unfortunately embarking down the more app server influenced approach. Unfortunately none of the options provided much feedback, so grepping through the –debug output showed that that solution led to the library being consistently loaded.