You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jessica Niewint <j....@kiosco.org> on 2002/08/28 16:47:23 UTC

Installing mysql JDBC Driver

My configuration:
tomcat 4.0.4, cocoon 2.0.3, java jdk1.2.2

In copied the mm.mysql-2.0.4-bin.jar file into the lib folder of 
cocoon/WEB-INF. I loaded the driver in the web.xml file. When I check now 
the installation in the access.log file I got the following message:
DEBUG   (2002-08-28) 16:35.15:025   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Trying to load class: org.gjt.mm.mysql.Driver
INFO    (2002-08-28) 16:35.15:088   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Reloading from: 
jndi:/localhost/cocoon/WEB-INF/cocoon.xconf

if I try to configure my connection pool in cocoon.xconf : I got the 
following exeption:

DEBUG   (2002-08-09) 17:42.10:231   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Trying to load class: org.gjt.mm.mysql.Driver
WARN    (2002-08-09) 17:42.10:287   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Could not force-load class: 
org.gjt.mm.mysql.Driver
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
	at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1406)
	at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1254)
	at org.apache.cocoon.util.ClassUtils.loadClass(ClassUtils.java:88)
	at org.apache.cocoon.servlet.CocoonServlet.forceLoad(CocoonServlet.java:842)
	at 
org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1219)
	at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:435)
	at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810)
	at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3279)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3421)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478)
	at org.apache.catalina.core.StandardHost.install(StandardHost.java:738)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232)
	at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
	at org.apache.catalina.core.StandardService.start(StandardService.java:388)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
	at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
	at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
INFO    (2002-08-09) 17:42.10:432   [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Reloading from: 
jndi:/localhost/cocoon/WEB-INF/cocoon.xconf

I really have no clue. Why is it impossible to define a connection pool for 
mysql ? Do I have to change the name of the mm.mysql-2.0.4-bin.jar file ? 
What can I do to make everything work ?
Thanks in advance, Jessi


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

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


Re: Installing mysql JDBC Driver

Posted by Jessica Niewint <j....@kiosco.org>.
At 12.02 29/08/2002 +0100, you wrote:
You were so right !
It was the jar file. Somehow it was damaged or because I copied it from my 
server to my windows desktop ... now I have done every step with unix and 
everything is fine.
So now I got :
jdk 1.4.0
tomcat 4.0.4
cocoon 2.0.3
and the mysql-connector 3.0.0

in my web.xml file I got :
<init-param>
<param-name>load-class</param-name>
<param-value>
<!-- For IBM WebSphere:
com.ibm.servlet.classloader.Handler -->
<!-- For Database Driver: -->
org.hsqldb.jdbcDriver
com.mysql.jdbc.Driver
<!-- For parent ComponentManager sample:
org.apache.cocoon.samples.parentcm.Configurator
-->
</param-value>
</init-param>

for the cocoon.conf:
<!-- my mysql driver -->
<jdbc name="mymysql">
<pool-controller max="10" min="5"/>
<dburl>jdbc:mysql://localhost/test</dburl>
<user>root</user>
<password></password>
</jdbc>

No error message or exception in the log files.
No I have to test everything with a short applications.

Thanks again ! You are so great folks !!! :-D




>Hi Jessica,
>
>Looks OK and you should be able to run the hsqldb driver as well.  I have 
>had no problems with mySQL on 2.0.3 and JDK 1.4 so you could try 
>that.  You could also comment out all the other driver references and the 
>other pools to check there are no conflicts.  I'm not sure that any of 
>this is strictly necessary however.  From the log messages it seems that 
>the classloader is attempting to find the class but cannot.  This would 
>typically be because the package name is incorrect or the class is not 
>there.  The package name for that version of the JAR should be fine.  Have 
>you opened the jar in something like WINRAR or WINZIP?  If not do so to 
>check the file is not corrupt or otherwise wrong.  You should be able to 
>navigate the folder org/gjt/mm/mysql where Driver.class should exist.
>
>HTH a little more.
>
>Jez


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

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


RE: Installing mysql JDBC Driver

Posted by Gustav Lidén <gu...@ctakt.com>.
Hi,

I've been following this thread as I am sitting with the exact same problem.
However I think I just got a bit further by unzipping the jar and putting it
in the WEB-INF/classes directory. Thanks Jeremy! Tomcat now starts without
trouble, but I get a Cocoon error page when requesting any html page (also
ones that don't use mysql as a data source).

My cocoon.xconf contains:

    <jdbc name="mysql">
        <pool-controller max="10" min="5"/>
        <dburl>jdbc:mysql://localhost/web</dburl>
        <user>guslid</user>
        <password>guslid</password>
     </jdbc>

And the following works command-line-wise: mysql -uguslid -pguslid web
 - so it shouldn't be a privilege thing?

The call stack is below, otherwise I can't see to much useful info in the
logs.

Anyone see what's wrong?

/Gustav
javax.servlet.ServletException: Servlet.init() for servlet Cocoon2 threw
exception
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:94
6)
	at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1027)
	at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
)
	at java.lang.Thread.run(Thread.java:536)


