eclipse-jetty-plugin
eclipse-jetty-plugin copied to clipboard
Cannot set JNDI datasource, treats name of XML file as a Java class name
I'm trying to setup a JNDI datasource using the instructions at http://eclipse-jetty.github.io/jndi_howto.html
I created a file called jetty.xml in the root directory and added this xml:
<Configure id="wac" class="org.eclipse.jetty.webapp.WebAppContext">
<New id="anzfx" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg></Arg>
<Arg>jdbc/anzfx</Arg>
<Arg>
<New class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource">
<Set name="driverClass">com.mysql.jdbc.Driver</Set>
<Set name="jdbcUrl">jdbc:mysql://localhost:3306/fx</Set>
<Set name="user">root</Set>
<Set name="password"></Set>
</New>
</Arg>
</New>
</Configure>
I then added this file to the Jetty Context Configurations. But when I attempt to start jetty, I get this error:
Error: Could not find or load main class projects.ANZ-FXS.jetty.xml
Which makes absolutely no sense. It appears to be taking the path and file names and using them as package and class names for a Java class. Needless to say, this is not working.