[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[jetty-users] Jetty 7 and JNDI (EnvConfiguration) - In jetty6 all forks fine.
|
How can i make Jetty works with JNDI datasource?
In Jetty 6 i make the same configuration and all works fine, what i
need to change to get it work's in jetty 7?
1- I change jetty-plus and uncomment "<Call name="addLifeCycle">";
2- I put my war in webapps-plus
3- Run jetty with this commmand java -DOPTIONS=All -jar start.jar
etc/jetty.xml etc/jetty-plus.xml etc/jetty-logging.xml
4- And always i get
java.lang.ClassNotFoundException: org.eclipse.jetty.plus.webapp.EnvConfiguration
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
at org.eclipse.jetty.util.Loader.loadClass(Loader.java:90)
at org.eclipse.jetty.util.Loader.loadClass(Loader.java:70)
at org.eclipse.jetty.webapp.WebAppContext.loadConfigurations(WebAppContext.java:617)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:311)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
What I miss?
web.xml
<resource-ref>
<res-ref-name>jdbc/site</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
jetty-env (in WEB-INF of my app):
<Configure id='appcontext' class="org.eclipse.jetty.webapp.WebAppContext">
<New id="site" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg>jdbc/site</Arg>
<Arg>
<New class="org.postgresql.ds.PGPoolingDataSource">
<Set name="User">site</Set>
<Set name="Password">pass</Set>
<Set name="DatabaseName">base</Set>
<Set name="ServerName">192.168.1.2</Set>
<Set name="PortNumber">5430</Set>
<Set name="initialConnections">5</Set>
<Set name="maxConnections">50</Set>
</New>
</Arg>
</New>
</Configure>
Thanks all for helping.