root cause

java.lang.ClassFormatError: com/mysql/jdbc/Driver (Illegal constant pool
type)
	at java.lang.ClassLoader.defineClass0(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
	at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo
ader.java:1643)
	at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.jav
a:937)
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1372)
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1254)
	at org.apache.cocoon.util.ClassUtils.loadClass(ClassUtils.java:88)
	at
org.apache.cocoon.servlet.CocoonServlet.forceLoad(CocoonServlet.java:842)
	at
org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1219
)
	at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:435)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
8)
	at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1027)
	at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
)
	at java.lang.Thread.run(Thread.java:536)

  -----Original Message-----
  From: Jeremy Aston [mailto:jeremyaston@yahoo.co.uk]
  Sent: den 29 augusti 2002 13:15
  To: cocoon-users@xml.apache.org; jez@pigbite.com
  Subject: Re: Installing mysql JDBC Driver


  Oh yeah,

  I forgot you might want to try extracting the jar into WEB-INF classes to
see if that makes a difference.  If that works I don't know what it should
be able to get the class from classes and not inside the JAR...

  jez

    Jeremy Aston <je...@yahoo.co.uk> wrote:

    Hi Jessica,

    Looks OK and you should be able to run the hsqldb driver as well.  I
have had no problems with mySQL on 2.0.3 and JDK 1.4 so you could try that.
You could also comment out all the other driver references and the other
pools to check there are no conflicts.  I'm not sure that any of this is
strictly necessary however.  From the log messages it seems that the
classloader is attempting to find the class but cannot.  This would
typically be because the package name is incorrect or the class is not
there.  The package name for that version of the JAR should be fine.  Have
you opened the jar in something like WINRAR or WINZIP?  If not do so to
check the file is not corrupt or otherwise wrong.  You should be able to
navigate the folder org/gjt/mm/mysql where Driver.class should exist.

    HTH a little more.

    Jez


      Jessica Niewint <j....@kiosco.org> wrote:


      If there are no config problems then post your web.xml and
cocoon.xconf
      extracts and I'll have a look. the jar should be fine in WEB-INF/lib.
      I got exactly all this. The only point is that there a still the
standard
      driver in my installation.

      my web.xml

      load-class




      org.hsqldb.jdbcDriver


      org.gjt.mm.mysql.Driver





      my cocoon.xconf:





      jdbc:hsqldb:hsql://localhost:9002
      sa






      jdbc:mysql://localhost/test
      root






      Could there be another problem ?


      At 16.37 28/08/2002 +0100, you wrote:

      >Hi Jessica,
      >
      >You should have something like this in web.xml
      >
      >
      > load-class
      >
      > org.gjt.mm.mysql.Driver
      >
      >
      >
      >and something like this in cocoon.xconf
      >
      >
      >
      >
      > jdbc:mysql://127.0.0.1/databasename
      > root
      >
      >
      >
      >
      >If there are no config problems then post your web.xml and
cocoon.xconf
      >extracts and I'll have a look. the jar should be fine in WEB-INF/lib.
      >
      >Jez
      >
      >
      >


      ---------------------------------------------------------------------
      Please check that your question has not already been answered in the
      FAQ before posting.

      To unsubscribe, e-mail:
      For additional commands, e-mail:






----------------------------------------------------------------------------
    Get a bigger mailbox -- choose a size that fits your needs.






----------------------------------------------------------------------------
--
  Get a bigger mailbox -- choose a size that fits your needs.


Re: Installing mysql JDBC Driver

Posted by Jeremy Aston <je...@yahoo.co.uk>.
 Oh yeah,
