Sorry, maybe I mistakenly assumed that you had configured correctly the datasource for jetty:
this is my configuration: WEB.INF/jetty-env.xml <?xml version="1.0"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> <Configure class="org.mortbay.jetty.webapp.WebAppContext"> <New id="medis" class="org.mortbay.jetty.plus.naming.Resource"> <Arg>jdbc/mydb</Arg> <Arg> <New class="org.apache.commons.dbcp.BasicDataSource"> <Set name="driverClassName">com.mysql.jdbc.Driver</Set> <Set name="url">jdbc:mysql://localhost:3306/mydb</Set> <Set name="username">test</Set> <Set name="password">test</Set> </New> </Arg> </New> </Configure> hibernate.cfg.xml <hibernate-configuration> <session-factory> <property name="hibernate.connection.datasource">java:comp/env/jdbc/medis</property> <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property> <property name="hibernate.current_session_context_class">thread</property> <property name="hibernate.generate_statistics">false</property> <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> <!-- Disable second-level cache. --> <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property> <property name="cache.use_query_cache">false</property> <property name="cache.use_minimal_puts">false</property> <property name="max_fetch_depth">3</property> <!-- Print SQL to stdout. --> <property name="show_sql">false</property> <property name="format_sql">false</property> <!-- Update schema on SessionFactory build--> <property name="hbm2ddl.auto">update</property> </session-factory> </hibernate-configuration> Tapestry Infodea ha scritto: > In Run --> Run configurations...I've created a new Maven Build > configuration adding the following goals: > org.mortbay.jetty:maven-jetty-plugin:6.1.14:run > > Allex Juang ha scritto: >> maven eclipse plugin?? >> You mean m2eclipse, or anything else? >> Since I didn't find any option about using DataSource in m2eclipse >> >> Allex J. >> >> Tapestry Infodea 提到: >>> I had the same problem and I solved using the maven eclipse plugin to >>> run Jetty >>> >>> Allex Juang ha scritto: >>> >>>> Hi, >>>> >>>> Sorry for offtopic. >>>> But I am writing my own website using T5+hibernate. >>>> And when I using eclipse 3.4 with m2eclipse, jetty can be launched very >>>> well. >>>> But here I got a problem using DataSource in jetty. >>>> >>>> In my webapp, I always using JNDI: jdbc/DS to access my datasource. >>>> With tomcat, I know how to add DataSource to it, but not in jetty. >>>> >>>> Can anyone give me a hint about it?? >>>> Thanks in advance >>>> >>>> Allex J. >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>> >>>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >>> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org