I'd like to setup my connection pooling upfront so at least I can 
concentrate on other areas later on (still need to learn web services
with java).  I'll give it a rest for a day before start working on it.

Thanks,
--Kawthar

>>> [EMAIL PROTECTED] 18/03/2004 02:42:54 PM >>>
Good.

For development and learning this will work fine. But when you get
ready to
deploy your app you will want to get the Connection pool working.
Usually if
the manual connection works then it is a configuration issue and often
a
typo somewhere. Give it a few days and then go through each piece and
confirm all your spelling and capitalization.

If you want to keep working on the pool, repost the applicable parts of
your
current web.xml, server.xml and code.

Doug

----- Original Message ----- 
From: "Kawthar Bt M Sulaiman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 18, 2004 1:26 AM
Subject: Re: JDBC/mySQL problem.


> Hi Doug,
>
> I know basic table creation and simple sql statement.. so I was able
to
> create the database
> and create few tables to get tomcat running with mySQL.  I read few
> docs (including the
> link you gave to get me started).. but other advance stuff, I'll
read
> as I need them... :)
>
> Anyway, I've done the manual coding to get driver and connection and
it
> works!!!!
> I was able to retrieve username from users table.
>
> Thanks,
> --Kawthar
>
> >>> [EMAIL PROTECTED] 18/03/2004 02:20:06 PM >>>
> See comments under answers.
>
> > Answers to your question:
> >
> > 1. reboot?  Yes, every single time.  I stopped tomcat and
restarted
> it
> > everytime I make changes.
> Good, but I had to ask.
>
> >
> > 2. manual connection?  No, I haven't done this.  Let me try and
will
> > let you know.
> >
> This tests that all else is working.
>
> > 3.  ping localhost?  Yes, I can ping localhost.
> >
> OK. TCP stack is good.
>
> > 4. firewall?  No, I'm not running firewall.
> >
> Has caused a few headache for others.
>
> > 5.  I'm using Windows2000 OS.
> >
> Just so I don't quote a Linux thing and confuse you.
>
> > 6.  User rights in database?  Not sure.  How can check this? 
Still
> > learning mySQL.
> >
> Check out this page.
> http://www.mysql.com/doc/en/Windows_post-installation.html 
>
> How did you create the database ecpa and associated tables?
>
> Doug
>
>
> > Thanks,
> > --Kawthar
> >
> > >>> [EMAIL PROTECTED] 18/03/2004 01:29:27 PM >>>
> > Kawthar,
> >
> > As for Steve's concerns:
> > It is the same one. The short story: Mark Mathews wrote it MySQL
> liked
> > it
> > and adopted it and him. So it went from org.gjt.mm to com.mysql.
> Both
> > names
> > will work fine but to be up to date use the com.mysql.
> >
> > As for server.xml having only one is fine, and on TC4 this is
> common.
> > If you
> > move to TC5 then you can have multiple files with each part
applying
> to
> > only
> > the app that it is included with. For now don't worry about it.
> >
> > If your application is running OK as ROOT other than the DBCP
> problems
> > then
> > you are fine. It is that most people set up a new context and
don't
> > mess
> > with the ROOT at first. But again if the rest of the app runs
you're
> > fine.
> >
> > Now for fifty questions:
> > You are rebooting after changes? It has bitten me several times.
> >
> > Have you done a manual connection?
> > Class.forName("com.mysql.jdbc.Driver");
> > connection =
> > DriverManager.getConnection(
> > "jdbc:mysql://localhost:3306/ecpa",
> > "youruser",
> > "yourpassword");
> >
> > If the manual connection fails then:
> > Can you access the database directly and log on using the username
> and
> > password that is in the context?
> >
> > Can you open a prompt and ping localhost? I have seen it fail.
> > If so use the IP of your machine if you can ping it otherwise you
> have
> > other
> > issues.
> >
> > Are you running a firewall on the machine?
> >
> > What OS are you on?
> >
> > What are the rights for the user in the database, can the user
gain
> > access
> > from localhost?
> >
> > Doug
> >
> >
> > ----- Original Message ----- 
> > From: "Kawthar Bt M Sulaiman" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, March 17, 2004 11:46 PM
> > Subject: Re: JDBC/mySQL problem.
> >
> >
> > > Followed your suggestion, but still not working.
> > >
> > > Thnx,
> > > --Kawthar
> > >
> > > >>> [EMAIL PROTECTED] 18/03/2004 12:18:00 PM >>>
> > > Kawthar,
> > >
> > > Change:
> > >
> > >   <Resource auth="Container" description="JDBC Connection to
> > >  MySQL v4.0.18" name="mySQLDatabase" scope="Shareable"
> > >  type="javax.sql.DataSource"/>
> > >
> > >      <Resource name="jdbc/mySQLDatabase" auth="Container"
> > >  type="javax.sql.DataSource"/>
> > >
> > > To:
> > >
> > >   <Resource auth="Container" description="JDBC Connection to
> > >  MySQL v4.0.18" name="jdbc/mySQLDatabase" scope="Shareable"
> > >  type="javax.sql.DataSource"/>
> > >
> > > Should work either way, mine did, just cleaner and proper.
> > > Note name is changed in second entry, added jdbc/  .
> > >
> > >
> > > Doug
> > >
> > > ----- Original Message ----- 
> > > From: "Parsons Technical Services"
> <[EMAIL PROTECTED]>
> > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > Sent: Wednesday, March 17, 2004 11:02 PM
> > > Subject: Re: JDBC/mySQL problem.
> > >
> > >
> > > > Kawthar,
> > > >
> > > > Try this context in place of yours.
> > > >
> > > >   <Context path="/db" docBase ="ROOT" debug="9"
> reloadable="true">
> > > >  <Resource auth="Container" description="JDBC Connection to
> > > > MySQL v4.0.18" name="mySQLDatabase" scope="Shareable"
> > > > type="javax.sql.DataSource"/>
> > > >
> > > >     <Resource name="jdbc/mySQLDatabase" auth="Container"
> > > > type="javax.sql.DataSource"/>
> > > >
> > > >           <ResourceParams name="jdbc/mySQLDatabase">
> > > >            <parameter>
> > > >            <name>factory</name>
> > > >
> > > > <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
> > > >            </parameter>
> > > >            <parameter>
> > > >              <name>username</name>
> > > >             <value>xxxx</value>
> > > >             </parameter>
> > > >               <parameter>
> > > >                  <name>password</name>
> > > >                <value>xxxx</value>
> > > >              </parameter>
> > > >           <parameter>
> > > >           <name>maxActive</name>
> > > >           <value>100</value>
> > > >           </parameter>
> > > >     <parameter>
> > > >       <name>maxIdle</name>
> > > >       <value>5</value>
> > > >     </parameter>
> > > >     <parameter>
> > > >       <name>maxWait</name>
> > > >       <value>10000</value>
> > > >     </parameter>
> > > >
> > > >         <parameter>
> > > >           <name>driverClassName</name>
> > > >           <value>org.gjt.mm.mysql.Driver</value>
> > > >           </parameter>
> > > >           <parameter>
> > > >            <name>url</name>
> > > >
> <value>jdbc:mysql://localhost:3306/ecpa?autoReconnect=true</value>
> > > >           </parameter>
> > > >        </ResourceParams>
> > > >
> > > >           <Logger
> > className="org.apache.catalina.logger.FileLogger"
> > > >                      prefix="DBlog." suffix=".txt"
> > > >               timestamp="true"/>
> > > >      </Context>
> > > >
> > > > Don't forget to close the statement and the result set.
> > > > I do mine in a finally block along with the conn.close() and
> each
> > one
> > > is
> > > > wrapped in a try / catch.
> > > >
> > > > Make sure to restart Tomcat after you make changes to the
> > > server.xml.
> > > >
> > > > Doug
> > > >
> > > >
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > 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] 
> >
> >
> >
> >
> >
>
---------------------------------------------------------------------
> > 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]

>
>


----------------------------------------------------------------------------
----


>
---------------------------------------------------------------------
> 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] 

Confidential information may be contained in this e-mail and any files transmitted 
with it ('Message'). If you are not the addressee indicated in this Message (or 
responsible for delivery of this Message to such person), you are hereby notified that 
any dissemination, distribution, printing or copying of this Message or any part 
thereof is strictly prohibited. In such a case, you should delete this Message 
immediately and advise the sender by return e-mail. Opinions, conclusions and other 
information in this Message that do not relate to the official business of Maxis shall 
be understood as neither given nor endorsed by Maxis.

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

Reply via email to