I forgot you might want to try extracting the jar into WEB-INF classes to see if that makes a difference.  If that works I don't know what it should be able to get the class from classes and not inside the JAR...
jez
  Jeremy Aston <je...@yahoo.co.uk> wrote: 
Hi Jessica, 
Looks OK and you should be able to run the hsqldb driver as well.  I have had no problems with mySQL on 2.0.3 and JDK 1.4 so you could try that.  You could also comment out all the other driver references and the other pools to check there are no conflicts.  I'm not sure that any of this is strictly necessary however.  From the log messages it seems that the classloader is attempting to find the class but cannot.  This would typically be because the package name is incorrect or the class is not there.  The package name for that version of the JAR should be fine.  Have you opened the jar in something like WINRAR or WINZIP?  If not do so to check the file is not corrupt or otherwise wrong.  You should be able to navigate the folder org/gjt/mm/mysql where Driver.class should exist.

HTH a little more.

Jez


  Jessica Niewint <j....@kiosco.org> wrote: 
If there are no config problems then post your web.xml and cocoon.xconf 
extracts and I'll have a look. the jar should be fine in WEB-INF/lib.
I got exactly all this. The only point is that there a still the standard 
driver in my installation.

my web.xml


load-class



         com.ibm.servlet.classloader.Handler -->


org.hsqldb.jdbcDriver

         org.apache.cocoon.samples.parentcm.Configurator
         -->
org.gjt.mm.mysql.Driver






my cocoon.xconf:


           If you have an Oracle database, and are using the the
       pool-controller below, you should add the attribute
       "oradb" and set it to true.

       


       That way the test to see if the server has disconnected
       the JdbcConnection will function properly.
       -->


           If you need to ensure an autocommit is set to true or
       false, then create the "auto-commit" element below.

       false

       The default is true.
       -->
jdbc:hsqldb:hsql://localhost:9002
sa








jdbc:mysql://localhost/test
root








Could there be another problem ?


At 16.37 28/08/2002 +0100, you wrote:

>Hi Jessica,
>
>You should have something like this in web.xml
>
> 
> 
load-class

> 

> org.gjt.mm.mysql.Driver
> 

> 
>
>and something like this in cocoon.xconf
>
> 
> 
> 

> jdbc:mysql://127.0.0.1/databasename
> root
> 


> 
> 
>
>If there are no config problems then post your web.xml and cocoon.xconf 
>extracts and I'll have a look. the jar should be fine in WEB-INF/lib.
>
>Jez
>
>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: 
For additional commands, e-mail: 




---------------------------------
Get a bigger mailbox -- choose a size that fits your needs.




---------------------------------
Get a bigger mailbox -- choose a size that fits your needs.

Re: Installing mysql JDBC Driver

Posted by Jeremy Aston <je...@yahoo.co.uk>.
 Hi Jessica,
Looks OK and you should be able to run the hsqldb driver as well.  I have had no problems with mySQL on 2.0.3 and JDK 1.4 so you could try that.  You could also comment out all the other driver references and the other pools to check there are no conflicts.  I'm not sure that any of this is strictly necessary however.  From the log messages it seems that the classloader is attempting to find the class but cannot.  This would typically be because the package name is incorrect or the class is not there.  The package name for that version of the JAR should be fine.  Have you opened the jar in something like WINRAR or WINZIP?  If not do so to check the file is not corrupt or otherwise wrong.  You should be able to navigate the folder org/gjt/mm/mysql where Driver.class should exist.

HTH a little more.

Jez


  Jessica Niewint <j....@kiosco.org> wrote: 
If there are no config problems then post your web.xml and cocoon.xconf 
extracts and I'll have a look. the jar should be fine in WEB-INF/lib.
I got exactly all this. The only point is that there a still the standard 
driver in my installation.

my web.xml


load-class



         com.ibm.servlet.classloader.Handler -->


org.hsqldb.jdbcDriver

         org.apache.cocoon.samples.parentcm.Configurator
         -->
org.gjt.mm.mysql.Driver






my cocoon.xconf:


           If you have an Oracle database, and are using the the
       pool-controller below, you should add the attribute
       "oradb" and set it to true.

       


       That way the test to see if the server has disconnected
       the JdbcConnection will function properly.
       -->


           If you need to ensure an autocommit is set to true or
       false, then create the "auto-commit" element below.

       false

       The default is true.
       -->
jdbc:hsqldb:hsql://localhost:9002
sa








jdbc:mysql://localhost/test
root








Could there be another problem ?


