Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set JNDI datasource, treats name of XML file as a Java class name #11

Open
drekka opened this issue Mar 6, 2015 · 0 comments
Open

Comments

@drekka
Copy link

drekka commented Mar 6, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant