cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Newland" <chris.newl...@emorphia.com>
Subject RE: Update on my problem
Date Thu, 28 Mar 2002 18:41:36 GMT
Hi Jeremy,

Your XSP page looks fine to me and if it is working without pooling then I'm
starting to think that a bug may have been introduced into the latest
database code.

My best suggestion would be to download the latest release version of Cocoon
(2.0.2) and try your XSP page on that. Also, double check your cocoon.xconf
and web.xml for typos. Maybe check that MySQL is running and do
mysqladmin -version to get the query count to see if any queries are making
it to the DB.

Best Regards,

Chris



> -----Original Message-----
> From: Jeremy Beeler [mailto:jbeeler@pa.aacisd.com]
> Sent: 28 March 2002 18:12
> To: cocoon-users@xml.apache.org
> Subject: Re: Update on my problem
>
>
> Chris,
> Thanks again for all the help.
>
> trust me, i'm not pushing the envelope by design, it's just these are the
> versions that i've gotten the farthest with in terms of getting things
> working.
> i've never had db pooling working, in fact this past week or so
> has been my
> first venture into cocoon for any other use than classroom theory.
> the exception is generated when i try to run my test.xsp. cocoon
> loads fine
> otherwise.
>
> here is my code from the test.xsp
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xsp:page language="java" xmlns:xsp="http://apache.org/xsp"
> xmlns:esql="http://apache.org/cocoon/SQL/v2">
> <page>
> <title>A Database Driven XSP Page to Test</title>
> <content>
> <esql:connection>
> <!--if the pool is commented out and the non-pooled instantiation
> is used it
> works fine-->
> <esql:pool>tester</esql:pool>
>
> <!--this is commented out. if left in and pool is commented out this works
> fine
> <esql:driver>org.gjt.mm.mysql.Driver</esql:driver>
> <esql:dburl>jdbc:mysql://localhost:3306/tester</esql:dburl>
> <esql:username>login</esql:username>
> <esql:password>pass</esql:password>
> -->
>
> <esql:execute-query>
>     <esql:query>select * from operator</esql:query>
>         <esql:results>
>             <esql:row-results>
>                 <para>
>                     <esql:get-string column="Name"/>
>                 </para>
>                 <esql:get-columns/>
>             </esql:row-results>
>            </esql:results>
> </esql:execute-query>
> </esql:connection>
> </content>
> </page>
> </xsp:page>
>
> For some reason when using the pool it will throw that exception, but if i
> just instantiate a connection in the xsp if generates the desired output
> just fine. the only problem is, i really need to use pooling.
>
> thanks again.
>
> Jeremy
>
> ----- Original Message -----
> From: "Chris Newland" <chris.newland@emorphia.com>
> To: <cocoon-users@xml.apache.org>
> Sent: Thursday, March 28, 2002 12:39 PM
> Subject: RE: Update on my problem
>
>
> > Hi,
> >
> > In my root.log file I have
> >
> > DEBUG   (2002-03-26) 15:17.37:230   [root    ] (Unknown-URI)
> > Unknown-thread/Coco
> > onServlet: Trying to load class: org.gjt.mm.mysql.Driver
> >
> > Thats the only log file reference I get to my DB driver and I have no
> > problems with DB pooling.
> >
> > I'm using Cocoon 2.0 final, Tomcat 4.0 final, JDK1.3.1_01 but it looks
> like
> > you're pushing the envelope when it comes to latest versions ;)
> >
> > Have you had DB pooling working with earlier versions of Cocoon
> / Tomcat /
> > JDK?
> >
> > Does your exception occur when Cocoon tries to start, or when
> the XSP page
> > is accessed?
> >
> > Can you post a snippet of your XSP page?
> >
> > Thanks,
> >
> > Chris
> >
> >
> > > -----Original Message-----
> > > From: Jeremy Beeler [mailto:jbeeler@pa.aacisd.com]
> > > Sent: 28 March 2002 17:08
> > > To: cocoon-users@xml.apache.org
> > > Subject: Re: Update on my problem
> > >
> > >
> > > yes and in my access log it says trying to load and the driver
> > > name. i don't
> > > know if this means it failed or it loaded ok. is there any way to
> > > tell if it
> > > is loaded ok? and if it is loaded ok does the pool know to use that
> driver
> > > by default?
> > >
> > > thanks for your help.
> > >
> > > Jeremy
> > >
> > > ----- Original Message -----
> > > From: "Chris Newland" <chris.newland@emorphia.com>
> > > To: <cocoon-users@xml.apache.org>
> > > Sent: Thursday, March 28, 2002 11:28 AM
> > > Subject: RE: Update on my problem
> > >
> > >
> > > > Hi Jeremy,
> > > >
> > > > Have you added your database driver info to your
> WEB-INF/web.xml file?
> > > >
> > > > -------------
> > > > cocoon.xconf:
> > > > -------------
> > > >
> > > > <datasources>
> > > > <jdbc name="tester">
> > > > <pool-controller min="5" max="10"/>
> > > > <dburl>jdbc:mysql://localhost:3306/tester</dburl>
> > > > <auto-commit>true</auto-commit>
> > > > <user>login</user>
> > > > <password>pass</password>
> > > > </jdbc>
> > > > </datasources>
> > > >
> > > > ----------------
> > > > WEB-INF/web.xml:
> > > > ----------------
> > > >
> > > >     <!--
> > > >       This parameter is used to list classes that should be loaded
> > > >       at initialization time of the servlet.
> > > >       Usually this classes are JDBC Drivers used
> > > >     -->
> > > >     <init-param>
> > > >       <param-name>load-class</param-name>
> > > >       <param-value>
> > > >         <!-- For IBM WebSphere:
> > > >         com.ibm.servlet.classloader.Handler -->
> > > >
> > > >         <!-- For Database Driver: -->
> > > >         org.gjt.mm.mysql.Driver
> > > >       </param-value>
> > > >     </init-param>
> > > >
> > > >
> > > > Hope this helps,
> > > >
> > > > Regards,
> > > >
> > > > Chris
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Jeremy Beeler [mailto:jbeeler@pa.aacisd.com]
> > > > Sent: 28 March 2002 16:14
> > > > To: cocoon-users@xml.apache.org
> > > > Subject: Update on my problem
> > > >
> > > >
> > > > I am using j2sdk1.4.0, tomcat 4.0.4b2LE, mm.mysql-2.0.11 or
> > > mm.mysql-2.0.7
> > > > (tried both), and cocoon 2.0.3-dev.
> > > >
> > > > Update on my problem:
> > > >
> > > > I can query the database now by instantiating a connection in
> > > my xsp app.
> > > > however, the app that i am writing needs to use the pooling
> capabilities
> > > to
> > > > handle simultaneous access to the DB. does anyone know how to
> > > get this to
> > > > work??? i tried creating the pool with a "driver" tag in my
> cocoon.xconf
> > > but
> > > > that still generates the exception (NoValidConnectionException: No
> valid
> > > > JdbcConnection class available)
> > > >
> > > > this is my code:
> > > >
> > > > <datasources>
> > > > <jdbc name="tester">
> > > > <driver>org.gjt.mm.mysql.Driver</driver>
> > > > <pool-controller min="5" max="10"/>
> > > > <dburl>jdbc:mysql://localhost:3306/tester</dburl>
> > > > <auto-commit>true</auto-commit>
> > > > <user>login</user>
> > > > <password>pass</password>
> > > > </jdbc>
> > > > </datasources>
> > > >
> > > > does anyone know if there is a mechanism that allows you to specify
> the
> > > > driver for a pool in the cocoon.xconf?
> > > >
> > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > Please check that your question has not already been answered in the
> > > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > > >
> > > > To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> > > > For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > Please check that your question has not already been answered in the
> > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > >
> > > To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> > > For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> > >
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
>
>



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message