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.us>wrote:

> 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="10000"
> >>        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

Reply via email to