At 16.37 28/08/2002 +0100, you wrote:

>Hi Jessica,
>
>You should have something like this in web.xml
>
> 
> 
load-class

> 

> org.gjt.mm.mysql.Driver
> 

> 
>
>and something like this in cocoon.xconf
>
> 
> 
> 

> jdbc:mysql://127.0.0.1/databasename
> root
> 


> 
> 
>
>If there are no config problems then post your web.xml and cocoon.xconf 
>extracts and I'll have a look. the jar should be fine in WEB-INF/lib.
>
>Jez
>
>
>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: 
For additional commands, e-mail: 




---------------------------------
Get a bigger mailbox -- choose a size that fits your needs.

RE: Installing mysql JDBC Driver

Posted by Jan Willem Penterman <jw...@shapers.nl>.
Took a closer look on my config, I also have
<driver>com.mysql.jdbc.Driver</driver> in my xconf mysql part. I'm not
sure if this could make a difference. Back when I was having problems
setting mysql up on a JDK1.3.1 box, someone pointed me to the fact that
I'd better use the latest versions possible of required software. Doing
so actually solved my mysterious driver problems. Maybe it's worth the
effort to try upgrading to JDK1.4...

JW

> -----Original Message-----
> From: Jessica Niewint [mailto:j.niewint@kiosco.org] 
> Sent: donderdag 29 augustus 2002 10:12
> To: cocoon-users@xml.apache.org
> Subject: Re: Installing mysql JDBC Driver
> 
> 
> 
> If there are no config problems then post your web.xml and 
> cocoon.xconf 
> extracts and I'll have a look.  the jar should be fine in 
> WEB-INF/lib. I got exactly all this. The only point is that 
> there a still the standard 
> driver in my installation.
> 
> my web.xml
>    <init-param>
>        <param-name>load-class</param-name>
>        <param-value>
>          <!-- For IBM WebSphere:
>          com.ibm.servlet.classloader.Handler -->
> 
>          <!-- For Database Driver: -->
>          org.hsqldb.jdbcDriver
> 
>          <!-- For parent ComponentManager sample:
>          org.apache.cocoon.samples.parentcm.Configurator
>          -->
>          org.gjt.mm.mysql.Driver
>        </param-value>
>      </init-param>
> 
> 
> 
> my cocoon.xconf:
> <datasources>
>      <jdbc logger="core.datasources.personnel" name="personnel">
>        <!--
>            If you have an Oracle database, and are using the the
>        pool-controller below, you should add the attribute
>        "oradb" and set it to true.
> 
>        <pool-controller min="5" max="10" oradb="true"/>
> 
>        That way the test to see if the server has disconnected
>        the JdbcConnection will function properly.
>        -->
>        <pool-controller max="10" min="5"/>
>        <!--
>            If you need to ensure an autocommit is set to true or
>        false, then create the "auto-commit" element below.
> 
>        <auto-commit>false</auto-commit>
> 
>        The default is true.
>        -->
>        <dburl>jdbc:hsqldb:hsql://localhost:9002</dburl>
>        <user>sa</user>
>        <password/>
>      </jdbc>
> 
> <!-- my mysql driver -->
>     <jdbc name="mysql">
>        <pool-controller max="10" min="5"/>
>        <dburl>jdbc:mysql://localhost/test</dburl>
>        <user>root</user>
>        <password></password>
>      </jdbc>
> 
>    </datasources>
> 
> 
>   Could there be another problem ?
> 
> 
> At 16.37 28/08/2002 +0100, you wrote:
> 
> >Hi Jessica,
> >
> >You should have something like this in web.xml
> >
> >     <init-param>
> >       <param-name>load-class</param-name>
> >       <param-value>
> >           org.gjt.mm.mysql.Driver
> >       </param-value>
> >     </init-param>
> >
> >and something like this in cocoon.xconf
> >
> >   <datasources>
> >     <jdbc name="mysqlds">
> >       <pool-controller min="5" max="10"/>
> >       <dburl>jdbc:mysql://127.0.0.1/databasename</dburl>
> >       <user>root</user>
> >       <password></password>
> >     </jdbc>
> >   </datasources>
> >
> >If there are no config problems then post your web.xml and 
> cocoon.xconf
> >extracts and I'll have a look.  the jar should be fine in 
> WEB-INF/lib.
> >
> >Jez
> >
> >
> >
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
> 
> 


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

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


Re: Installing mysql JDBC Driver

