OK - Got It!  Thank you all many times over for your time and help on
this connection pool thing.  It is surprisingly difficult to maintain
a stable environment if you're a curious beginner.  I clearly need to
get a grip on Tomcat's process BUT it also seems abundantly clear that
docs/how to's for simply getting started with connection pools are
less than optimal.  What exactly was my problem?  Still not sure and
trying to narrow it down.  In the hopes of helping anyone on this
list, here's what FINALLY worked for me?

Again, I'm running TC 5.0.28 on Linux FC2

1.   I went in and cleared out ALL my test web-apps, of which I wrote
about 6 different toys via tutorials and on my own.  While I don't
nearly understand the reasons for much of the TC directory structure,
I traversed the following directories and 'rm -r -f' all the webaps I
created and no longer wanted with the thinking that somehow they might
be in the way...

the obvious...
<CATALINA_HOME>/webaps/
the less obvious to me...
<CATALINA_HOME>/work/StandAlone/localhost
<CATALINA_HOME>/work/Catalina/localhost

2.  This, I'm guessing, is more likely the key but I didn't test
between doing all this.  I created a new file, myapp.xml, in...

<CATALINA_HOME>/conf/Catalina/localhost/

and simply copied the related <Context></Context>(see prior emails)
from the server.xml in...
<CATALINA_HOME>/conf/

to this file.

What escapes me is, why is this not more obviously documented? 
Perhaps it's in the Tomcat docs but I mostly abandoned those some time
ago as they are so amazingly detailed and lengthy that unless you want
to become a TC guru, which I am inspired to try and be more like,
there is simply too much info.

Okay, I'm off to continue figuring why TC keeps crashing on me. 
Hopefully something I did here solved that problem too.

