Reputation: 2502
I'm trying to configure a JNDI entry in Jetty for one of my applications.
I've put the mysql jar: mysql-connector-java-5.1.24-bin.jar in lib/ext
I've edited start.ini and changed OPTIONS to: OPTIONS=Server,websocket,resources,ext,plus
I've also uncommented the lines:
OPTIONS=jndi
OPTIONS=plus
etc/jetty-plus.xml
When I run: service jetty start I get:
java.lang.ClassNotFoundException: org.eclipse.jetty.plus.jndi.Resource in file:/usr/share/jetty-distribution-9.0.4.v20130625/etc/jetty.xml
I've checked that the plus jar is in /usr/share/jetty/lib
jar tf jetty-plus-9.0.4.v20130625.jar |grep jndi/Resource.class
gives:
org/eclipse/jetty/plus/jndi/Resource.class
So the class is there.
The JNDI entry itself is defined in etc/jetty.xml:
...
<New id="fhxprime_test" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg><Ref refid="Server"/></Arg>
<Arg>jdbc/fhxprime_test</Arg>
<Arg>
<New class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
<Set name="Url">jdbc:mysql://hostname:3306/dbname</Set>
<Set name="User">user</Set>
<Set name="Password">password</Set>
</New>
</Arg>
</New>
</Configure>
Any other ideas?
Upvotes: 2
Views: 3897
Reputation: 2502
Turns out I was modifying the startup.ini on another server
Upvotes: 3