Posted by Jessica Niewint <j....@kiosco.org>.
If there are no config problems then post your web.xml and cocoon.xconf 
extracts and I'll have a look.  the jar should be fine in WEB-INF/lib.
I got exactly all this. The only point is that there a still the standard 
driver in my installation.

my web.xml
   <init-param>
       <param-name>load-class</param-name>
       <param-value>
         <!-- For IBM WebSphere:
         com.ibm.servlet.classloader.Handler -->

         <!-- For Database Driver: -->
         org.hsqldb.jdbcDriver

         <!-- For parent ComponentManager sample:
         org.apache.cocoon.samples.parentcm.Configurator
         -->
         org.gjt.mm.mysql.Driver
       </param-value>
     </init-param>



my cocoon.xconf:
<datasources>
     <jdbc logger="core.datasources.personnel" name="personnel">
       <!--
           If you have an Oracle database, and are using the the
       pool-controller below, you should add the attribute
       "oradb" and set it to true.

       <pool-controller min="5" max="10" oradb="true"/>

       That way the test to see if the server has disconnected
       the JdbcConnection will function properly.
       -->
       <pool-controller max="10" min="5"/>
       <!--
           If you need to ensure an autocommit is set to true or
       false, then create the "auto-commit" element below.

       <auto-commit>false</auto-commit>

       The default is true.
       -->
       <dburl>jdbc:hsqldb:hsql://localhost:9002</dburl>
       <user>sa</user>
       <password/>
     </jdbc>

<!-- my mysql driver -->
    <jdbc name="mysql">
       <pool-controller max="10" min="5"/>
       <dburl>jdbc:mysql://localhost/test</dburl>
       <user>root</user>
       <password></password>
     </jdbc>

   </datasources>


  Could there be another problem ?


At 16.37 28/08/2002 +0100, you wrote:

>Hi Jessica,
>
>You should have something like this in web.xml
>
>     <init-param>
>       <param-name>load-class</param-name>
>       <param-value>
>           org.gjt.mm.mysql.Driver
>       </param-value>
>     </init-param>
>
>and something like this in cocoon.xconf
>
>   <datasources>
>     <jdbc name="mysqlds">
>       <pool-controller min="5" max="10"/>
>       <dburl>jdbc:mysql://127.0.0.1/databasename</dburl>
>       <user>root</user>
>       <password></password>
>     </jdbc>
>   </datasources>
>
>If there are no config problems then post your web.xml and cocoon.xconf 
>extracts and I'll have a look.  the jar should be fine in WEB-INF/lib.
>
>Jez
>
>
>


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

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


RE: Installing mysql JDBC Driver

Posted by Jessica Niewint <j....@kiosco.org>.
At 18.51 28/08/2002 +0200, you wrote:
>I just dropped it into the lib folder. My setup in web.xml and
>cocoon.xconf are like Jermey Aston desribed in his reply (only
>difference are the classnames for connector/j).

OK I dropped the mysql-connector-java-3.0.0-beta-bin.jar file ( I did not 
rename it) into my cocoon/WEB-INF/lib folder and add the classname 
com.mysql.jdbc.Driver to the web.xml  file. Cocoon starts up, but in the 
access.log I got a java exeption ...

>Try dropping it $CATALINA_HOME/common/lib, that seems to work for some
>setups.
No if a drop the mysql-connector-java-3.0.0-beta-bin.jar file here tomcat 
will not start.

Is there something else that could be wrong ? May be a Java classpath ? The 
configuration of tomcat ( even if all the examples/applications of tomcat 
worked fine) ?
Cocoon (here also no problems with the standard installation and given 
examples ).

May be some conflict with other drivers. P.ex. I got the jdbc interbase 
driver in my classpath ... 


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

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


Re: Installing mysql JDBC Driver

Posted by Andre Thenot <at...@thenot.net>.
You can also put it in $JAVA_HOME/lib/ext (or 
$JAVA_HOME/jre/lib/ext depending on your setup). That way, it's 
accessible  from anywhere on your system <disclaimer>which is a 
feature or a bug...</disclaimer>.

On Wednesday, August 28, 2002, at 12:51 , Jan Willem Penterman wrote:

> I just dropped it into the lib folder. My setup in web.xml and
> cocoon.xconf are like Jermey Aston desribed in his reply (only
> difference are the classnames for connector/j).
> Try dropping it $CATALINA_HOME/common/lib, that seems to work for some
> setups.


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

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


