How do you add jetty-plus-6.1.11.jar and jetty-naming-6.1.11.jar to class path so that stand alone jetty can see it? I keep getting:
[WARN] Config error at <New id="website" class="org.mortbay.jetty.plus.naming.Resource"> java.lang.ClassNotFoundException: org.mortbay.jetty.plus.naming.Resource On May 20, 8:02 am, simon <[email protected]> wrote: > I hope i can save some people a little time... > > below is what is required to get Jetty and Apache JNDI dbcp connection > pool working w/ GWT 1.6 and Oracle > > 1) these 2 jars are needed in the WEB-INF/lib directory, : > jetty-plus-6.1.11.jar > jetty-naming-6.1.11.jar > > 2) for the Apache dbcp connection pool these 2 files are needed in WEB- > INF directory: > commons-dbcp-1.2.jar > commons-pool-1.2.jar > > 3) for oracle, add this to WEB-INF/lib directory, > odbc14.jar > > 4) this <Arg>jdbc/database</Arg> > :: has to match :: ^^^^^^^^^^^^^ > DataSource lDataSource = (DataSource) lContext.lookup("jdbc/ > database"); > > ^^^^^^^^^^^^^^^ > 5) no changes to the web.xml file... > > #common errors# > > if you copy the jetty-web.xml into the WEB-INF/ from > http://humblecode.blogspot.com/2009/05/gwt-16-using-jndi-datasource.html > be very carefule that of the double quotes, they are slanted double > quotes which the sax parser does not like. > > ***********************************errors > ********************************** > if you get the below error, you do not have jetty-naming-6.1.11.jar on > your classpath > [WARN] Config error at <New id="website" > class="org.mortbay.jetty.plus.naming.Resource"> > java.lang.ClassNotFoundException: > org.mortbay.jetty.plus.naming.Resource > > if you get the below error, you do not have jetty-plus-6.1.11.jar on > your classpath > [WARN] Config error at <New id="website" > class="org.mortbay.jetty.plus.naming.Resource"><Arg>jdbc/database</ > Arg><Arg> > java.lang.ClassNotFoundException: > org.mortbay.jetty.plus.naming.Resource > > ********** here is my \WEB-INF\jetty-web.xml ********* > <?xml version="1.0" encoding="ISO-8859-1"?> > <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" > "http://jetty.mortbay.org/configure.dtd"> > <Configure class="org.mortbay.jetty.webapp.WebAppContext"> > <New id="website" class="org.mortbay.jetty.plus.naming.Resource"> > <Arg>jdbc/database</Arg> > <Arg> > <New class="org.apache.commons.dbcp.BasicDataSource"> > <Set name="driverClassName">oracle.jdbc.OracleDriver</ > Set> > <Set > name="url">jdbc:oracle:thin:@192.142.49.8:1521:xe</Set> > <Set name="username">user</Set> > <Set name="password">pass</Set> > </New> > </Arg> > </New> > </Configure> > > these are specific to the drive used, if you have "user" instead of > "username" > <Set name="driverClassName">oracle.jdbc.OracleDriver</ > Set> > <Set > name="url">jdbc:oracle:thin:@192.142.49.8:1521:xe</Set> > ***** <Set name="user">user</Set> ***** > <Set name="password">pass</Set> > > java.lang.NoSuchMethodException: > class org.apache.commons.dbcp.BasicDataSource.setUser(class > java.lang.String) > > JETTY > docshttp://docs.codehaus.org/display/JETTY/JNDIhttp://docs.codehaus.org/display/JETTY/DataSource+Examples --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
