Re: [OT] Problem using eclipse+maven+jetty
Just to complete my story, I've got JNDI working again by reverting to a prior version of the maven-jetty-plugin. I forced maven to use version 6.1.7 (by adding a version tag), viz: groupIdorg.mortbay.jetty/groupId artifactIdmaven-jetty-plugin/artifactId version6.1.7/version
[OT] Problem using eclipse+maven+jetty
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
Re: [OT] Problem using eclipse+maven+jetty
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
Re: [OT] Problem using eclipse+maven+jetty
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
Re: [OT] Problem using eclipse+maven+jetty
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
Re: [OT] Problem using eclipse+maven+jetty
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 Argjdbc/mydb/Arg Arg New class=org.apache.commons.dbcp.BasicDataSource Set name=driverClassNamecom.mysql.jdbc.Driver/Set Set name=urljdbc:mysql://localhost:3306/mydb/Set Set name=usernametest/Set Set name=passwordtest/Set /New /Arg /New /Configure hibernate.cfg.xml hibernate-configuration session-factory property name=hibernate.connection.datasourcejava:comp/env/jdbc/medis/property property name=hibernate.transaction.factory_classorg.hibernate.transaction.JDBCTransactionFactory/property property name=hibernate.current_session_context_classthread/property property name=hibernate.generate_statisticsfalse/property property name=hibernate.dialectorg.hibernate.dialect.MySQLDialect/property !-- Disable second-level cache. -- property name=cache.provider_classorg.hibernate.cache.NoCacheProvider/property property name=cache.use_query_cachefalse/property property name=cache.use_minimal_putsfalse/property property name=max_fetch_depth3/property !-- Print SQL to stdout. -- property name=show_sqlfalse/property property name=format_sqlfalse/property !-- Update schema on SessionFactory build-- property name=hbm2ddl.autoupdate/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
Re: [OT] Problem using eclipse+maven+jetty
Tapestry Infodea explains it nicely. That was my working setup in T5 5.0.11. But I've just upgraded to 5.0.18, which has a newer version of Jetty and so as per Jetty website, I changed the jetty.env-xml configuration to add an extra scoping parameter: pre New id=medis class=org.mortbay.jetty.plus.naming.Resource *Arg[scope]/Arg* * * Argjdbc/mydb/Arg /pre my setup now no longer works. :( Hope that's not overly unhelpful.
Re: [OT] Problem using eclipse+maven+jetty
Hi, Tapestry Infodea, Thanks for your detail description. But as I tried on my setup: jetty-env.xml ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE Configure PUBLIC -//Mort Bay Consulting//DTD Configure//EN http://jetty.mortbay.org/configure.dtd; Configure class=org.mortbay.jetty.webapp.WebAppContext Set name=contextPath/aaa/Set New id=XXX class=org.mortbay.jetty.plus.naming.Resource Arg/Arg Argjdbc/XXX/Arg Arg New class=org.postgresql.ds.PGSimpleDataSource Set name=DatabaseNameXXX/Set Set name=ServerNamelocalhost/Set Set name=PortNumber5432/Set Set name=Userxxx/Set Set name=Passwordzzz/Set /New /Arg /New /Configure and using jetty:run, I only got following messages: INFO] [jetty6:run] [INFO] Configuring Jetty for project: aaa [INFO] Webapp source directory = ... [INFO] web.xml file = ... [INFO] Using JSP2.1 for jdk1.5 runtime :INFO: Logging to STDERR via org.mortbay.log.StdErrLog [INFO] Context path = /aaa [INFO] Tmp directory = D:\work:INFO: jetty 6.0.0beta17 [INFO] Web defaults = jetty default [INFO] Webapp directory = ... [INFO] Starting jetty 6.0.0beta17 ... [INFO] Classpath =... :WARN: Config error at New id=XXX class=org.mortbay.jetty.plus.naming.ResourceArg/Argjdbc/XXX/ArgArg New class=org.postgresql.ds.PGSimpleDataSourceSet name=DatabaseNamexxx/SetSet name=ServerNamelocalhost/SetSet name=PortNumber5432/SetSet name=Userxxx/SetSet name=Passwordzzz/Set/New /Arg/New :WARN: failed contexthand...@1dccedd{/aaa} :WARN: failed contexthandlercollect...@738d08 :WARN: failed handlercollect...@302e67 :INFO: Started SelectChannelConnector @ 0.0.0.0:8080 :WARN: failed ser...@2f729e [INFO] Jetty server exiting. It seems there is something wrong in my jetty-env.xml. But I don't know why, does anyone know what's wrong with that??? Allex J. Tapestry Infodea 提到: 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 Argjdbc/mydb/Arg Arg New class=org.apache.commons.dbcp.BasicDataSource Set name=driverClassNamecom.mysql.jdbc.Driver/Set Set name=urljdbc:mysql://localhost:3306/mydb/Set Set name=usernametest/Set Set name=passwordtest/Set /New /Arg /New /Configure hibernate.cfg.xml hibernate-configuration session-factory property name=hibernate.connection.datasourcejava:comp/env/jdbc/medis/property property name=hibernate.transaction.factory_classorg.hibernate.transaction.JDBCTransactionFactory/property property name=hibernate.current_session_context_classthread/property property name=hibernate.generate_statisticsfalse/property property name=hibernate.dialectorg.hibernate.dialect.MySQLDialect/property !-- Disable second-level cache. -- property name=cache.provider_classorg.hibernate.cache.NoCacheProvider/property property name=cache.use_query_cachefalse/property property name=cache.use_minimal_putsfalse/property property name=max_fetch_depth3/property !-- Print SQL to stdout. -- property name=show_sqlfalse/property property name=format_sqlfalse/property !-- Update schema on SessionFactory build-- property name=hbm2ddl.autoupdate/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
Re: [OT] Problem using eclipse+maven+jetty
Sorry, It's a stupid mistake. I change jetty version from 6.0.0beta17 to 6.1.14, and every thing goes smoothly. But as Szemere said, add [scope] parameter into jetty-env.xml is not working. Allex J. Allex Juang 提到: Hi, Tapestry Infodea, Thanks for your detail description. But as I tried on my setup: jetty-env.xml ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE Configure PUBLIC -//Mort Bay Consulting//DTD Configure//EN http://jetty.mortbay.org/configure.dtd; Configure class=org.mortbay.jetty.webapp.WebAppContext Set name=contextPath/aaa/Set New id=XXX class=org.mortbay.jetty.plus.naming.Resource Arg/Arg Argjdbc/XXX/Arg Arg New class=org.postgresql.ds.PGSimpleDataSource Set name=DatabaseNameXXX/Set Set name=ServerNamelocalhost/Set Set name=PortNumber5432/Set Set name=Userxxx/Set Set name=Passwordzzz/Set /New /Arg /New /Configure and using jetty:run, I only got following messages: INFO] [jetty6:run] [INFO] Configuring Jetty for project: aaa [INFO] Webapp source directory = ... [INFO] web.xml file = ... [INFO] Using JSP2.1 for jdk1.5 runtime :INFO: Logging to STDERR via org.mortbay.log.StdErrLog [INFO] Context path = /aaa [INFO] Tmp directory = D:\work:INFO: jetty 6.0.0beta17 [INFO] Web defaults = jetty default [INFO] Webapp directory = ... [INFO] Starting jetty 6.0.0beta17 ... [INFO] Classpath =... :WARN: Config error at New id=XXX class=org.mortbay.jetty.plus.naming.ResourceArg/Argjdbc/XXX/ArgArg New class=org.postgresql.ds.PGSimpleDataSourceSet name=DatabaseNamexxx/SetSet name=ServerNamelocalhost/SetSet name=PortNumber5432/SetSet name=Userxxx/SetSet name=Passwordzzz/Set/New /Arg/New :WARN: failed contexthand...@1dccedd{/aaa} :WARN: failed contexthandlercollect...@738d08 :WARN: failed handlercollect...@302e67 :INFO: Started SelectChannelConnector @ 0.0.0.0:8080 :WARN: failed ser...@2f729e [INFO] Jetty server exiting. It seems there is something wrong in my jetty-env.xml. But I don't know why, does anyone know what's wrong with that??? Allex J. Tapestry Infodea 提到: 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 Argjdbc/mydb/Arg Arg New class=org.apache.commons.dbcp.BasicDataSource Set name=driverClassNamecom.mysql.jdbc.Driver/Set Set name=urljdbc:mysql://localhost:3306/mydb/Set Set name=usernametest/Set Set name=passwordtest/Set /New /Arg /New /Configure hibernate.cfg.xml hibernate-configuration session-factory property name=hibernate.connection.datasourcejava:comp/env/jdbc/medis/property property name=hibernate.transaction.factory_classorg.hibernate.transaction.JDBCTransactionFactory/property property name=hibernate.current_session_context_classthread/property property name=hibernate.generate_statisticsfalse/property property name=hibernate.dialectorg.hibernate.dialect.MySQLDialect/property !-- Disable second-level cache. -- property name=cache.provider_classorg.hibernate.cache.NoCacheProvider/property property name=cache.use_query_cachefalse/property property name=cache.use_minimal_putsfalse/property property name=max_fetch_depth3/property !-- Print SQL to stdout. -- property name=show_sqlfalse/property property name=format_sqlfalse/property !-- Update schema on SessionFactory build-- property name=hbm2ddl.autoupdate/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