Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
On Wed, May 1, 2013 at 12:03 AM, George Christman gchrist...@cardaddy.comwrote: I'm still not having any success :-/ I've followed all your instructions plus attempted in both Tomcat6 and 7. I just want to verify this is the correct spot for resource-ref and that it's written correctly. That is correct. ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-namerolemanager Tapestry 5 Application/display-name context-param !-- The only significant configuration for Tapestry 5, this informs Tapestry of where to look for pages, components and mixins. -- param-nametapestry.app-package/param-name param-valuecom.mycompany.rolemanager/param-value /context-param filter filter-nameapp/filter-name filter-classorg.apache.tapestry5.TapestryFilter/filter-class /filter filter-mapping filter-nameapp/filter-name url-pattern/*/url-pattern /filter-mapping resource-ref descriptionMyDatabase Description/description res-ref-namejdbc/rolemanager/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app On Tue, Apr 30, 2013 at 2:42 PM, Dmitry Gusev dmitry.gu...@gmail.com wrote: I don't have anything related to this datasource in TOMCAT_HOME/conf/context.xml nor in TOMCAT_HOME/conf/server.xml Note that context file name will be ROOT.xml only if you deploy to root context, that is your application url will be http://localhost:8080/ If you deploy to custom context, then context file should have the same name as context + .xml, see here for example: http://stackoverflow.com/questions/12629557/in-tomcat-7-do-you-need-to-copy-context-xml-into-conf-catalina-locahost-for-it-t On Tue, Apr 30, 2013 at 9:07 PM, George Christman gchrist...@cardaddy.comwrote: Well I thought I was using ROOT.xml, but it was overwritten during deployment. I created the file manually on the server, I guess the question is where should I be creating ROOT.xml? should this be done in app? After manually creating it, I still have the same error. Context file may be in the app and tomcat may be configured to copy context file to TOMCAT_HOME/conf/Catalina/localhost/... on deployment. Creating this file manually may also work, just keep in mind it may be deleted during redeploy. Try this ( I assume you're running tomcat with default settings ): 1. Shutdown tomcat 2. Delete TOMCAT_HOME/webapps/ROOT -- this is default tomcat root application 3. Create war file using your build tool and rename it to ROOT.war ( I assume you don't have context.xml in your war ) 4. Put ROOT.war into TOMCAT_HOME/webapps/ 5. Start tomcat ( at this step tomcat should deploy your war, but you won't have resource declaration yet ) 6. Shutdown tomcat 7. Create TOMCAT_HOME/conf/Catalina/localhost/ROOT.xml manually as you wrote above 8. Start tomcat again Resource should be available after these steps. If it is then you may try to setup tomcat and your app to auto deploy your context definition. What I had after manually creating ROOT.xml in Tomcat7\conf\Catalina\localhost ?xml version=1.0 encoding=UTF-8? Context Loader delegate=true/ Resource name=jdbc/rolemanager auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=root password=test driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/rolemanager/ /Context context.xml in Tomcat7\conf Context !-- Default set of monitored resources -- WatchedResourceWEB-INF/web.xml/WatchedResource !-- Uncomment this to disable session persistence across Tomcat restarts -- !-- Manager pathname= / -- !-- Uncomment this to enable Comet connection tacking (provides events on session expiration as well as webapp lifecycle) -- !-- Valve className=org.apache.catalina.valves.CometConnectionManagerValve / -- ResourceLink global=jdbc/rolemanager name=jdbc/rolemanager type=javax.sql.DataSource/ /Context Server.xml is blank. WEB-INF web.xml resource-ref descriptionMyDatabase Description/description res-ref-namejdbc/rolemanager/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref On Tue, Apr 30, 2013 at 11:44 AM, Dmitry Gusev dmitry.gu...@gmail.com wrote: I don't use tapestry-hibernate, I use tapestry-jpa with Hibernate as JPA implementation. persistence.xml -- is a JPA specific file, I don't
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
Thanks Dmitry, it sounds like we are at the tail end of this issue. :) My only question left is in regards to your persistence.xml file. I use tapestry-hibernate, however I do not have a persistence.xml file present in my app. I'm not really sure what it's purpose is, but without it and changing my hibernate.cfg.xml datasource to jdbc/rolemanager, I received the following exception. javax.naming.NameNotFoundException: Name [jdbc/rolemanager] is not bound in this Context. Unable to find [jdbc]. Is persistence.xml needed? If so, do you happen to know of a guide or code sample for setting it up? I seen one on the Tap website, but I wasn't sure how it integrated with the existing hibernate xml configurations. My current hibernate config is as followed and I probably should note this was configured by a previous developer, so I'm not entirely sure how all of it works. *pom.xml* dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-hibernate/artifactId version5.3.7/version /dependency plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.2/version configuration componentProperties configurationfilesrc/main/resources/hbm2ddl.cfg.xml/configurationfile exportfalse/export formattrue/format namingstrategyorg.hibernate.cfg.ImprovedNamingStrategy/namingstrategy outputfilenamerolemanager.ddl/outputfilename /componentProperties /configuration /plugin * * * hibernate.cfg.xml* ?xml version=1.0 encoding=UTF-8? !DOCTYPE hibernate-configuration PUBLIC -//Hibernate/Hibernate Configuration DTD 3.0//EN http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd; hibernate-configuration session-factory property name=hibernate.connection.datasourcejdbc/rolemanager/property property name=hbm2ddl.autocreate/property property name=hibernate.show_sqlfalse/property /session-factory /hibernate-configuration *web.xml* ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app resource-ref descriptionDescription Connection/description res-ref-namejdbc/rolemanager/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app *AppModule.class* public static void contributeHibernateSessionSource(OrderedConfigurationHibernateConfigurer configuration) { configuration.addInstance(RoleManger, RoleMangerHibernateConfigurer.class); } *RoleMangerHibernateConfigurer.class* // I'm really not sure what this class if for. public class RoleMangerHibernateConfigurer implements HibernateConfigurer { public void configure(Configuration configuration) { configuration.setNamingStrategy(ImprovedNamingStrategy.INSTANCE); } } *tomcat is configured like yours. * Thanks everyone, I've been trying to figure all this out for a while now and you guys once again this community has really helped me out. On Tue, Apr 30, 2013 at 1:11 AM, Dmitry Gusev dmitry.gu...@gmail.comwrote: On Mon, Apr 29, 2013 at 11:33 PM, George Christman gchrist...@cardaddy.comwrote: So as it turns out, the issue was caused by tapestry-test adding an older tomcat files to the class path. I'll need to somehow figure out how to exclude them from the class path. dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-test/artifactId version5.3.6/version exclusions exclusion/exclusion /exclusions /dependency Just add scopetest/scope here, no need to use exclusions here. You don't need tapestry-test for runtime classpath. The other question I have has to do with my hibernate.cfg.xml file. I use to use something like this to establish my database connection with jetty using jetty-env.xml property name=hibernate.connection.datasourcejdbc/rolemanager/property Configure id='wac' class=org.mortbay.jetty.webapp.WebAppContext New id=LocalDS class=org.mortbay.jetty.plus.naming.Resource Argjdbc/rolemanager/Arg Arg New class=com.mysql.jdbc.jdbc2.optional.MysqlDataSource Set name=ServerNamelocalhost/Set Set name=PortNumber3306/Set Set name=DatabaseNamerolemanager/Set Set name=Userroot/Set Set name=Passwordtest/Set /New /Arg /New /Configure but with tomcat I need to use something like this, property name=hibernate.connection.datasourcejava:comp/env/jdbc/rolemanager/property You can use jdbc/rolemanager for tomcat also. I use hibernate with JPA,
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
I don't use tapestry-hibernate, I use tapestry-jpa with Hibernate as JPA implementation. persistence.xml -- is a JPA specific file, I don't think you need it for tapestry-hibernate. Looking at your exception: javax.naming.NameNotFoundException: Name [jdbc/rolemanager] is not bound in this Context. Unable to find [jdbc]. I may suppose that you've configured your datasource in some other scope that is not accessible from your application. In what file you declared your datasource? Mine is in ./apache-tomcat-7.0.35/conf/Catalina/localhost/ROOT.xml Or if running from within Eclipse Sysdeo Plugin -- this resource configured at the plugin's properties. On Tue, Apr 30, 2013 at 6:16 PM, George Christman gchrist...@cardaddy.comwrote: Thanks Dmitry, it sounds like we are at the tail end of this issue. :) My only question left is in regards to your persistence.xml file. I use tapestry-hibernate, however I do not have a persistence.xml file present in my app. I'm not really sure what it's purpose is, but without it and changing my hibernate.cfg.xml datasource to jdbc/rolemanager, I received the following exception. javax.naming.NameNotFoundException: Name [jdbc/rolemanager] is not bound in this Context. Unable to find [jdbc]. Is persistence.xml needed? If so, do you happen to know of a guide or code sample for setting it up? I seen one on the Tap website, but I wasn't sure how it integrated with the existing hibernate xml configurations. My current hibernate config is as followed and I probably should note this was configured by a previous developer, so I'm not entirely sure how all of it works. *pom.xml* dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-hibernate/artifactId version5.3.7/version /dependency plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.2/version configuration componentProperties configurationfilesrc/main/resources/hbm2ddl.cfg.xml/configurationfile exportfalse/export formattrue/format namingstrategyorg.hibernate.cfg.ImprovedNamingStrategy/namingstrategy outputfilenamerolemanager.ddl/outputfilename /componentProperties /configuration /plugin * * * hibernate.cfg.xml* ?xml version=1.0 encoding=UTF-8? !DOCTYPE hibernate-configuration PUBLIC -//Hibernate/Hibernate Configuration DTD 3.0//EN http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd; hibernate-configuration session-factory property name=hibernate.connection.datasourcejdbc/rolemanager/property property name=hbm2ddl.autocreate/property property name=hibernate.show_sqlfalse/property /session-factory /hibernate-configuration *web.xml* ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app resource-ref descriptionDescription Connection/description res-ref-namejdbc/rolemanager/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app *AppModule.class* public static void contributeHibernateSessionSource(OrderedConfigurationHibernateConfigurer configuration) { configuration.addInstance(RoleManger, RoleMangerHibernateConfigurer.class); } *RoleMangerHibernateConfigurer.class* // I'm really not sure what this class if for. public class RoleMangerHibernateConfigurer implements HibernateConfigurer { public void configure(Configuration configuration) { configuration.setNamingStrategy(ImprovedNamingStrategy.INSTANCE); } } *tomcat is configured like yours. * Thanks everyone, I've been trying to figure all this out for a while now and you guys once again this community has really helped me out. On Tue, Apr 30, 2013 at 1:11 AM, Dmitry Gusev dmitry.gu...@gmail.com wrote: On Mon, Apr 29, 2013 at 11:33 PM, George Christman gchrist...@cardaddy.comwrote: So as it turns out, the issue was caused by tapestry-test adding an older tomcat files to the class path. I'll need to somehow figure out how to exclude them from the class path. dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-test/artifactId version5.3.6/version exclusions exclusion/exclusion /exclusions /dependency Just add scopetest/scope here, no need to use exclusions here. You don't need tapestry-test for runtime classpath. The other question I have has to do with my hibernate.cfg.xml file. I use to use something like this to establish my
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
Well I thought I was using ROOT.xml, but it was overwritten during deployment. I created the file manually on the server, I guess the question is where should I be creating ROOT.xml? should this be done in app? After manually creating it, I still have the same error. What I had after manually creating ROOT.xml in Tomcat7\conf\Catalina\localhost ?xml version=1.0 encoding=UTF-8? Context Loader delegate=true/ Resource name=jdbc/rolemanager auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=root password=test driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/rolemanager/ /Context context.xml in Tomcat7\conf Context !-- Default set of monitored resources -- WatchedResourceWEB-INF/web.xml/WatchedResource !-- Uncomment this to disable session persistence across Tomcat restarts -- !-- Manager pathname= / -- !-- Uncomment this to enable Comet connection tacking (provides events on session expiration as well as webapp lifecycle) -- !-- Valve className=org.apache.catalina.valves.CometConnectionManagerValve / -- ResourceLink global=jdbc/rolemanager name=jdbc/rolemanager type=javax.sql.DataSource/ /Context Server.xml is blank. WEB-INF web.xml resource-ref descriptionMyDatabase Description/description res-ref-namejdbc/rolemanager/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref On Tue, Apr 30, 2013 at 11:44 AM, Dmitry Gusev dmitry.gu...@gmail.comwrote: I don't use tapestry-hibernate, I use tapestry-jpa with Hibernate as JPA implementation. persistence.xml -- is a JPA specific file, I don't think you need it for tapestry-hibernate. Looking at your exception: javax.naming.NameNotFoundException: Name [jdbc/rolemanager] is not bound in this Context. Unable to find [jdbc]. I may suppose that you've configured your datasource in some other scope that is not accessible from your application. In what file you declared your datasource? Mine is in ./apache-tomcat-7.0.35/conf/Catalina/localhost/ROOT.xml Or if running from within Eclipse Sysdeo Plugin -- this resource configured at the plugin's properties. On Tue, Apr 30, 2013 at 6:16 PM, George Christman gchrist...@cardaddy.comwrote: Thanks Dmitry, it sounds like we are at the tail end of this issue. :) My only question left is in regards to your persistence.xml file. I use tapestry-hibernate, however I do not have a persistence.xml file present in my app. I'm not really sure what it's purpose is, but without it and changing my hibernate.cfg.xml datasource to jdbc/rolemanager, I received the following exception. javax.naming.NameNotFoundException: Name [jdbc/rolemanager] is not bound in this Context. Unable to find [jdbc]. Is persistence.xml needed? If so, do you happen to know of a guide or code sample for setting it up? I seen one on the Tap website, but I wasn't sure how it integrated with the existing hibernate xml configurations. My current hibernate config is as followed and I probably should note this was configured by a previous developer, so I'm not entirely sure how all of it works. *pom.xml* dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-hibernate/artifactId version5.3.7/version /dependency plugin groupIdorg.codehaus.mojo/groupId artifactIdhibernate3-maven-plugin/artifactId version2.2/version configuration componentProperties configurationfilesrc/main/resources/hbm2ddl.cfg.xml/configurationfile exportfalse/export formattrue/format namingstrategyorg.hibernate.cfg.ImprovedNamingStrategy/namingstrategy outputfilenamerolemanager.ddl/outputfilename /componentProperties /configuration /plugin * * * hibernate.cfg.xml* ?xml version=1.0 encoding=UTF-8? !DOCTYPE hibernate-configuration PUBLIC -//Hibernate/Hibernate Configuration DTD 3.0//EN http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd; hibernate-configuration session-factory property name=hibernate.connection.datasourcejdbc/rolemanager/property property name=hbm2ddl.autocreate/property property name=hibernate.show_sqlfalse/property /session-factory /hibernate-configuration *web.xml* ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app resource-ref descriptionDescription Connection/description res-ref-namejdbc/rolemanager/res-ref-name
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
I don't have anything related to this datasource in TOMCAT_HOME/conf/context.xml nor in TOMCAT_HOME/conf/server.xml Note that context file name will be ROOT.xml only if you deploy to root context, that is your application url will be http://localhost:8080/ If you deploy to custom context, then context file should have the same name as context + .xml, see here for example: http://stackoverflow.com/questions/12629557/in-tomcat-7-do-you-need-to-copy-context-xml-into-conf-catalina-locahost-for-it-t On Tue, Apr 30, 2013 at 9:07 PM, George Christman gchrist...@cardaddy.comwrote: Well I thought I was using ROOT.xml, but it was overwritten during deployment. I created the file manually on the server, I guess the question is where should I be creating ROOT.xml? should this be done in app? After manually creating it, I still have the same error. Context file may be in the app and tomcat may be configured to copy context file to TOMCAT_HOME/conf/Catalina/localhost/... on deployment. Creating this file manually may also work, just keep in mind it may be deleted during redeploy. Try this ( I assume you're running tomcat with default settings ): 1. Shutdown tomcat 2. Delete TOMCAT_HOME/webapps/ROOT -- this is default tomcat root application 3. Create war file using your build tool and rename it to ROOT.war ( I assume you don't have context.xml in your war ) 4. Put ROOT.war into TOMCAT_HOME/webapps/ 5. Start tomcat ( at this step tomcat should deploy your war, but you won't have resource declaration yet ) 6. Shutdown tomcat 7. Create TOMCAT_HOME/conf/Catalina/localhost/ROOT.xml manually as you wrote above 8. Start tomcat again Resource should be available after these steps. If it is then you may try to setup tomcat and your app to auto deploy your context definition. What I had after manually creating ROOT.xml in Tomcat7\conf\Catalina\localhost ?xml version=1.0 encoding=UTF-8? Context Loader delegate=true/ Resource name=jdbc/rolemanager auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=root password=test driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/rolemanager/ /Context context.xml in Tomcat7\conf Context !-- Default set of monitored resources -- WatchedResourceWEB-INF/web.xml/WatchedResource !-- Uncomment this to disable session persistence across Tomcat restarts -- !-- Manager pathname= / -- !-- Uncomment this to enable Comet connection tacking (provides events on session expiration as well as webapp lifecycle) -- !-- Valve className=org.apache.catalina.valves.CometConnectionManagerValve / -- ResourceLink global=jdbc/rolemanager name=jdbc/rolemanager type=javax.sql.DataSource/ /Context Server.xml is blank. WEB-INF web.xml resource-ref descriptionMyDatabase Description/description res-ref-namejdbc/rolemanager/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref On Tue, Apr 30, 2013 at 11:44 AM, Dmitry Gusev dmitry.gu...@gmail.com wrote: I don't use tapestry-hibernate, I use tapestry-jpa with Hibernate as JPA implementation. persistence.xml -- is a JPA specific file, I don't think you need it for tapestry-hibernate. Looking at your exception: javax.naming.NameNotFoundException: Name [jdbc/rolemanager] is not bound in this Context. Unable to find [jdbc]. I may suppose that you've configured your datasource in some other scope that is not accessible from your application. In what file you declared your datasource? Mine is in ./apache-tomcat-7.0.35/conf/Catalina/localhost/ROOT.xml Or if running from within Eclipse Sysdeo Plugin -- this resource configured at the plugin's properties. On Tue, Apr 30, 2013 at 6:16 PM, George Christman gchrist...@cardaddy.comwrote: Thanks Dmitry, it sounds like we are at the tail end of this issue. :) My only question left is in regards to your persistence.xml file. I use tapestry-hibernate, however I do not have a persistence.xml file present in my app. I'm not really sure what it's purpose is, but without it and changing my hibernate.cfg.xml datasource to jdbc/rolemanager, I received the following exception. javax.naming.NameNotFoundException: Name [jdbc/rolemanager] is not bound in this Context. Unable to find [jdbc]. Is persistence.xml needed? If so, do you happen to know of a guide or code sample for setting it up? I seen one on the Tap website, but I wasn't sure how it integrated with the existing hibernate xml configurations. My current hibernate config is as followed and I probably should note this was configured by a previous developer, so I'm not entirely sure how all of it works. *pom.xml* dependency
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
I'm still not having any success :-/ I've followed all your instructions plus attempted in both Tomcat6 and 7. I just want to verify this is the correct spot for resource-ref and that it's written correctly. ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app display-namerolemanager Tapestry 5 Application/display-name context-param !-- The only significant configuration for Tapestry 5, this informs Tapestry of where to look for pages, components and mixins. -- param-nametapestry.app-package/param-name param-valuecom.mycompany.rolemanager/param-value /context-param filter filter-nameapp/filter-name filter-classorg.apache.tapestry5.TapestryFilter/filter-class /filter filter-mapping filter-nameapp/filter-name url-pattern/*/url-pattern /filter-mapping resource-ref descriptionMyDatabase Description/description res-ref-namejdbc/rolemanager/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app On Tue, Apr 30, 2013 at 2:42 PM, Dmitry Gusev dmitry.gu...@gmail.comwrote: I don't have anything related to this datasource in TOMCAT_HOME/conf/context.xml nor in TOMCAT_HOME/conf/server.xml Note that context file name will be ROOT.xml only if you deploy to root context, that is your application url will be http://localhost:8080/ If you deploy to custom context, then context file should have the same name as context + .xml, see here for example: http://stackoverflow.com/questions/12629557/in-tomcat-7-do-you-need-to-copy-context-xml-into-conf-catalina-locahost-for-it-t On Tue, Apr 30, 2013 at 9:07 PM, George Christman gchrist...@cardaddy.comwrote: Well I thought I was using ROOT.xml, but it was overwritten during deployment. I created the file manually on the server, I guess the question is where should I be creating ROOT.xml? should this be done in app? After manually creating it, I still have the same error. Context file may be in the app and tomcat may be configured to copy context file to TOMCAT_HOME/conf/Catalina/localhost/... on deployment. Creating this file manually may also work, just keep in mind it may be deleted during redeploy. Try this ( I assume you're running tomcat with default settings ): 1. Shutdown tomcat 2. Delete TOMCAT_HOME/webapps/ROOT -- this is default tomcat root application 3. Create war file using your build tool and rename it to ROOT.war ( I assume you don't have context.xml in your war ) 4. Put ROOT.war into TOMCAT_HOME/webapps/ 5. Start tomcat ( at this step tomcat should deploy your war, but you won't have resource declaration yet ) 6. Shutdown tomcat 7. Create TOMCAT_HOME/conf/Catalina/localhost/ROOT.xml manually as you wrote above 8. Start tomcat again Resource should be available after these steps. If it is then you may try to setup tomcat and your app to auto deploy your context definition. What I had after manually creating ROOT.xml in Tomcat7\conf\Catalina\localhost ?xml version=1.0 encoding=UTF-8? Context Loader delegate=true/ Resource name=jdbc/rolemanager auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=root password=test driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/rolemanager/ /Context context.xml in Tomcat7\conf Context !-- Default set of monitored resources -- WatchedResourceWEB-INF/web.xml/WatchedResource !-- Uncomment this to disable session persistence across Tomcat restarts -- !-- Manager pathname= / -- !-- Uncomment this to enable Comet connection tacking (provides events on session expiration as well as webapp lifecycle) -- !-- Valve className=org.apache.catalina.valves.CometConnectionManagerValve / -- ResourceLink global=jdbc/rolemanager name=jdbc/rolemanager type=javax.sql.DataSource/ /Context Server.xml is blank. WEB-INF web.xml resource-ref descriptionMyDatabase Description/description res-ref-namejdbc/rolemanager/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref On Tue, Apr 30, 2013 at 11:44 AM, Dmitry Gusev dmitry.gu...@gmail.com wrote: I don't use tapestry-hibernate, I use tapestry-jpa with Hibernate as JPA implementation. persistence.xml -- is a JPA specific file, I don't think you need it for tapestry-hibernate. Looking at your exception: javax.naming.NameNotFoundException: Name [jdbc/rolemanager] is not bound in this Context. Unable to find [jdbc]. I may suppose that you've configured
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
Hi everyone, I'm now getting back to this issue and I'd like to say I honestly still don't understand it. I posted my config on stack overflow with a little more detail. If any tapestry tomcat users would like to take a look at it and tell me what I might be doing wrong, I'd appreciate it. Thanks http://stackoverflow.com/questions/16284005/how-to-configure-tapestry5-hibernate-tomcat7-jndi-mysql On Tue, Mar 26, 2013 at 7:54 AM, Dmitry Gusev dmitry.gu...@gmail.comwrote: I don't like to use server.xml for JNDI configuration for several reasons, but the main is that JDBC driver classes should be on server classpath, which means you have to manually put them there. Which personally I don't like because driver jar usually specified at pom.xml/build.gradle and this is simply not that DRY. And also this is not recommended by tomcat team and here's why: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Defining_a_context What I prefer to do is to create context file (ROOT context at this example) at ./apache-tomcat-7.0.35/conf/Catalina/localhost/ROOT.xml with the following content: ?xml version=1.0 encoding=UTF-8? Context Loader delegate=true/ Resource name=jdbc/xxx-db type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=30 maxWait=1 driverClassName=org.postgresql.Driver url=jdbc:postgresql://localhost/xxx username=xxx / /Context For several recent projects I found it convenient to also develop with Tomcat using Sysdeo Eclipse Plugin. For this to work there I have to put content of /Context node into Extra information textarea at Project Properties - Tomcat. Though, I agree its more difficult to setup Tomcat plugin than Jetty in Eclipse, but when you did this once -- every other projects will be easier to setup. And you usually might want to have exactly the same web container that will be in production if you use, say, web sockets API. // PS: Sorry for offtopic On Tue, Mar 26, 2013 at 3:28 PM, Barry Books trs...@gmail.com wrote: I also host on Amazon with Tomcat and develop with Jetty. Hibernate just gets the datasource from the container. When running locally that's Jetty and Jetty reads the jetty-web.xml file to build the connection. When deployed under Tomcat that would most likely be the server.xml file in the Tomcat conf directory. Tomcat requires a mapping between the server.xml configurations and each web app. I do this by creating a META-INF/context.xml file in the project. When Tomcat deploys the app it will pick up that file and use the mapping you provide. The contents would be something like ?xml version=1.0 encoding=UTF-8? Context ResourceLink name=jdbc/wind global=jdbc/wind type=javax.sql.DataSource/ /Context - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Dmitry Gusev AnjLab Team http://anjlab.com -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
Sounds like you are mixing up your dependencies. Perhaps an incompatible or duplicated version of some JARs somewhere. Sorry I can't be anymore specific. On Apr 29, 2013, at 1:00 PM, George Christman wrote: Hi everyone, I'm now getting back to this issue and I'd like to say I honestly still don't understand it. I posted my config on stack overflow with a little more detail. If any tapestry tomcat users would like to take a look at it and tell me what I might be doing wrong, I'd appreciate it. Thanks http://stackoverflow.com/questions/16284005/how-to-configure-tapestry5-hibernate-tomcat7-jndi-mysql On Tue, Mar 26, 2013 at 7:54 AM, Dmitry Gusev dmitry.gu...@gmail.comwrote: I don't like to use server.xml for JNDI configuration for several reasons, but the main is that JDBC driver classes should be on server classpath, which means you have to manually put them there. Which personally I don't like because driver jar usually specified at pom.xml/build.gradle and this is simply not that DRY. And also this is not recommended by tomcat team and here's why: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Defining_a_context What I prefer to do is to create context file (ROOT context at this example) at ./apache-tomcat-7.0.35/conf/Catalina/localhost/ROOT.xml with the following content: ?xml version=1.0 encoding=UTF-8? Context Loader delegate=true/ Resource name=jdbc/xxx-db type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=30 maxWait=1 driverClassName=org.postgresql.Driver url=jdbc:postgresql://localhost/xxx username=xxx / /Context For several recent projects I found it convenient to also develop with Tomcat using Sysdeo Eclipse Plugin. For this to work there I have to put content of /Context node into Extra information textarea at Project Properties - Tomcat. Though, I agree its more difficult to setup Tomcat plugin than Jetty in Eclipse, but when you did this once -- every other projects will be easier to setup. And you usually might want to have exactly the same web container that will be in production if you use, say, web sockets API. // PS: Sorry for offtopic On Tue, Mar 26, 2013 at 3:28 PM, Barry Books trs...@gmail.com wrote: I also host on Amazon with Tomcat and develop with Jetty. Hibernate just gets the datasource from the container. When running locally that's Jetty and Jetty reads the jetty-web.xml file to build the connection. When deployed under Tomcat that would most likely be the server.xml file in the Tomcat conf directory. Tomcat requires a mapping between the server.xml configurations and each web app. I do this by creating a META-INF/context.xml file in the project. When Tomcat deploys the app it will pick up that file and use the mapping you provide. The contents would be something like ?xml version=1.0 encoding=UTF-8? Context ResourceLink name=jdbc/wind global=jdbc/wind type=javax.sql.DataSource/ /Context - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Dmitry Gusev AnjLab Team http://anjlab.com -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
Lenny is right, you have some jars in your classpath that conflicting with tomcat's libraries. Can you show output of mvn dependency:tree or gradle dependencies ? On Mon, Apr 29, 2013 at 9:04 PM, Lenny Primak lpri...@hope.nyc.ny.uswrote: Sounds like you are mixing up your dependencies. Perhaps an incompatible or duplicated version of some JARs somewhere. Sorry I can't be anymore specific. On Apr 29, 2013, at 1:00 PM, George Christman wrote: Hi everyone, I'm now getting back to this issue and I'd like to say I honestly still don't understand it. I posted my config on stack overflow with a little more detail. If any tapestry tomcat users would like to take a look at it and tell me what I might be doing wrong, I'd appreciate it. Thanks http://stackoverflow.com/questions/16284005/how-to-configure-tapestry5-hibernate-tomcat7-jndi-mysql On Tue, Mar 26, 2013 at 7:54 AM, Dmitry Gusev dmitry.gu...@gmail.com wrote: I don't like to use server.xml for JNDI configuration for several reasons, but the main is that JDBC driver classes should be on server classpath, which means you have to manually put them there. Which personally I don't like because driver jar usually specified at pom.xml/build.gradle and this is simply not that DRY. And also this is not recommended by tomcat team and here's why: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Defining_a_context What I prefer to do is to create context file (ROOT context at this example) at ./apache-tomcat-7.0.35/conf/Catalina/localhost/ROOT.xml with the following content: ?xml version=1.0 encoding=UTF-8? Context Loader delegate=true/ Resource name=jdbc/xxx-db type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=30 maxWait=1 driverClassName=org.postgresql.Driver url=jdbc:postgresql://localhost/xxx username=xxx / /Context For several recent projects I found it convenient to also develop with Tomcat using Sysdeo Eclipse Plugin. For this to work there I have to put content of /Context node into Extra information textarea at Project Properties - Tomcat. Though, I agree its more difficult to setup Tomcat plugin than Jetty in Eclipse, but when you did this once -- every other projects will be easier to setup. And you usually might want to have exactly the same web container that will be in production if you use, say, web sockets API. // PS: Sorry for offtopic On Tue, Mar 26, 2013 at 3:28 PM, Barry Books trs...@gmail.com wrote: I also host on Amazon with Tomcat and develop with Jetty. Hibernate just gets the datasource from the container. When running locally that's Jetty and Jetty reads the jetty-web.xml file to build the connection. When deployed under Tomcat that would most likely be the server.xml file in the Tomcat conf directory. Tomcat requires a mapping between the server.xml configurations and each web app. I do this by creating a META-INF/context.xml file in the project. When Tomcat deploys the app it will pick up that file and use the mapping you provide. The contents would be something like ?xml version=1.0 encoding=UTF-8? Context ResourceLink name=jdbc/wind global=jdbc/wind type=javax.sql.DataSource/ /Context - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Dmitry Gusev AnjLab Team http://anjlab.com -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Dmitry Gusev AnjLab Team http://anjlab.com
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
Here's my mvn dependency tree, thanks for your help. [WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:hibernate3- maven-plugin:2.2: Failed to parse plugin descriptor for org.codehaus.mojo:hibern ate3-maven-plugin:2.2 (C:\Users\gmc07\.m2\repository\org\codehaus\mojo\hibernate 3-maven-plugin\2.2\hibernate3-maven-plugin-2.2.jar): error in opening zip file [INFO] [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ RoleManager --- [INFO] com.mycompany:RoleManager:war:1.0-SNAPSHOT [INFO] +- org.apache.tapestry:tapestry-core:jar:5.3.6:compile [INFO] | +- org.apache.tapestry:tapestry-json:jar:5.3.6:compile [INFO] | +- org.antlr:antlr-runtime:jar:3.3:compile [INFO] | | \- org.antlr:stringtemplate:jar:3.2.1:compile [INFO] | +- org.apache.tapestry:tapestry-ioc:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry5-annotations:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry-func:jar:5.3.6:compile [INFO] | | +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile [INFO] | | +- javax.inject:javax.inject:jar:1:compile [INFO] | | +- org.apache.tapestry:plastic:jar:5.3.6:compile [INFO] | | +- log4j:log4j:jar:1.2.14:compile [INFO] | | \- javassist:javassist:jar:3.12.1.GA:compile [INFO] | \- commons-codec:commons-codec:jar:1.5:compile [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile [INFO] | +- org.seleniumhq.selenium:selenium-server:jar:2.14.0:compile [INFO] | | +- bouncycastle:bcprov-jdk15:jar:135:compile [INFO] | | +- mx4j:mx4j-tools:jar:3.0.1:compile [INFO] | | +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.9:compile [INFO] | | +- net.jcip:jcip-annotations:jar:1.0:compile [INFO] | | \- org.yaml:snakeyaml:jar:1.8:compile [INFO] | +- org.eclipse.jetty:jetty-plus:jar:7.0.0.v20091005:compile [INFO] | | \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compil e [INFO] | +- org.seleniumhq.selenium:selenium-java:jar:2.14.0:compile [INFO] | | +- org.seleniumhq.selenium:selenium-android-driver:jar:2.14.0:compi le [INFO] | | | \- org.seleniumhq.selenium:selenium-remote-driver:jar:2.14.0:com pile [INFO] | | | +- org.json:json:jar:20080701:compile [INFO] | | | \- com.google.guava:guava:jar:10.0.1:compile [INFO] | | |\- com.google.code.findbugs:jsr305:jar:1.3.9:compile [INFO] | | +- org.seleniumhq.selenium:selenium-chrome-driver:jar:2.14.0:compil e [INFO] | | +- org.seleniumhq.selenium:selenium-htmlunit-driver:jar:2.14.0:comp ile [INFO] | | | +- org.seleniumhq.selenium:selenium-api:jar:2.14.0:compile [INFO] | | | +- net.sourceforge.htmlunit:htmlunit:jar:2.9:compile [INFO] | | | | +- xalan:xalan:jar:2.7.1:compile [INFO] | | | | | \- xalan:serializer:jar:2.7.1:compile [INFO] | | | | +- org.apache.httpcomponents:httpmime:jar:4.1.2:compile [INFO] | | | | +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.9:compile [INFO] | | | | +- xerces:xercesImpl:jar:2.9.1:compile [INFO] | | | | | \- xml-apis:xml-apis:jar:1.3.04:compile [INFO] | | | | +- net.sourceforge.nekohtml:nekohtml:jar:1.9.15:compile [INFO] | | | | \- net.sourceforge.cssparser:cssparser:jar:0.9.5:compile [INFO] | | | | \- org.w3c.css:sac:jar:1.3:compile [INFO] | | | \- org.apache.httpcomponents:httpclient:jar:4.1.2:compile [INFO] | | | \- org.apache.httpcomponents:httpcore:jar:4.1.2:compile [INFO] | | +- org.seleniumhq.selenium:selenium-firefox-driver:jar:2.14.0:compi le [INFO] | | | \- org.apache.commons:commons-exec:jar:1.1:compile [INFO] | | +- org.seleniumhq.selenium:selenium-ie-driver:jar:2.14.0:compile [INFO] | | | \- net.java.dev.jna:jna:jar:3.3.0:compile [INFO] | | +- org.seleniumhq.selenium:selenium-iphone-driver:jar:2.14.0:compil e [INFO] | | \- org.seleniumhq.selenium:selenium-support:jar:2.14.0:compile [INFO] | +- org.testng:testng:jar:5.14.10:compile [INFO] | | +- org.beanshell:bsh:jar:2.0b4:compile [INFO] | | \- com.beust:jcommander:jar:1.12:compile [INFO] | +- org.eclipse.jetty:jetty-webapp:jar:7.0.0.v20091005:compile [INFO] | | +- org.eclipse.jetty:jetty-xml:jar:7.0.0.v20091005:compile [INFO] | | | \- org.eclipse.jetty:jetty-util:jar:7.0.0.v20091005:compile [INFO] | | \- org.eclipse.jetty:jetty-servlet:jar:7.0.0.v20091005:compile [INFO] | | \- org.eclipse.jetty:jetty-security:jar:7.0.0.v20091005:compile [INFO] | +- jetty:org.mortbay.jetty:jar:5.1.12:compile [INFO] | +- org.eclipse.jetty:jetty-jndi:jar:7.0.0.v20091005:compile [INFO] | | \- javax.mail:mail:jar:1.4:compile [INFO] | +- org.easymock:easymock:jar:3.0:compile [INFO] | | +- cglib:cglib-nodep:jar:2.2:compile [INFO] | | \- org.objenesis:objenesis:jar:1.2:compile [INFO] | +- org.eclipse.jetty:jetty-server:jar:7.0.0.v20091005:compile [INFO] | | +- org.eclipse.jetty:jetty-continuation:jar:7.0.0.v20091005:compile [INFO] | | \- org.eclipse.jetty:jetty-http:jar:7.0.0.v20091005:compile [INFO] | | \- org.eclipse.jetty:jetty-io:jar:7.0.0.v20091005:compile [INFO] | +-
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
Not sure (I don't use hibernate) but hibernate-jta and geronimo-jta stuff may conflict. On Apr 29, 2013, at 2:10 PM, George Christman wrote: Here's my mvn dependency tree, thanks for your help. [WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:hibernate3- maven-plugin:2.2: Failed to parse plugin descriptor for org.codehaus.mojo:hibern ate3-maven-plugin:2.2 (C:\Users\gmc07\.m2\repository\org\codehaus\mojo\hibernate 3-maven-plugin\2.2\hibernate3-maven-plugin-2.2.jar): error in opening zip file [INFO] [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ RoleManager --- [INFO] com.mycompany:RoleManager:war:1.0-SNAPSHOT [INFO] +- org.apache.tapestry:tapestry-core:jar:5.3.6:compile [INFO] | +- org.apache.tapestry:tapestry-json:jar:5.3.6:compile [INFO] | +- org.antlr:antlr-runtime:jar:3.3:compile [INFO] | | \- org.antlr:stringtemplate:jar:3.2.1:compile [INFO] | +- org.apache.tapestry:tapestry-ioc:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry5-annotations:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry-func:jar:5.3.6:compile [INFO] | | +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile [INFO] | | +- javax.inject:javax.inject:jar:1:compile [INFO] | | +- org.apache.tapestry:plastic:jar:5.3.6:compile [INFO] | | +- log4j:log4j:jar:1.2.14:compile [INFO] | | \- javassist:javassist:jar:3.12.1.GA:compile [INFO] | \- commons-codec:commons-codec:jar:1.5:compile [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile [INFO] | +- org.seleniumhq.selenium:selenium-server:jar:2.14.0:compile [INFO] | | +- bouncycastle:bcprov-jdk15:jar:135:compile [INFO] | | +- mx4j:mx4j-tools:jar:3.0.1:compile [INFO] | | +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.9:compile [INFO] | | +- net.jcip:jcip-annotations:jar:1.0:compile [INFO] | | \- org.yaml:snakeyaml:jar:1.8:compile [INFO] | +- org.eclipse.jetty:jetty-plus:jar:7.0.0.v20091005:compile [INFO] | | \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compil e [INFO] | +- org.seleniumhq.selenium:selenium-java:jar:2.14.0:compile [INFO] | | +- org.seleniumhq.selenium:selenium-android-driver:jar:2.14.0:compi le [INFO] | | | \- org.seleniumhq.selenium:selenium-remote-driver:jar:2.14.0:com pile [INFO] | | | +- org.json:json:jar:20080701:compile [INFO] | | | \- com.google.guava:guava:jar:10.0.1:compile [INFO] | | |\- com.google.code.findbugs:jsr305:jar:1.3.9:compile [INFO] | | +- org.seleniumhq.selenium:selenium-chrome-driver:jar:2.14.0:compil e [INFO] | | +- org.seleniumhq.selenium:selenium-htmlunit-driver:jar:2.14.0:comp ile [INFO] | | | +- org.seleniumhq.selenium:selenium-api:jar:2.14.0:compile [INFO] | | | +- net.sourceforge.htmlunit:htmlunit:jar:2.9:compile [INFO] | | | | +- xalan:xalan:jar:2.7.1:compile [INFO] | | | | | \- xalan:serializer:jar:2.7.1:compile [INFO] | | | | +- org.apache.httpcomponents:httpmime:jar:4.1.2:compile [INFO] | | | | +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.9:compile [INFO] | | | | +- xerces:xercesImpl:jar:2.9.1:compile [INFO] | | | | | \- xml-apis:xml-apis:jar:1.3.04:compile [INFO] | | | | +- net.sourceforge.nekohtml:nekohtml:jar:1.9.15:compile [INFO] | | | | \- net.sourceforge.cssparser:cssparser:jar:0.9.5:compile [INFO] | | | | \- org.w3c.css:sac:jar:1.3:compile [INFO] | | | \- org.apache.httpcomponents:httpclient:jar:4.1.2:compile [INFO] | | | \- org.apache.httpcomponents:httpcore:jar:4.1.2:compile [INFO] | | +- org.seleniumhq.selenium:selenium-firefox-driver:jar:2.14.0:compi le [INFO] | | | \- org.apache.commons:commons-exec:jar:1.1:compile [INFO] | | +- org.seleniumhq.selenium:selenium-ie-driver:jar:2.14.0:compile [INFO] | | | \- net.java.dev.jna:jna:jar:3.3.0:compile [INFO] | | +- org.seleniumhq.selenium:selenium-iphone-driver:jar:2.14.0:compil e [INFO] | | \- org.seleniumhq.selenium:selenium-support:jar:2.14.0:compile [INFO] | +- org.testng:testng:jar:5.14.10:compile [INFO] | | +- org.beanshell:bsh:jar:2.0b4:compile [INFO] | | \- com.beust:jcommander:jar:1.12:compile [INFO] | +- org.eclipse.jetty:jetty-webapp:jar:7.0.0.v20091005:compile [INFO] | | +- org.eclipse.jetty:jetty-xml:jar:7.0.0.v20091005:compile [INFO] | | | \- org.eclipse.jetty:jetty-util:jar:7.0.0.v20091005:compile [INFO] | | \- org.eclipse.jetty:jetty-servlet:jar:7.0.0.v20091005:compile [INFO] | | \- org.eclipse.jetty:jetty-security:jar:7.0.0.v20091005:compile [INFO] | +- jetty:org.mortbay.jetty:jar:5.1.12:compile [INFO] | +- org.eclipse.jetty:jetty-jndi:jar:7.0.0.v20091005:compile [INFO] | | \- javax.mail:mail:jar:1.4:compile [INFO] | +- org.easymock:easymock:jar:3.0:compile [INFO] | | +- cglib:cglib-nodep:jar:2.2:compile [INFO] | | \- org.objenesis:objenesis:jar:1.2:compile [INFO] | +- org.eclipse.jetty:jetty-server:jar:7.0.0.v20091005:compile [INFO] | | +-
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
You could also (if you're using Eclipse) use Ctrl-Shift-T to see what jar(s) might be containing the org.apache.catalina.deploy.WebXml class (which seems to be the offending duplicate). On 29 April 2013 14:10, George Christman gchrist...@cardaddy.com wrote: Here's my mvn dependency tree, thanks for your help. [WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:hibernate3- maven-plugin:2.2: Failed to parse plugin descriptor for org.codehaus.mojo:hibern ate3-maven-plugin:2.2 (C:\Users\gmc07\.m2\repository\org\codehaus\mojo\hibernate 3-maven-plugin\2.2\hibernate3-maven-plugin-2.2.jar): error in opening zip file [INFO] [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ RoleManager --- [INFO] com.mycompany:RoleManager:war:1.0-SNAPSHOT [INFO] +- org.apache.tapestry:tapestry-core:jar:5.3.6:compile [INFO] | +- org.apache.tapestry:tapestry-json:jar:5.3.6:compile [INFO] | +- org.antlr:antlr-runtime:jar:3.3:compile [INFO] | | \- org.antlr:stringtemplate:jar:3.2.1:compile [INFO] | +- org.apache.tapestry:tapestry-ioc:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry5-annotations:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry-func:jar:5.3.6:compile [INFO] | | +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile [INFO] | | +- javax.inject:javax.inject:jar:1:compile [INFO] | | +- org.apache.tapestry:plastic:jar:5.3.6:compile [INFO] | | +- log4j:log4j:jar:1.2.14:compile [INFO] | | \- javassist:javassist:jar:3.12.1.GA:compile [INFO] | \- commons-codec:commons-codec:jar:1.5:compile [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile [INFO] | +- org.seleniumhq.selenium:selenium-server:jar:2.14.0:compile [INFO] | | +- bouncycastle:bcprov-jdk15:jar:135:compile [INFO] | | +- mx4j:mx4j-tools:jar:3.0.1:compile [INFO] | | +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.9:compile [INFO] | | +- net.jcip:jcip-annotations:jar:1.0:compile [INFO] | | \- org.yaml:snakeyaml:jar:1.8:compile [INFO] | +- org.eclipse.jetty:jetty-plus:jar:7.0.0.v20091005:compile [INFO] | | \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compil e [INFO] | +- org.seleniumhq.selenium:selenium-java:jar:2.14.0:compile [INFO] | | +- org.seleniumhq.selenium:selenium-android-driver:jar:2.14.0:compi le [INFO] | | | \- org.seleniumhq.selenium:selenium-remote-driver:jar:2.14.0:com pile [INFO] | | | +- org.json:json:jar:20080701:compile [INFO] | | | \- com.google.guava:guava:jar:10.0.1:compile [INFO] | | |\- com.google.code.findbugs:jsr305:jar:1.3.9:compile [INFO] | | +- org.seleniumhq.selenium:selenium-chrome-driver:jar:2.14.0:compil e [INFO] | | +- org.seleniumhq.selenium:selenium-htmlunit-driver:jar:2.14.0:comp ile [INFO] | | | +- org.seleniumhq.selenium:selenium-api:jar:2.14.0:compile [INFO] | | | +- net.sourceforge.htmlunit:htmlunit:jar:2.9:compile [INFO] | | | | +- xalan:xalan:jar:2.7.1:compile [INFO] | | | | | \- xalan:serializer:jar:2.7.1:compile [INFO] | | | | +- org.apache.httpcomponents:httpmime:jar:4.1.2:compile [INFO] | | | | +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.9:compile [INFO] | | | | +- xerces:xercesImpl:jar:2.9.1:compile [INFO] | | | | | \- xml-apis:xml-apis:jar:1.3.04:compile [INFO] | | | | +- net.sourceforge.nekohtml:nekohtml:jar:1.9.15:compile [INFO] | | | | \- net.sourceforge.cssparser:cssparser:jar:0.9.5:compile [INFO] | | | | \- org.w3c.css:sac:jar:1.3:compile [INFO] | | | \- org.apache.httpcomponents:httpclient:jar:4.1.2:compile [INFO] | | | \- org.apache.httpcomponents:httpcore:jar:4.1.2:compile [INFO] | | +- org.seleniumhq.selenium:selenium-firefox-driver:jar:2.14.0:compi le [INFO] | | | \- org.apache.commons:commons-exec:jar:1.1:compile [INFO] | | +- org.seleniumhq.selenium:selenium-ie-driver:jar:2.14.0:compile [INFO] | | | \- net.java.dev.jna:jna:jar:3.3.0:compile [INFO] | | +- org.seleniumhq.selenium:selenium-iphone-driver:jar:2.14.0:compil e [INFO] | | \- org.seleniumhq.selenium:selenium-support:jar:2.14.0:compile [INFO] | +- org.testng:testng:jar:5.14.10:compile [INFO] | | +- org.beanshell:bsh:jar:2.0b4:compile [INFO] | | \- com.beust:jcommander:jar:1.12:compile [INFO] | +- org.eclipse.jetty:jetty-webapp:jar:7.0.0.v20091005:compile [INFO] | | +- org.eclipse.jetty:jetty-xml:jar:7.0.0.v20091005:compile [INFO] | | | \- org.eclipse.jetty:jetty-util:jar:7.0.0.v20091005:compile [INFO] | | \- org.eclipse.jetty:jetty-servlet:jar:7.0.0.v20091005:compile [INFO] | | \- org.eclipse.jetty:jetty-security:jar:7.0.0.v20091005:compile [INFO] | +- jetty:org.mortbay.jetty:jar:5.1.12:compile [INFO] | +- org.eclipse.jetty:jetty-jndi:jar:7.0.0.v20091005:compile [INFO] | | \- javax.mail:mail:jar:1.4:compile [INFO] | +- org.easymock:easymock:jar:3.0:compile [INFO] | | +- cglib:cglib-nodep:jar:2.2:compile [INFO] | | \-
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
How do you run your project? Is it from within eclipse? Or you're deploying a *.war file? Could it be that these files getting into classpath? [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile ... [INFO] | +- org.apache.tomcat:dbcp:jar:6.0.30:compile [INFO] | +- org.apache.tomcat:coyote:jar:6.0.30:compile [INFO] | | +- org.apache.tomcat:servlet-api:jar:6.0.30:compile [INFO] | | \- org.apache.tomcat:juli:jar:6.0.30:compile [INFO] | \- org.apache.tomcat:catalina:jar:6.0.30:compile [INFO] | \- org.apache.tomcat:annotations-api:jar:6.0.30:compile They shouldn't, as well as any transitive dependencies of org.apache.tapestry:tapestry-test On Mon, Apr 29, 2013 at 10:10 PM, George Christman gchrist...@cardaddy.comwrote: Here's my mvn dependency tree, thanks for your help. [WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:hibernate3- maven-plugin:2.2: Failed to parse plugin descriptor for org.codehaus.mojo:hibern ate3-maven-plugin:2.2 (C:\Users\gmc07\.m2\repository\org\codehaus\mojo\hibernate 3-maven-plugin\2.2\hibernate3-maven-plugin-2.2.jar): error in opening zip file [INFO] [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ RoleManager --- [INFO] com.mycompany:RoleManager:war:1.0-SNAPSHOT [INFO] +- org.apache.tapestry:tapestry-core:jar:5.3.6:compile [INFO] | +- org.apache.tapestry:tapestry-json:jar:5.3.6:compile [INFO] | +- org.antlr:antlr-runtime:jar:3.3:compile [INFO] | | \- org.antlr:stringtemplate:jar:3.2.1:compile [INFO] | +- org.apache.tapestry:tapestry-ioc:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry5-annotations:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry-func:jar:5.3.6:compile [INFO] | | +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile [INFO] | | +- javax.inject:javax.inject:jar:1:compile [INFO] | | +- org.apache.tapestry:plastic:jar:5.3.6:compile [INFO] | | +- log4j:log4j:jar:1.2.14:compile [INFO] | | \- javassist:javassist:jar:3.12.1.GA:compile [INFO] | \- commons-codec:commons-codec:jar:1.5:compile [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile [INFO] | +- org.seleniumhq.selenium:selenium-server:jar:2.14.0:compile [INFO] | | +- bouncycastle:bcprov-jdk15:jar:135:compile [INFO] | | +- mx4j:mx4j-tools:jar:3.0.1:compile [INFO] | | +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.9:compile [INFO] | | +- net.jcip:jcip-annotations:jar:1.0:compile [INFO] | | \- org.yaml:snakeyaml:jar:1.8:compile [INFO] | +- org.eclipse.jetty:jetty-plus:jar:7.0.0.v20091005:compile [INFO] | | \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compil e [INFO] | +- org.seleniumhq.selenium:selenium-java:jar:2.14.0:compile [INFO] | | +- org.seleniumhq.selenium:selenium-android-driver:jar:2.14.0:compi le [INFO] | | | \- org.seleniumhq.selenium:selenium-remote-driver:jar:2.14.0:com pile [INFO] | | | +- org.json:json:jar:20080701:compile [INFO] | | | \- com.google.guava:guava:jar:10.0.1:compile [INFO] | | |\- com.google.code.findbugs:jsr305:jar:1.3.9:compile [INFO] | | +- org.seleniumhq.selenium:selenium-chrome-driver:jar:2.14.0:compil e [INFO] | | +- org.seleniumhq.selenium:selenium-htmlunit-driver:jar:2.14.0:comp ile [INFO] | | | +- org.seleniumhq.selenium:selenium-api:jar:2.14.0:compile [INFO] | | | +- net.sourceforge.htmlunit:htmlunit:jar:2.9:compile [INFO] | | | | +- xalan:xalan:jar:2.7.1:compile [INFO] | | | | | \- xalan:serializer:jar:2.7.1:compile [INFO] | | | | +- org.apache.httpcomponents:httpmime:jar:4.1.2:compile [INFO] | | | | +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.9:compile [INFO] | | | | +- xerces:xercesImpl:jar:2.9.1:compile [INFO] | | | | | \- xml-apis:xml-apis:jar:1.3.04:compile [INFO] | | | | +- net.sourceforge.nekohtml:nekohtml:jar:1.9.15:compile [INFO] | | | | \- net.sourceforge.cssparser:cssparser:jar:0.9.5:compile [INFO] | | | | \- org.w3c.css:sac:jar:1.3:compile [INFO] | | | \- org.apache.httpcomponents:httpclient:jar:4.1.2:compile [INFO] | | | \- org.apache.httpcomponents:httpcore:jar:4.1.2:compile [INFO] | | +- org.seleniumhq.selenium:selenium-firefox-driver:jar:2.14.0:compi le [INFO] | | | \- org.apache.commons:commons-exec:jar:1.1:compile [INFO] | | +- org.seleniumhq.selenium:selenium-ie-driver:jar:2.14.0:compile [INFO] | | | \- net.java.dev.jna:jna:jar:3.3.0:compile [INFO] | | +- org.seleniumhq.selenium:selenium-iphone-driver:jar:2.14.0:compil e [INFO] | | \- org.seleniumhq.selenium:selenium-support:jar:2.14.0:compile [INFO] | +- org.testng:testng:jar:5.14.10:compile [INFO] | | +- org.beanshell:bsh:jar:2.0b4:compile [INFO] | | \- com.beust:jcommander:jar:1.12:compile [INFO] | +- org.eclipse.jetty:jetty-webapp:jar:7.0.0.v20091005:compile [INFO] | | +- org.eclipse.jetty:jetty-xml:jar:7.0.0.v20091005:compile [INFO] | | | \-
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
I run my project from Netbeans, locally with jetty, and deployed as a war. On Mon, Apr 29, 2013 at 2:21 PM, Dmitry Gusev dmitry.gu...@gmail.comwrote: How do you run your project? Is it from within eclipse? Or you're deploying a *.war file? Could it be that these files getting into classpath? [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile ... [INFO] | +- org.apache.tomcat:dbcp:jar:6.0.30:compile [INFO] | +- org.apache.tomcat:coyote:jar:6.0.30:compile [INFO] | | +- org.apache.tomcat:servlet-api:jar:6.0.30:compile [INFO] | | \- org.apache.tomcat:juli:jar:6.0.30:compile [INFO] | \- org.apache.tomcat:catalina:jar:6.0.30:compile [INFO] | \- org.apache.tomcat:annotations-api:jar:6.0.30:compile They shouldn't, as well as any transitive dependencies of org.apache.tapestry:tapestry-test On Mon, Apr 29, 2013 at 10:10 PM, George Christman gchrist...@cardaddy.comwrote: Here's my mvn dependency tree, thanks for your help. [WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:hibernate3- maven-plugin:2.2: Failed to parse plugin descriptor for org.codehaus.mojo:hibern ate3-maven-plugin:2.2 (C:\Users\gmc07\.m2\repository\org\codehaus\mojo\hibernate 3-maven-plugin\2.2\hibernate3-maven-plugin-2.2.jar): error in opening zip file [INFO] [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ RoleManager --- [INFO] com.mycompany:RoleManager:war:1.0-SNAPSHOT [INFO] +- org.apache.tapestry:tapestry-core:jar:5.3.6:compile [INFO] | +- org.apache.tapestry:tapestry-json:jar:5.3.6:compile [INFO] | +- org.antlr:antlr-runtime:jar:3.3:compile [INFO] | | \- org.antlr:stringtemplate:jar:3.2.1:compile [INFO] | +- org.apache.tapestry:tapestry-ioc:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry5-annotations:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry-func:jar:5.3.6:compile [INFO] | | +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile [INFO] | | +- javax.inject:javax.inject:jar:1:compile [INFO] | | +- org.apache.tapestry:plastic:jar:5.3.6:compile [INFO] | | +- log4j:log4j:jar:1.2.14:compile [INFO] | | \- javassist:javassist:jar:3.12.1.GA:compile [INFO] | \- commons-codec:commons-codec:jar:1.5:compile [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile [INFO] | +- org.seleniumhq.selenium:selenium-server:jar:2.14.0:compile [INFO] | | +- bouncycastle:bcprov-jdk15:jar:135:compile [INFO] | | +- mx4j:mx4j-tools:jar:3.0.1:compile [INFO] | | +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.9:compile [INFO] | | +- net.jcip:jcip-annotations:jar:1.0:compile [INFO] | | \- org.yaml:snakeyaml:jar:1.8:compile [INFO] | +- org.eclipse.jetty:jetty-plus:jar:7.0.0.v20091005:compile [INFO] | | \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compil e [INFO] | +- org.seleniumhq.selenium:selenium-java:jar:2.14.0:compile [INFO] | | +- org.seleniumhq.selenium:selenium-android-driver:jar:2.14.0:compi le [INFO] | | | \- org.seleniumhq.selenium:selenium-remote-driver:jar:2.14.0:com pile [INFO] | | | +- org.json:json:jar:20080701:compile [INFO] | | | \- com.google.guava:guava:jar:10.0.1:compile [INFO] | | |\- com.google.code.findbugs:jsr305:jar:1.3.9:compile [INFO] | | +- org.seleniumhq.selenium:selenium-chrome-driver:jar:2.14.0:compil e [INFO] | | +- org.seleniumhq.selenium:selenium-htmlunit-driver:jar:2.14.0:comp ile [INFO] | | | +- org.seleniumhq.selenium:selenium-api:jar:2.14.0:compile [INFO] | | | +- net.sourceforge.htmlunit:htmlunit:jar:2.9:compile [INFO] | | | | +- xalan:xalan:jar:2.7.1:compile [INFO] | | | | | \- xalan:serializer:jar:2.7.1:compile [INFO] | | | | +- org.apache.httpcomponents:httpmime:jar:4.1.2:compile [INFO] | | | | +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.9:compile [INFO] | | | | +- xerces:xercesImpl:jar:2.9.1:compile [INFO] | | | | | \- xml-apis:xml-apis:jar:1.3.04:compile [INFO] | | | | +- net.sourceforge.nekohtml:nekohtml:jar:1.9.15:compile [INFO] | | | | \- net.sourceforge.cssparser:cssparser:jar:0.9.5:compile [INFO] | | | | \- org.w3c.css:sac:jar:1.3:compile [INFO] | | | \- org.apache.httpcomponents:httpclient:jar:4.1.2:compile [INFO] | | | \- org.apache.httpcomponents:httpcore:jar:4.1.2:compile [INFO] | | +- org.seleniumhq.selenium:selenium-firefox-driver:jar:2.14.0:compi le [INFO] | | | \- org.apache.commons:commons-exec:jar:1.1:compile [INFO] | | +- org.seleniumhq.selenium:selenium-ie-driver:jar:2.14.0:compile [INFO] | | | \- net.java.dev.jna:jna:jar:3.3.0:compile [INFO] | | +- org.seleniumhq.selenium:selenium-iphone-driver:jar:2.14.0:compil e [INFO] | | \- org.seleniumhq.selenium:selenium-support:jar:2.14.0:compile [INFO] | +- org.testng:testng:jar:5.14.10:compile [INFO] | | +- org.beanshell:bsh:jar:2.0b4:compile
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
I was wondering the same thing about those files, but as you said they shouldn't. On Mon, Apr 29, 2013 at 2:23 PM, George Christman gchrist...@cardaddy.comwrote: I run my project from Netbeans, locally with jetty, and deployed as a war. On Mon, Apr 29, 2013 at 2:21 PM, Dmitry Gusev dmitry.gu...@gmail.comwrote: How do you run your project? Is it from within eclipse? Or you're deploying a *.war file? Could it be that these files getting into classpath? [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile ... [INFO] | +- org.apache.tomcat:dbcp:jar:6.0.30:compile [INFO] | +- org.apache.tomcat:coyote:jar:6.0.30:compile [INFO] | | +- org.apache.tomcat:servlet-api:jar:6.0.30:compile [INFO] | | \- org.apache.tomcat:juli:jar:6.0.30:compile [INFO] | \- org.apache.tomcat:catalina:jar:6.0.30:compile [INFO] | \- org.apache.tomcat:annotations-api:jar:6.0.30:compile They shouldn't, as well as any transitive dependencies of org.apache.tapestry:tapestry-test On Mon, Apr 29, 2013 at 10:10 PM, George Christman gchrist...@cardaddy.comwrote: Here's my mvn dependency tree, thanks for your help. [WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:hibernate3- maven-plugin:2.2: Failed to parse plugin descriptor for org.codehaus.mojo:hibern ate3-maven-plugin:2.2 (C:\Users\gmc07\.m2\repository\org\codehaus\mojo\hibernate 3-maven-plugin\2.2\hibernate3-maven-plugin-2.2.jar): error in opening zip file [INFO] [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ RoleManager --- [INFO] com.mycompany:RoleManager:war:1.0-SNAPSHOT [INFO] +- org.apache.tapestry:tapestry-core:jar:5.3.6:compile [INFO] | +- org.apache.tapestry:tapestry-json:jar:5.3.6:compile [INFO] | +- org.antlr:antlr-runtime:jar:3.3:compile [INFO] | | \- org.antlr:stringtemplate:jar:3.2.1:compile [INFO] | +- org.apache.tapestry:tapestry-ioc:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry5-annotations:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry-func:jar:5.3.6:compile [INFO] | | +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile [INFO] | | +- javax.inject:javax.inject:jar:1:compile [INFO] | | +- org.apache.tapestry:plastic:jar:5.3.6:compile [INFO] | | +- log4j:log4j:jar:1.2.14:compile [INFO] | | \- javassist:javassist:jar:3.12.1.GA:compile [INFO] | \- commons-codec:commons-codec:jar:1.5:compile [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile [INFO] | +- org.seleniumhq.selenium:selenium-server:jar:2.14.0:compile [INFO] | | +- bouncycastle:bcprov-jdk15:jar:135:compile [INFO] | | +- mx4j:mx4j-tools:jar:3.0.1:compile [INFO] | | +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.9:compile [INFO] | | +- net.jcip:jcip-annotations:jar:1.0:compile [INFO] | | \- org.yaml:snakeyaml:jar:1.8:compile [INFO] | +- org.eclipse.jetty:jetty-plus:jar:7.0.0.v20091005:compile [INFO] | | \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compil e [INFO] | +- org.seleniumhq.selenium:selenium-java:jar:2.14.0:compile [INFO] | | +- org.seleniumhq.selenium:selenium-android-driver:jar:2.14.0:compi le [INFO] | | | \- org.seleniumhq.selenium:selenium-remote-driver:jar:2.14.0:com pile [INFO] | | | +- org.json:json:jar:20080701:compile [INFO] | | | \- com.google.guava:guava:jar:10.0.1:compile [INFO] | | |\- com.google.code.findbugs:jsr305:jar:1.3.9:compile [INFO] | | +- org.seleniumhq.selenium:selenium-chrome-driver:jar:2.14.0:compil e [INFO] | | +- org.seleniumhq.selenium:selenium-htmlunit-driver:jar:2.14.0:comp ile [INFO] | | | +- org.seleniumhq.selenium:selenium-api:jar:2.14.0:compile [INFO] | | | +- net.sourceforge.htmlunit:htmlunit:jar:2.9:compile [INFO] | | | | +- xalan:xalan:jar:2.7.1:compile [INFO] | | | | | \- xalan:serializer:jar:2.7.1:compile [INFO] | | | | +- org.apache.httpcomponents:httpmime:jar:4.1.2:compile [INFO] | | | | +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.9:compile [INFO] | | | | +- xerces:xercesImpl:jar:2.9.1:compile [INFO] | | | | | \- xml-apis:xml-apis:jar:1.3.04:compile [INFO] | | | | +- net.sourceforge.nekohtml:nekohtml:jar:1.9.15:compile [INFO] | | | | \- net.sourceforge.cssparser:cssparser:jar:0.9.5:compile [INFO] | | | | \- org.w3c.css:sac:jar:1.3:compile [INFO] | | | \- org.apache.httpcomponents:httpclient:jar:4.1.2:compile [INFO] | | | \- org.apache.httpcomponents:httpcore:jar:4.1.2:compile [INFO] | | +- org.seleniumhq.selenium:selenium-firefox-driver:jar:2.14.0:compi le [INFO] | | | \- org.apache.commons:commons-exec:jar:1.1:compile [INFO] | | +- org.seleniumhq.selenium:selenium-ie-driver:jar:2.14.0:compile [INFO] | | | \- net.java.dev.jna:jna:jar:3.3.0:compile [INFO] | | +- org.seleniumhq.selenium:selenium-iphone-driver:jar:2.14.0:compil e [INFO] | | \-
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
They will be present in classpath if you won't exclude them. I'm not familiar with Netbeans, but in Eclipse Sysdeo Plugin I have to manually remove them, so you should check your runtime classpath. You can also try to build a war and look at WEB-INF/lib folder to check if these files not there. On Mon, Apr 29, 2013 at 10:25 PM, George Christman gchrist...@cardaddy.comwrote: I was wondering the same thing about those files, but as you said they shouldn't. On Mon, Apr 29, 2013 at 2:23 PM, George Christman gchrist...@cardaddy.comwrote: I run my project from Netbeans, locally with jetty, and deployed as a war. On Mon, Apr 29, 2013 at 2:21 PM, Dmitry Gusev dmitry.gu...@gmail.com wrote: How do you run your project? Is it from within eclipse? Or you're deploying a *.war file? Could it be that these files getting into classpath? [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile ... [INFO] | +- org.apache.tomcat:dbcp:jar:6.0.30:compile [INFO] | +- org.apache.tomcat:coyote:jar:6.0.30:compile [INFO] | | +- org.apache.tomcat:servlet-api:jar:6.0.30:compile [INFO] | | \- org.apache.tomcat:juli:jar:6.0.30:compile [INFO] | \- org.apache.tomcat:catalina:jar:6.0.30:compile [INFO] | \- org.apache.tomcat:annotations-api:jar:6.0.30:compile They shouldn't, as well as any transitive dependencies of org.apache.tapestry:tapestry-test On Mon, Apr 29, 2013 at 10:10 PM, George Christman gchrist...@cardaddy.comwrote: Here's my mvn dependency tree, thanks for your help. [WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:hibernate3- maven-plugin:2.2: Failed to parse plugin descriptor for org.codehaus.mojo:hibern ate3-maven-plugin:2.2 (C:\Users\gmc07\.m2\repository\org\codehaus\mojo\hibernate 3-maven-plugin\2.2\hibernate3-maven-plugin-2.2.jar): error in opening zip file [INFO] [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ RoleManager --- [INFO] com.mycompany:RoleManager:war:1.0-SNAPSHOT [INFO] +- org.apache.tapestry:tapestry-core:jar:5.3.6:compile [INFO] | +- org.apache.tapestry:tapestry-json:jar:5.3.6:compile [INFO] | +- org.antlr:antlr-runtime:jar:3.3:compile [INFO] | | \- org.antlr:stringtemplate:jar:3.2.1:compile [INFO] | +- org.apache.tapestry:tapestry-ioc:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry5-annotations:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry-func:jar:5.3.6:compile [INFO] | | +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile [INFO] | | +- javax.inject:javax.inject:jar:1:compile [INFO] | | +- org.apache.tapestry:plastic:jar:5.3.6:compile [INFO] | | +- log4j:log4j:jar:1.2.14:compile [INFO] | | \- javassist:javassist:jar:3.12.1.GA:compile [INFO] | \- commons-codec:commons-codec:jar:1.5:compile [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile [INFO] | +- org.seleniumhq.selenium:selenium-server:jar:2.14.0:compile [INFO] | | +- bouncycastle:bcprov-jdk15:jar:135:compile [INFO] | | +- mx4j:mx4j-tools:jar:3.0.1:compile [INFO] | | +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.9:compile [INFO] | | +- net.jcip:jcip-annotations:jar:1.0:compile [INFO] | | \- org.yaml:snakeyaml:jar:1.8:compile [INFO] | +- org.eclipse.jetty:jetty-plus:jar:7.0.0.v20091005:compile [INFO] | | \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compil e [INFO] | +- org.seleniumhq.selenium:selenium-java:jar:2.14.0:compile [INFO] | | +- org.seleniumhq.selenium:selenium-android-driver:jar:2.14.0:compi le [INFO] | | | \- org.seleniumhq.selenium:selenium-remote-driver:jar:2.14.0:com pile [INFO] | | | +- org.json:json:jar:20080701:compile [INFO] | | | \- com.google.guava:guava:jar:10.0.1:compile [INFO] | | |\- com.google.code.findbugs:jsr305:jar:1.3.9:compile [INFO] | | +- org.seleniumhq.selenium:selenium-chrome-driver:jar:2.14.0:compil e [INFO] | | +- org.seleniumhq.selenium:selenium-htmlunit-driver:jar:2.14.0:comp ile [INFO] | | | +- org.seleniumhq.selenium:selenium-api:jar:2.14.0:compile [INFO] | | | +- net.sourceforge.htmlunit:htmlunit:jar:2.9:compile [INFO] | | | | +- xalan:xalan:jar:2.7.1:compile [INFO] | | | | | \- xalan:serializer:jar:2.7.1:compile [INFO] | | | | +- org.apache.httpcomponents:httpmime:jar:4.1.2:compile [INFO] | | | | +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.9:compile [INFO] | | | | +- xerces:xercesImpl:jar:2.9.1:compile [INFO] | | | | | \- xml-apis:xml-apis:jar:1.3.04:compile [INFO] | | | | +- net.sourceforge.nekohtml:nekohtml:jar:1.9.15:compile [INFO] | | | | \- net.sourceforge.cssparser:cssparser:jar:0.9.5:compile [INFO] | | | | \- org.w3c.css:sac:jar:1.3:compile [INFO] | | | \-
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
Netbeans runs just under plane maven, just like from the command line. There maybe stale files in WEB-INF/lib, but if you run mvn clean, they will be gone. exclusions maven directive is your friend here On Apr 29, 2013, at 2:38 PM, Dmitry Gusev wrote: They will be present in classpath if you won't exclude them. I'm not familiar with Netbeans, but in Eclipse Sysdeo Plugin I have to manually remove them, so you should check your runtime classpath. You can also try to build a war and look at WEB-INF/lib folder to check if these files not there. On Mon, Apr 29, 2013 at 10:25 PM, George Christman gchrist...@cardaddy.comwrote: I was wondering the same thing about those files, but as you said they shouldn't. On Mon, Apr 29, 2013 at 2:23 PM, George Christman gchrist...@cardaddy.comwrote: I run my project from Netbeans, locally with jetty, and deployed as a war. On Mon, Apr 29, 2013 at 2:21 PM, Dmitry Gusev dmitry.gu...@gmail.com wrote: How do you run your project? Is it from within eclipse? Or you're deploying a *.war file? Could it be that these files getting into classpath? [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile ... [INFO] | +- org.apache.tomcat:dbcp:jar:6.0.30:compile [INFO] | +- org.apache.tomcat:coyote:jar:6.0.30:compile [INFO] | | +- org.apache.tomcat:servlet-api:jar:6.0.30:compile [INFO] | | \- org.apache.tomcat:juli:jar:6.0.30:compile [INFO] | \- org.apache.tomcat:catalina:jar:6.0.30:compile [INFO] | \- org.apache.tomcat:annotations-api:jar:6.0.30:compile They shouldn't, as well as any transitive dependencies of org.apache.tapestry:tapestry-test On Mon, Apr 29, 2013 at 10:10 PM, George Christman gchrist...@cardaddy.comwrote: Here's my mvn dependency tree, thanks for your help. [WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:hibernate3- maven-plugin:2.2: Failed to parse plugin descriptor for org.codehaus.mojo:hibern ate3-maven-plugin:2.2 (C:\Users\gmc07\.m2\repository\org\codehaus\mojo\hibernate 3-maven-plugin\2.2\hibernate3-maven-plugin-2.2.jar): error in opening zip file [INFO] [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ RoleManager --- [INFO] com.mycompany:RoleManager:war:1.0-SNAPSHOT [INFO] +- org.apache.tapestry:tapestry-core:jar:5.3.6:compile [INFO] | +- org.apache.tapestry:tapestry-json:jar:5.3.6:compile [INFO] | +- org.antlr:antlr-runtime:jar:3.3:compile [INFO] | | \- org.antlr:stringtemplate:jar:3.2.1:compile [INFO] | +- org.apache.tapestry:tapestry-ioc:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry5-annotations:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry-func:jar:5.3.6:compile [INFO] | | +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile [INFO] | | +- javax.inject:javax.inject:jar:1:compile [INFO] | | +- org.apache.tapestry:plastic:jar:5.3.6:compile [INFO] | | +- log4j:log4j:jar:1.2.14:compile [INFO] | | \- javassist:javassist:jar:3.12.1.GA:compile [INFO] | \- commons-codec:commons-codec:jar:1.5:compile [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile [INFO] | +- org.seleniumhq.selenium:selenium-server:jar:2.14.0:compile [INFO] | | +- bouncycastle:bcprov-jdk15:jar:135:compile [INFO] | | +- mx4j:mx4j-tools:jar:3.0.1:compile [INFO] | | +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.9:compile [INFO] | | +- net.jcip:jcip-annotations:jar:1.0:compile [INFO] | | \- org.yaml:snakeyaml:jar:1.8:compile [INFO] | +- org.eclipse.jetty:jetty-plus:jar:7.0.0.v20091005:compile [INFO] | | \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compil e [INFO] | +- org.seleniumhq.selenium:selenium-java:jar:2.14.0:compile [INFO] | | +- org.seleniumhq.selenium:selenium-android-driver:jar:2.14.0:compi le [INFO] | | | \- org.seleniumhq.selenium:selenium-remote-driver:jar:2.14.0:com pile [INFO] | | | +- org.json:json:jar:20080701:compile [INFO] | | | \- com.google.guava:guava:jar:10.0.1:compile [INFO] | | |\- com.google.code.findbugs:jsr305:jar:1.3.9:compile [INFO] | | +- org.seleniumhq.selenium:selenium-chrome-driver:jar:2.14.0:compil e [INFO] | | +- org.seleniumhq.selenium:selenium-htmlunit-driver:jar:2.14.0:comp ile [INFO] | | | +- org.seleniumhq.selenium:selenium-api:jar:2.14.0:compile [INFO] | | | +- net.sourceforge.htmlunit:htmlunit:jar:2.9:compile [INFO] | | | | +- xalan:xalan:jar:2.7.1:compile [INFO] | | | | | \- xalan:serializer:jar:2.7.1:compile [INFO] | | | | +- org.apache.httpcomponents:httpmime:jar:4.1.2:compile [INFO] | | | | +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.9:compile [INFO] | | | | +- xerces:xercesImpl:jar:2.9.1:compile [INFO] | | | | | \- xml-apis:xml-apis:jar:1.3.04:compile [INFO] | | | | +- net.sourceforge.nekohtml:nekohtml:jar:1.9.15:compile [INFO] | | | | \- net.sourceforge.cssparser:cssparser:jar:0.9.5:compile [INFO] | | | |
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
So as it turns out, the issue was caused by tapestry-test adding an older tomcat files to the class path. I'll need to somehow figure out how to exclude them from the class path. dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-test/artifactId version5.3.6/version exclusions exclusion/exclusion /exclusions /dependency The other question I have has to do with my hibernate.cfg.xml file. I use to use something like this to establish my database connection with jetty using jetty-env.xml property name=hibernate.connection.datasourcejdbc/rolemanager/property Configure id='wac' class=org.mortbay.jetty.webapp.WebAppContext New id=LocalDS class=org.mortbay.jetty.plus.naming.Resource Argjdbc/rolemanager/Arg Arg New class=com.mysql.jdbc.jdbc2.optional.MysqlDataSource Set name=ServerNamelocalhost/Set Set name=PortNumber3306/Set Set name=DatabaseNamerolemanager/Set Set name=Userroot/Set Set name=Passwordtest/Set /New /Arg /New /Configure but with tomcat I need to use something like this, property name=hibernate.connection.datasourcejava:comp/env/jdbc/rolemanager/property I'm not sure how get this to dynamically work for both servers. Thanks for all the help everyone. On Mon, Apr 29, 2013 at 2:41 PM, Lenny Primak lpri...@hope.nyc.ny.uswrote: Netbeans runs just under plane maven, just like from the command line. There maybe stale files in WEB-INF/lib, but if you run mvn clean, they will be gone. exclusions maven directive is your friend here On Apr 29, 2013, at 2:38 PM, Dmitry Gusev wrote: They will be present in classpath if you won't exclude them. I'm not familiar with Netbeans, but in Eclipse Sysdeo Plugin I have to manually remove them, so you should check your runtime classpath. You can also try to build a war and look at WEB-INF/lib folder to check if these files not there. On Mon, Apr 29, 2013 at 10:25 PM, George Christman gchrist...@cardaddy.comwrote: I was wondering the same thing about those files, but as you said they shouldn't. On Mon, Apr 29, 2013 at 2:23 PM, George Christman gchrist...@cardaddy.comwrote: I run my project from Netbeans, locally with jetty, and deployed as a war. On Mon, Apr 29, 2013 at 2:21 PM, Dmitry Gusev dmitry.gu...@gmail.com wrote: How do you run your project? Is it from within eclipse? Or you're deploying a *.war file? Could it be that these files getting into classpath? [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile ... [INFO] | +- org.apache.tomcat:dbcp:jar:6.0.30:compile [INFO] | +- org.apache.tomcat:coyote:jar:6.0.30:compile [INFO] | | +- org.apache.tomcat:servlet-api:jar:6.0.30:compile [INFO] | | \- org.apache.tomcat:juli:jar:6.0.30:compile [INFO] | \- org.apache.tomcat:catalina:jar:6.0.30:compile [INFO] | \- org.apache.tomcat:annotations-api:jar:6.0.30:compile They shouldn't, as well as any transitive dependencies of org.apache.tapestry:tapestry-test On Mon, Apr 29, 2013 at 10:10 PM, George Christman gchrist...@cardaddy.comwrote: Here's my mvn dependency tree, thanks for your help. [WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:hibernate3- maven-plugin:2.2: Failed to parse plugin descriptor for org.codehaus.mojo:hibern ate3-maven-plugin:2.2 (C:\Users\gmc07\.m2\repository\org\codehaus\mojo\hibernate 3-maven-plugin\2.2\hibernate3-maven-plugin-2.2.jar): error in opening zip file [INFO] [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ RoleManager --- [INFO] com.mycompany:RoleManager:war:1.0-SNAPSHOT [INFO] +- org.apache.tapestry:tapestry-core:jar:5.3.6:compile [INFO] | +- org.apache.tapestry:tapestry-json:jar:5.3.6:compile [INFO] | +- org.antlr:antlr-runtime:jar:3.3:compile [INFO] | | \- org.antlr:stringtemplate:jar:3.2.1:compile [INFO] | +- org.apache.tapestry:tapestry-ioc:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry5-annotations:jar:5.3.6:compile [INFO] | | +- org.apache.tapestry:tapestry-func:jar:5.3.6:compile [INFO] | | +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile [INFO] | | +- javax.inject:javax.inject:jar:1:compile [INFO] | | +- org.apache.tapestry:plastic:jar:5.3.6:compile [INFO] | | +- log4j:log4j:jar:1.2.14:compile [INFO] | | \- javassist:javassist:jar:3.12.1.GA:compile [INFO] | \- commons-codec:commons-codec:jar:1.5:compile [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile [INFO] | +- org.seleniumhq.selenium:selenium-server:jar:2.14.0:compile [INFO] | | +- bouncycastle:bcprov-jdk15:jar:135:compile [INFO] | | +- mx4j:mx4j-tools:jar:3.0.1:compile [INFO] | | +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.9:compile [INFO] | | +- net.jcip:jcip-annotations:jar:1.0:compile [INFO] | | \-
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
On Mon, Apr 29, 2013 at 11:33 PM, George Christman gchrist...@cardaddy.comwrote: So as it turns out, the issue was caused by tapestry-test adding an older tomcat files to the class path. I'll need to somehow figure out how to exclude them from the class path. dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-test/artifactId version5.3.6/version exclusions exclusion/exclusion /exclusions /dependency Just add scopetest/scope here, no need to use exclusions here. You don't need tapestry-test for runtime classpath. The other question I have has to do with my hibernate.cfg.xml file. I use to use something like this to establish my database connection with jetty using jetty-env.xml property name=hibernate.connection.datasourcejdbc/rolemanager/property Configure id='wac' class=org.mortbay.jetty.webapp.WebAppContext New id=LocalDS class=org.mortbay.jetty.plus.naming.Resource Argjdbc/rolemanager/Arg Arg New class=com.mysql.jdbc.jdbc2.optional.MysqlDataSource Set name=ServerNamelocalhost/Set Set name=PortNumber3306/Set Set name=DatabaseNamerolemanager/Set Set name=Userroot/Set Set name=Passwordtest/Set /New /Arg /New /Configure but with tomcat I need to use something like this, property name=hibernate.connection.datasourcejava:comp/env/jdbc/rolemanager/property You can use jdbc/rolemanager for tomcat also. I use hibernate with JPA, and here's what I have in my persistence.xml: persistence-unit name=projectX-pu transaction-type=RESOURCE_LOCAL providerorg.hibernate.ejb.HibernatePersistence/provider non-jta-data-sourcejdbc/projectX-db/non-jta-data-source Then in my web.xml: resource-ref descriptionDB Reference/description res-ref-namejdbc/projectX-db/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref /web-app And in my context definition: Resource name=jdbc/projectX-db type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=30 maxWait=1 driverClassName=org.postgresql.Driver url=jdbc:postgresql://localhost/projectX username=dmitrygusev / I'm not sure how get this to dynamically work for both servers. Thanks for all the help everyone. On Mon, Apr 29, 2013 at 2:41 PM, Lenny Primak lpri...@hope.nyc.ny.us wrote: Netbeans runs just under plane maven, just like from the command line. There maybe stale files in WEB-INF/lib, but if you run mvn clean, they will be gone. exclusions maven directive is your friend here On Apr 29, 2013, at 2:38 PM, Dmitry Gusev wrote: They will be present in classpath if you won't exclude them. I'm not familiar with Netbeans, but in Eclipse Sysdeo Plugin I have to manually remove them, so you should check your runtime classpath. You can also try to build a war and look at WEB-INF/lib folder to check if these files not there. On Mon, Apr 29, 2013 at 10:25 PM, George Christman gchrist...@cardaddy.comwrote: I was wondering the same thing about those files, but as you said they shouldn't. On Mon, Apr 29, 2013 at 2:23 PM, George Christman gchrist...@cardaddy.comwrote: I run my project from Netbeans, locally with jetty, and deployed as a war. On Mon, Apr 29, 2013 at 2:21 PM, Dmitry Gusev dmitry.gu...@gmail.com wrote: How do you run your project? Is it from within eclipse? Or you're deploying a *.war file? Could it be that these files getting into classpath? [INFO] +- org.apache.tapestry:tapestry-test:jar:5.3.6:compile ... [INFO] | +- org.apache.tomcat:dbcp:jar:6.0.30:compile [INFO] | +- org.apache.tomcat:coyote:jar:6.0.30:compile [INFO] | | +- org.apache.tomcat:servlet-api:jar:6.0.30:compile [INFO] | | \- org.apache.tomcat:juli:jar:6.0.30:compile [INFO] | \- org.apache.tomcat:catalina:jar:6.0.30:compile [INFO] | \- org.apache.tomcat:annotations-api:jar:6.0.30:compile They shouldn't, as well as any transitive dependencies of org.apache.tapestry:tapestry-test On Mon, Apr 29, 2013 at 10:10 PM, George Christman gchrist...@cardaddy.comwrote: Here's my mvn dependency tree, thanks for your help. [WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:hibernate3- maven-plugin:2.2: Failed to parse plugin descriptor for org.codehaus.mojo:hibern ate3-maven-plugin:2.2 (C:\Users\gmc07\.m2\repository\org\codehaus\mojo\hibernate 3-maven-plugin\2.2\hibernate3-maven-plugin-2.2.jar): error in opening zip file [INFO] [INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ RoleManager --- [INFO] com.mycompany:RoleManager:war:1.0-SNAPSHOT [INFO] +-
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
I also host on Amazon with Tomcat and develop with Jetty. Hibernate just gets the datasource from the container. When running locally that's Jetty and Jetty reads the jetty-web.xml file to build the connection. When deployed under Tomcat that would most likely be the server.xml file in the Tomcat conf directory. Tomcat requires a mapping between the server.xml configurations and each web app. I do this by creating a META-INF/context.xml file in the project. When Tomcat deploys the app it will pick up that file and use the mapping you provide. The contents would be something like ?xml version=1.0 encoding=UTF-8? Context ResourceLink name=jdbc/wind global=jdbc/wind type=javax.sql.DataSource/ /Context - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
I don't like to use server.xml for JNDI configuration for several reasons, but the main is that JDBC driver classes should be on server classpath, which means you have to manually put them there. Which personally I don't like because driver jar usually specified at pom.xml/build.gradle and this is simply not that DRY. And also this is not recommended by tomcat team and here's why: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Defining_a_context What I prefer to do is to create context file (ROOT context at this example) at ./apache-tomcat-7.0.35/conf/Catalina/localhost/ROOT.xml with the following content: ?xml version=1.0 encoding=UTF-8? Context Loader delegate=true/ Resource name=jdbc/xxx-db type=javax.sql.DataSource auth=Container maxActive=100 maxIdle=30 maxWait=1 driverClassName=org.postgresql.Driver url=jdbc:postgresql://localhost/xxx username=xxx / /Context For several recent projects I found it convenient to also develop with Tomcat using Sysdeo Eclipse Plugin. For this to work there I have to put content of /Context node into Extra information textarea at Project Properties - Tomcat. Though, I agree its more difficult to setup Tomcat plugin than Jetty in Eclipse, but when you did this once -- every other projects will be easier to setup. And you usually might want to have exactly the same web container that will be in production if you use, say, web sockets API. // PS: Sorry for offtopic On Tue, Mar 26, 2013 at 3:28 PM, Barry Books trs...@gmail.com wrote: I also host on Amazon with Tomcat and develop with Jetty. Hibernate just gets the datasource from the container. When running locally that's Jetty and Jetty reads the jetty-web.xml file to build the connection. When deployed under Tomcat that would most likely be the server.xml file in the Tomcat conf directory. Tomcat requires a mapping between the server.xml configurations and each web app. I do this by creating a META-INF/context.xml file in the project. When Tomcat deploys the app it will pick up that file and use the mapping you provide. The contents would be something like ?xml version=1.0 encoding=UTF-8? Context ResourceLink name=jdbc/wind global=jdbc/wind type=javax.sql.DataSource/ /Context - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Dmitry Gusev AnjLab Team http://anjlab.com
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
Why? Glassfish is a superset of tomcat and 1000% better IMHO On Mar 25, 2013, at 12:13 PM, George Christman gchrist...@cardaddy.com wrote: Hello, I'm currently moving my Tapestry5.3 app away from Glassfish in favor of Tomcat7 on the amazon cloud for my production env. As for my development env, I'd like to continue using Jetty. Currently my Glassfish server JNDI in configured to my JDBC connection pool and my hibernate.cfg.xml datasource is configured to call jdbc/mydatabase. hibernate-configuration session-factory property name=hibernate.connection.datasourcejdbc/mydatabase/property /session-factory /hibernate-configuration My Jetty configuration is done in WEB-INF/jetty-env.xml and uses, Configure id='wac' class=org.mortbay.jetty.webapp.WebAppContext New id=LocalDS class=org.mortbay.jetty.plus.naming.Resource Argjdbc/mydatabase/Arg Arg New class=com.mysql.jdbc.jdbc2.optional.MysqlDataSource Set name=ServerNamelocalhost/Set Set name=PortNumber3306/Set Set name=DatabaseNamemydatabase/Set Set name=Userroot/Set Set name=Passwordpassword/Set /New-- /Arg /New /Configure I noticed with tomcat7 configurations I need to add the following code snippet to WEB-INF/web.xml, something I've never had to do with Glassfish. http://wiki.apache.org/tomcat/TomcatHibernate resource-ref descriptionThis is a MySQL database connection/description res-ref-namejdbc/mydatabase/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref and hibernate.cfg.xml !-- using container-managed JNDI -- propertyname=hibernate.connection.datasource java:comp/env/jdbc/mydatabase /property My question is if I use this configuration, how does Hibernate know to use Jetty locally? I'm not a server expert by any means, so please forgive my ignorance. Does Tapestry tell Hibernate about the local environment and know to use the Jetty JDBC? How do others configure their Tapestry apps to run under these conditions? BTW, for some odd reason, I have not been receiving emails from the mailing list and I'm not sure of the cause thus I'm not entirely sure how to respond. This was never an issue when posting with Nabble. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
I like Glassfish much better do to my limited linux knowledge and it's nice gui, but I would like to try and use bean stalk with amazon and I haven't seen much documentation on setting it up with Glassfish. Seems as if everything points towards Tomcat which is the only reason I would consider the switch. I would just like to see my Tapestry app scale on the hardware automatically. On Mon, Mar 25, 2013 at 12:25 PM, Lenny Primak lpri...@hope.nyc.ny.uswrote: Why? Glassfish is a superset of tomcat and 1000% better IMHO On Mar 25, 2013, at 12:13 PM, George Christman gchrist...@cardaddy.com wrote: Hello, I'm currently moving my Tapestry5.3 app away from Glassfish in favor of Tomcat7 on the amazon cloud for my production env. As for my development env, I'd like to continue using Jetty. Currently my Glassfish server JNDI in configured to my JDBC connection pool and my hibernate.cfg.xml datasource is configured to call jdbc/mydatabase. hibernate-configuration session-factory property name=hibernate.connection.datasourcejdbc/mydatabase/property /session-factory /hibernate-configuration My Jetty configuration is done in WEB-INF/jetty-env.xml and uses, Configure id='wac' class=org.mortbay.jetty.webapp.WebAppContext New id=LocalDS class=org.mortbay.jetty.plus.naming.Resource Argjdbc/mydatabase/Arg Arg New class=com.mysql.jdbc.jdbc2.optional.MysqlDataSource Set name=ServerNamelocalhost/Set Set name=PortNumber3306/Set Set name=DatabaseNamemydatabase/Set Set name=Userroot/Set Set name=Passwordpassword/Set /New-- /Arg /New /Configure I noticed with tomcat7 configurations I need to add the following code snippet to WEB-INF/web.xml, something I've never had to do with Glassfish. http://wiki.apache.org/tomcat/TomcatHibernate resource-ref descriptionThis is a MySQL database connection/description res-ref-namejdbc/mydatabase/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref and hibernate.cfg.xml !-- using container-managed JNDI -- propertyname=hibernate.connection.datasource java:comp/env/jdbc/mydatabase /property My question is if I use this configuration, how does Hibernate know to use Jetty locally? I'm not a server expert by any means, so please forgive my ignorance. Does Tapestry tell Hibernate about the local environment and know to use the Jetty JDBC? How do others configure their Tapestry apps to run under these conditions? BTW, for some odd reason, I have not been receiving emails from the mailing list and I'm not sure of the cause thus I'm not entirely sure how to respond. This was never an issue when posting with Nabble. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
Have you considered Jelastic? We are using it with great success. On Mar 25, 2013, at 12:39 PM, George Christman gchrist...@cardaddy.com wrote: I like Glassfish much better do to my limited linux knowledge and it's nice gui, but I would like to try and use bean stalk with amazon and I haven't seen much documentation on setting it up with Glassfish. Seems as if everything points towards Tomcat which is the only reason I would consider the switch. I would just like to see my Tapestry app scale on the hardware automatically. On Mon, Mar 25, 2013 at 12:25 PM, Lenny Primak lpri...@hope.nyc.ny.uswrote: Why? Glassfish is a superset of tomcat and 1000% better IMHO On Mar 25, 2013, at 12:13 PM, George Christman gchrist...@cardaddy.com wrote: Hello, I'm currently moving my Tapestry5.3 app away from Glassfish in favor of Tomcat7 on the amazon cloud for my production env. As for my development env, I'd like to continue using Jetty. Currently my Glassfish server JNDI in configured to my JDBC connection pool and my hibernate.cfg.xml datasource is configured to call jdbc/mydatabase. hibernate-configuration session-factory property name=hibernate.connection.datasourcejdbc/mydatabase/property /session-factory /hibernate-configuration My Jetty configuration is done in WEB-INF/jetty-env.xml and uses, Configure id='wac' class=org.mortbay.jetty.webapp.WebAppContext New id=LocalDS class=org.mortbay.jetty.plus.naming.Resource Argjdbc/mydatabase/Arg Arg New class=com.mysql.jdbc.jdbc2.optional.MysqlDataSource Set name=ServerNamelocalhost/Set Set name=PortNumber3306/Set Set name=DatabaseNamemydatabase/Set Set name=Userroot/Set Set name=Passwordpassword/Set /New-- /Arg /New /Configure I noticed with tomcat7 configurations I need to add the following code snippet to WEB-INF/web.xml, something I've never had to do with Glassfish. http://wiki.apache.org/tomcat/TomcatHibernate resource-ref descriptionThis is a MySQL database connection/description res-ref-namejdbc/mydatabase/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref and hibernate.cfg.xml !-- using container-managed JNDI -- propertyname=hibernate.connection.datasource java:comp/env/jdbc/mydatabase /property My question is if I use this configuration, how does Hibernate know to use Jetty locally? I'm not a server expert by any means, so please forgive my ignorance. Does Tapestry tell Hibernate about the local environment and know to use the Jetty JDBC? How do others configure their Tapestry apps to run under these conditions? BTW, for some odd reason, I have not been receiving emails from the mailing list and I'm not sure of the cause thus I'm not entirely sure how to respond. This was never an issue when posting with Nabble. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
On Mon, 25 Mar 2013 13:13:56 -0300, George Christman gchrist...@cardaddy.com wrote: My question is if I use this configuration, how does Hibernate know to use Jetty locally? I'm not a server expert by any means, so please forgive my ignorance. Does Tapestry tell Hibernate about the local environment and know to use the Jetty JDBC? Tapestry-Hibernate doesn't do any magic. It just picks the Hibernate configuration, passes it to Hibernate and provides org.hibernate.Session injection. This question is actually unrelated to Tapestry. -- Thiago H. de Paula Figueiredo - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry-Hibernate configure to work with both Tomcat and Jetty
Hi Lenny, I don't really want to detrail this topic, but I'm very interested. Would you mind sending me a brief email describing your experiences with Jelastic, cost etc. Thanks. On Mon, Mar 25, 2013 at 1:08 PM, Lenny Primak lpri...@hope.nyc.ny.uswrote: Have you considered Jelastic? We are using it with great success. On Mar 25, 2013, at 12:39 PM, George Christman gchrist...@cardaddy.com wrote: I like Glassfish much better do to my limited linux knowledge and it's nice gui, but I would like to try and use bean stalk with amazon and I haven't seen much documentation on setting it up with Glassfish. Seems as if everything points towards Tomcat which is the only reason I would consider the switch. I would just like to see my Tapestry app scale on the hardware automatically. On Mon, Mar 25, 2013 at 12:25 PM, Lenny Primak lpri...@hope.nyc.ny.us wrote: Why? Glassfish is a superset of tomcat and 1000% better IMHO On Mar 25, 2013, at 12:13 PM, George Christman gchrist...@cardaddy.com wrote: Hello, I'm currently moving my Tapestry5.3 app away from Glassfish in favor of Tomcat7 on the amazon cloud for my production env. As for my development env, I'd like to continue using Jetty. Currently my Glassfish server JNDI in configured to my JDBC connection pool and my hibernate.cfg.xml datasource is configured to call jdbc/mydatabase. hibernate-configuration session-factory property name=hibernate.connection.datasourcejdbc/mydatabase/property /session-factory /hibernate-configuration My Jetty configuration is done in WEB-INF/jetty-env.xml and uses, Configure id='wac' class=org.mortbay.jetty.webapp.WebAppContext New id=LocalDS class=org.mortbay.jetty.plus.naming.Resource Argjdbc/mydatabase/Arg Arg New class=com.mysql.jdbc.jdbc2.optional.MysqlDataSource Set name=ServerNamelocalhost/Set Set name=PortNumber3306/Set Set name=DatabaseNamemydatabase/Set Set name=Userroot/Set Set name=Passwordpassword/Set /New-- /Arg /New /Configure I noticed with tomcat7 configurations I need to add the following code snippet to WEB-INF/web.xml, something I've never had to do with Glassfish. http://wiki.apache.org/tomcat/TomcatHibernate resource-ref descriptionThis is a MySQL database connection/description res-ref-namejdbc/mydatabase/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref and hibernate.cfg.xml !-- using container-managed JNDI -- propertyname=hibernate.connection.datasource java:comp/env/jdbc/mydatabase /property My question is if I use this configuration, how does Hibernate know to use Jetty locally? I'm not a server expert by any means, so please forgive my ignorance. Does Tapestry tell Hibernate about the local environment and know to use the Jetty JDBC? How do others configure their Tapestry apps to run under these conditions? BTW, for some odd reason, I have not been receiving emails from the mailing list and I'm not sure of the cause thus I'm not entirely sure how to respond. This was never an issue when posting with Nabble. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York