I just use latest version for plugin. It loads the 8.1.1.v20120215. I tried to give version specified, and no lucky. I also use -X to output debug information and did not see any error. Thanks.
On Tue, Feb 28, 2012 at 5:00 PM, Jan Bartel <[email protected]> wrote: > Haipeng, > > the config seems fine. Are you positive you're using the correct > version of the jetty maven plugin? I notice you don't have a <version> > element in the plugin declaration - do you have a <pluginManagement> > section elsewhere in the project that specifies the version? If not, > then please try specifying the latest version (8.1.1.v20120215). Also, > are you sure there aren't any other errors in the startup sequence? > Try doing "mvn -X jetty:run". > > thanks > Jan > > On 29 February 2012 10:40, haipeng du <[email protected]> wrote: > > Hi, > > I just use jetty-maven-plugin ( version 8.1...). I think I have the right > > configuration to create jndi datasource. But I got error: Nothing to bind > > for name javax.sql.DataSource/default. > > I searched internet and try many ways. But I am not lucky to solve this > > problem. Could some people help on this? > > ( I use jetty 6 before and there is no any problems after following > > documents to set up jndi ). > > Thanks a lot. > > Here is my plugin configuration in pom.xml: > > > > <plugin> > > > > <groupId>org.mortbay.jetty</groupId> > > > > <artifactId>jetty-maven-plugin</artifactId> > > > > <scanintervalseconds>10</scanintervalseconds> > > > > <stopKey>stop</stopKey> > > > > <stopPort>9078</stopPort> > > > > <webAppConfig> > > > > <contextPath>/myApp</contextPath> > > > > <jettyEnvXml>${basedir}/src/main/jetty/jetty-env.xml</jettyEnvXml> > > > > </webAppConfig> > > > > <connectors> > > > > > <connector > implementation="org.eclipse.jetty.server.nio.SelectChannelConnector"> > > > > <port>9079</port> > > > > <maxIdleTime>60000</maxIdleTime> > > > > </connector> > > > > </connectors> > > > > </configuration> > > > > </plugin> > > > > Here is my jetty-env.xml: > > > > <Configure id="wac" class="org.eclipse.jetty.webapp.WebAppContext"> > > > > > > <New id="datasource" class="org.eclipse.jetty.plus.jndi.Resource"> > > > > > > > > <Arg>jdbc/appDataSource</Arg> > > > > <Arg> > > > > <New class="org.apache.commons.dbcp.BasicDataSource"> > > > > > > <Set name="driverClassName">oracle.jdbc.driver.OracleDriver</Set> > > > > > > <Set name="url">jdbc:oracle:thin:@myoracle.com:1673:sid</Set> > > > > <Set name="username">user</Set> > > > > <Set name="password">password</Set> > > > > </New> > > > > </Arg> > > > > </New> > > > > > > > > > > </Configure> > > > > > > and here is my web.xml for resource-ref: > > > > > > > > <resource-ref> > > > > <description>DB Connection</description> > > > > <res-ref-name>jdbc/appDataSource</res-ref-name> > > > > <res-type>javax.sql.DataSource</res-type> > > > > <res-auth>Container</res-auth> > > > > </resource-ref> > > > > > > Thanks a lot. > > > > > > _______________________________________________ > > jetty-users mailing list > > [email protected] > > https://dev.eclipse.org/mailman/listinfo/jetty-users > > > _______________________________________________ > jetty-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/jetty-users > -- Haipeng Du San Jose
_______________________________________________ jetty-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/jetty-users