RE: Installing mysql JDBC Driver

Posted by Jan Willem Penterman <jw...@shapers.nl>.
I just dropped it into the lib folder. My setup in web.xml and
cocoon.xconf are like Jermey Aston desribed in his reply (only
difference are the classnames for connector/j).
Try dropping it $CATALINA_HOME/common/lib, that seems to work for some
setups.

JW

> -----Original Message-----
> From: Jessica Niewint [mailto:j.niewint@kiosco.org] 
> Sent: woensdag 28 augustus 2002 18:30
> To: cocoon-users@xml.apache.org
> Subject: RE: Installing mysql JDBC Driver
> 
> 
> At 18.02 28/08/2002 +0200, you wrote:
> >Does the driver show up in the Classpath in core.log? (Do a 
> search on 
> >"Classpath =" in core.log and see if the driver is listed 
> over there).
> >
> >I also had a lot of trouble with getting mysql to work. Using JDK1.4 
> >and Connector/J 3.0 beta now (that's the successor to 
> mm.mysql, they're 
> >essentially the same). No problems anymore..
> >
> >JW
> 
> But how did you installed the driver ? With an extra- 
> classpath ? Or did 
> you drop the mysql-connector-java-3.0.0-beta-bin.jar file 
> into the lib 
> folder of cocoon ?
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
> 
> 


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

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


RE: Installing mysql JDBC Driver

Posted by Jessica Niewint <j....@kiosco.org>.
At 18.02 28/08/2002 +0200, you wrote:
>Does the driver show up in the Classpath in core.log? (Do a search on
>"Classpath =" in core.log and see if the driver is listed over there).
>
>I also had a lot of trouble with getting mysql to work. Using JDK1.4 and
>Connector/J 3.0 beta now (that's the successor to mm.mysql, they're
>essentially the same). No problems anymore..
>
>JW

But how did you installed the driver ? With an extra- classpath ? Or did 
you drop the mysql-connector-java-3.0.0-beta-bin.jar file into the lib 
folder of cocoon ?


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

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


Re: Installing mysql JDBC Driver

Posted by Jeremy Aston <je...@yahoo.co.uk>.
 Hi Jessica,
You should have something like this in web.xml
    <init-param>
      <param-name>load-class</param-name>
      <param-value>
          org.gjt.mm.mysql.Driver
      </param-value>
    </init-param>

and something like this in cocoon.xconf
  <datasources>
    <jdbc name="mysqlds">
      <pool-controller min="5" max="10"/>
      <dburl>jdbc:mysql://127.0.0.1/databasename</dburl>
      <user>root</user>
      <password></password>
    </jdbc>
  </datasources>

If there are no config problems then post your web.xml and cocoon.xconf extracts and I'll have a look.  the jar should be fine in WEB-INF/lib.
Jez

 
 
  Jessica Niewint <j....@kiosco.org> wrote: My configuration:
tomcat 4.0.4, cocoon 2.0.3, java jdk1.2.2

In copied the mm.mysql-2.0.4-bin.jar file into the lib folder of 
cocoon/WEB-INF. I loaded the driver in the web.xml file. When I check now 
the installation in the access.log file I got the following message:
DEBUG (2002-08-28) 16:35.15:025 [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Trying to load class: org.gjt.mm.mysql.Driver
INFO (2002-08-28) 16:35.15:088 [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Reloading from: 
jndi:/localhost/cocoon/WEB-INF/cocoon.xconf

if I try to configure my connection pool in cocoon.xconf : I got the 
following exeption:

DEBUG (2002-08-09) 17:42.10:231 [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Trying to load class: org.gjt.mm.mysql.Driver
WARN (2002-08-09) 17:42.10:287 [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Could not force-load class: 
org.gjt.mm.mysql.Driver
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1406)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1254)
at org.apache.cocoon.util.ClassUtils.loadClass(ClassUtils.java:88)
at org.apache.cocoon.servlet.CocoonServlet.forceLoad(CocoonServlet.java:842)
at 
org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1219)
at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:435)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3279)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3421)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:738)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at org.apache.catalina.core.StandardService.start(StandardService.java:388)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
INFO (2002-08-09) 17:42.10:432 [access] (Unknown-URI) 
Unknown-thread/CocoonServlet: Reloading from: 
jndi:/localhost/cocoon/WEB-INF/cocoon.xconf