thx again all,
Eric

 
On Fri, 5 Nov 2004 08:39:30 +0100, Nick Pellow
<[EMAIL PROTECTED]> wrote:
> HI Eric,
> 
> I have seen the same error your are getting. I am using tomcat 5.0.28.
> Make sure that you have removed the expanded war directories, from
> "webapps" and ${CATALINA_HOME}/work before restarting.
> 
> Also look inside
> those other context.xmls inside ${CATALINA_HOME}/conf/Catalina/localhost
> and make sure that they do not define a context with path="/wms".
> 
> Cheers,
> nick.
> 
> >-----Ursprungliche Nachricht-----
> >Von: Eric Wulff [mailto:[EMAIL PROTECTED]
> >Gesendet: Freitag, 5. November 2004 07:35
> >An: Atishay Kumar
> >Cc: Tomcat Users List
> >Betreff: Re: {an alternative}Re: connection pooling
> >
> >
> >Atishay, the DefaultContext does work once I comment out the other
> >Engine element.  You mentioned that means something is wrong with my
> >Context?  So what next?
> >
> >many thx
> >Eric
> >
> >
> >On Thu, 4 Nov 2004 22:21:57 -0800, Eric Wulff <[EMAIL PROTECTED]> wrote:
> >> This did not work.  In looking for the Engine element you speak of I
> >> didn't find it exactly.  I did find it with it with an extra attribute
> >> <Engine name="Standalone"... jvmRoute="jvm1">.  Furthermore, this
> >> element was nested within the <Service> element and there is another
> >> <Engine name="Catalina"...> element.  I tried with and without the
> >> jvmRoute element.  No success.  Same exception.
> >>
> >> Eric
> >>
> >> On Fri, 5 Nov 2004 11:20:26 +0530, Atishay Kumar
> >>
> >>
> >> <[EMAIL PROTECTED]> wrote:
> >> > If adding <Resouce name ......./> did not work..then try following
> >> >
> >> > On Thu, 4 Nov 2004 19:46:30 -0800, Eric Wulff <[EMAIL PROTECTED]> wrote:
> >> > > Hi all, I'm returning to a problem I couldn't solve the first time,
> >> > > about two months ago, and still can't seem to figure out.  I
> >can't get
> >> > > a db connection using connection pools.  I get the exception listed
> >> > > below, same as so many have previously, but nothing I've found seems
> >> > > to works.  Below are my specs.  Anyone with concrete advise/direction
> >> > > on how to get
> >> > > this working?
> >> > >
> >> > > Also, I noticed in many solutions the suggestion was made to edit the
> >> > > myapp.xml file located at CATALINA_HOME/conf/Catalina/localhost/.
> >> > > However, there is no myapp.xml in that directory on my server. Just 2
> >> > > .xml's related to other applications and a manager.xml which I'm not
> >> > > sure what it's related to.
> >> > >
> >> > > OS: FC2
> >> > > Tomcat 5.0.28
> >> > >
> >> > > exception: org.apache.commons.dbcp.SWLNestedException: Cannot create
> >> > > JDBC driver class '' for connect URL 'null'
> >> > >
> >> > > WEB-INF web xml: code inserted AFTER all servlet mappings...
> >> > the following shld be  in
> >> > <web-app>
> >> > >         <resource-ref>
> >> > <description>My Datasource</description>
> >> > >                 <res-ref-name>jdbc/wms</res-ref-name>
> >> > >                 <res-type>javax.sql.DataSource</res-type>
> >> > >                 <res-auth>Container</res-auth>
> >> > >         </resource-ref>
> >> > </web-app> <!-- I am sure u have this right-->
> >> > >
> >> > > server xml(tried this with and without a Resource name)...
> >> > The following shld be under
> >> > <Engine name="Standalone" defaultHost="localhost" debug="0">
> >> >
> >> > REplace
> >> >  <Context path="/wms" docBase="wms" debug="0" reloadable="true">
> >> > with
> >> > <DefaultContext>
> >> > <Resource name="jdbc/wms" auth="Container"
> >type="javax.sql.DataSource"/>
> >> > >     <ResourceParams name="jdbc/wms">
> >> > >       <parameter>
> >> > >         <name>username</name>
> >> > >         <value>whatever</value>
> >> > >       </parameter>
> >> > >       <parameter>
> >> > >         <name>password</name>
> >> > >         <value>whatever</value>
> >> > >       </parameter>
> >> > >       <parameter>
> >> > >         <name>driverClassName</name>
> >> > >         <value>com.informix.jdbc.IfxDriver</value>
> >> > >       </parameter>
> >> > >           <parameter>
> >> > >                 <name>url</name>
> >> > >
> ><value>jdbc:informix-sqli://foo.bar.com:somePort/dbName:INFORMIXSER
> >VER=serverName</value>
> >> > >         </parameter>
> >> > >     </ResourceParams>
> >> > replace
> >> >    </Context>
> >> > with
> >> > </DefaultContext>
> >> > <!--
> >> > If this works them there is something wrong with your context. we
> >> > shall figure that out later but first <DefaultContext> should work!!
> >> > restart tommy after making changes.
> >> > hope it works!!
> >> > -->
> >> > >
> >> > > I have the following jars in my <CATALINA_HONE>/common/lib and I also
> >> > > tried putting the db driver and commons-collections, dbcp,
> >and pool in
> >> > > my WEB-INF/lib with no success.  They are all mode 644.
> >> > >
> >> > > ant.jar
> >> > > ant-launcher.jar
> >> > > commons-collections-3.1.jar
> >> > > commons-dbcp-1.2.1.jar
> >> > > commons-el.jar
> >> > > commons-pool-1.2.jar
> >> > > ifxjdbc.jar (the necessary informix driver)
> >> > > jar.txt
> >> > > jasper-compiler.jar
> >> > > jasper-runtime.jar
> >> > > jsp-api.jar
> >> > > mysql-connector-java-3.0.15-ga-bin.jar
> >> > > naming-common.jar
> >> > > naming-factory.jar
> >> > > naming-java.jar
> >> > > naming-resources.jar
> >> > > servlet-api.jar
> >> > >
> >> > > On Fri, 8 Oct 2004 11:45:59 +0530, Atishay Kumar
> >> > > <[EMAIL PROTECTED]> wrote:
> >> > > > hi,
> >> > > >  i am not sure but you may try downloading latest jar files for
> >> > > > following froom tomcat site and try them out. copy the old
> >jar files
> >> > > > somewhere else and try using the latest jar files.
> >> > > > 1) Commons Collections
> >> > > > 2)Commons DBCP
> >> > > > 3)Commons Pool
> >> > > >
> >> > > >
> >> > > >
> >> > > >
> >> > > > On Thu, 7 Oct 2004 15:29:40 -0700, Eric Wulff
> ><[EMAIL PROTECTED]> wrote:
> >> > > > > Except that the driver works for connecting if I'm not
> >utilizing a
> >> > > > > connection pool, i.e., I am able to connect to the db
> >and manipulate
> >> > > > > data via DriverManager.getConnection(url, db, pwd).
> >> > > > >
> >> > > > > The driver is located in CATALINA_HOME/commons/lib
> >> > > > >
> >> > > > > Eric
> >> > > > >
> >> > > > > On Thu, 7 Oct 2004 18:22:45 -0400, Phillip Qin
> >> > > > > <[EMAIL PROTECTED]> wrote:
> >> > > > > > No, you don't need that many params. I think your
> >problem might be the
> >> > > > >
> >> > > > >
> >> > > > > > driver. Where did you drop off your informix jdbc jar?
> >> > > > > >
> >> > > > > >
> >> > > > > > -----Original Message-----
> >> > > > > > From: Eric Wulff [mailto:[EMAIL PROTECTED]
> >> > > > > > Sent: October 7, 2004 5:56 PM
> >> > > > > > To: Tomcat Users List
> >> > > > > > Subject: Re: connection pooling
> >> > > > > >
> >> > > > > > Yes, I have added <Resource name=... >.  Now different
> >errors are reported
> >> > > > > > via stack trace as I posted in response to Atishay's
> >suggestion that I add
> >> > > > > > this.  I'll try adding your suggestions and see what
> >happens.  Also, you
> >> > > > > > suggest adding many parameters.  Are they necessary
> >for simply making a
> >> > > > > > connection?  If so, the tutorial I'm following,
> >'Tomcat Kick Start' left all
> >> >
> >> > --
> >> > :)
> >> > Atishay Kumar
> >> > Btech, SEM VII
> >> > DA-IICT
> >> > Gandhinagar - 382009
> >> > India
> >> > ph: +91 9825383948
> >> >
> >/******************************************************************
> >**********
> >> >  * Learn the rules as you would need them to break them properly *
> >> >
> >*******************************************************************
> >*********/
> >> >
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to