I really have no clue. Why is it impossible to define a connection pool for 
mysql ? Do I have to change the name of the mm.mysql-2.0.4-bin.jar file ? 
What can I do to make everything work ?
Thanks in advance, Jessi


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: 
For additional commands, e-mail: 


jez
jez@pigbite.com
+44 (0)7768 277092
+44 (0)1903 715458
ICQ 67849002



---------------------------------
Get a bigger mailbox -- choose a size that fits your needs.

http://uk.docs.yahoo.com/mail_storage.html

RE: Installing mysql JDBC Driver

Posted by Jan Willem Penterman <jw...@shapers.nl>.
Does the driver show up in the Classpath in core.log? (Do a search on
"Classpath =" in core.log and see if the driver is listed over there). 

I also had a lot of trouble with getting mysql to work. Using JDK1.4 and
Connector/J 3.0 beta now (that's the successor to mm.mysql, they're
essentially the same). No problems anymore..

JW 

> -----Original Message-----
> From: Jessica Niewint [mailto:j.niewint@kiosco.org] 
> Sent: woensdag 28 augustus 2002 16:47
> To: cocoon-users@xml.apache.org
> Subject: Installing mysql JDBC Driver
> 
> 
> My configuration:
> tomcat 4.0.4, cocoon 2.0.3, java jdk1.2.2
> 
> In copied the mm.mysql-2.0.4-bin.jar file into the lib folder of 
> cocoon/WEB-INF. I loaded the driver in the web.xml file. When 
> I check now 
> the installation in the access.log file I got the following message:
> DEBUG   (2002-08-28) 16:35.15:025   [access] (Unknown-URI) 
> Unknown-thread/CocoonServlet: Trying to load class: 
> org.gjt.mm.mysql.Driver
> INFO    (2002-08-28) 16:35.15:088   [access] (Unknown-URI) 
> Unknown-thread/CocoonServlet: Reloading from: 
> jndi:/localhost/cocoon/WEB-INF/cocoon.xconf
> 
> if I try to configure my connection pool in cocoon.xconf : I got the 
> following exeption:
> 
> DEBUG   (2002-08-09) 17:42.10:231   [access] (Unknown-URI) 
> Unknown-thread/CocoonServlet: Trying to load class: 
> org.gjt.mm.mysql.Driver
> WARN    (2002-08-09) 17:42.10:287   [access] (Unknown-URI) 
> Unknown-thread/CocoonServlet: Could not force-load class: 
> org.gjt.mm.mysql.Driver
> java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
> 	at 
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappC
> lassLoader.java:1406)
> 	at 
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappC
> lassLoader.java:1254)
> 	at 
> org.apache.cocoon.util.ClassUtils.loadClass(ClassUtils.java:88)
> 	at 
> org.apache.cocoon.servlet.CocoonServlet.forceLoad(CocoonServle
> t.java:842)
> 	at 
> org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonSer
> vlet.java:1219)
> 	at 
> org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:435)
> 	at 
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardW
> rapper.java:918)
> 	at 
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.
> java:810)
> 	at 
> org.apache.catalina.core.StandardContext.loadOnStartup(Standar
> dContext.java:3279)
> 	at 
> org.apache.catalina.core.StandardContext.start(StandardContext
> .java:3421)
> 	at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.
> java:785)
> 	at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478)
> 	at 
> org.apache.catalina.core.StandardHost.install(StandardHost.java:738)
> 	at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324)
> 	at 
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
> 	at 
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConf
> ig.java:232)
> 	at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(L
> ifecycleSupport.java:155)
> 	at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
> 	at 
> org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
> 	at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
> 	at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
> 	at 
> org.apache.catalina.core.StandardService.start(StandardService
> .java:388)
> 	at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
> 	at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
> 	at 
> org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
> 	at 
> org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> 	at java.lang.reflect.Method.invoke(Native Method)
> 	at 
> org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
> INFO    (2002-08-09) 17:42.10:432   [access] (Unknown-URI) 
> Unknown-thread/CocoonServlet: Reloading from: 
> jndi:/localhost/cocoon/WEB-INF/cocoon.xconf
> 
> I really have no clue. Why is it impossible to define a 
> connection pool for 
> mysql ? Do I have to change the name of the 
> mm.mysql-2.0.4-bin.jar file ? 
> What can I do to make everything work ?
> Thanks in advance, Jessi
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
> 
> 


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

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