Check the logs in WEB-INF/logs to see if your driver
is being loaded.  I'm not sure why, but all current
cocoon documentation does not mention using <driver>
in the cocoon.xconf <jdbc> declaration.  The
recommended way to make your driver available is to
place it in web.xml under the load-class init-param
like so: 
<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>

I think the latest release of the mysql driver is
still supporting the org.gjt.mm.mysql.Driver but it's
been officially changed to com.mysql.jdbc.Driver now. 


Let me know if that "fixes" it.  Before giving up, you
may want to try stopping tomcat, deleting all of
cocoon's work files (under %CATALINA_HOME%\work) and
then restart tomcat.

Geoff Howard

--- Tom Place <[EMAIL PROTECTED]> wrote:
> Apologies if this is a slightly “lower level”
> problem than normal but I
> think I am going slowly mad.
> 
> I have just started working with cocoon 2 and am
> having some problems
> getting this to connect to mySQL. I have followed
> the tutorials to the
> letter and am getting an
> 
> Exception in ServerPagesGenerator.generate()
> Java.Lang.NullPointerException
> 
> My mySQL database appears to be up and running,
> Cocoon will quite
> happily do it's think with xml, xsl and the basic
> "hello world" xsp
> files. This only occurs when I try and access a db
> with ESQL. 
> 
> (I'm using mySQL 3.23.52, Cocoon 2.03, Tomcat 4.1,
> JDK 1.3.1,
> mySQL-connector-java-2.0.14, all running on win xp)
> 
> My cocoon.xconf contains the following datasources
> entry
> 
> <datasources>
>     <jdbc logger="core.datasources.autorevs_store"
> name="autorevs_store">
>       <pool-controller min="5" max="10">
>        <keepalive>SELECT 1;</keepalive>
>       </pool-controller>
>       <driver>org.gjt.mm.mysql.Driver</driver>
>      
> <dburl>jdbc:mysql://localhost:3306/autorevs</dburl>
>       <user>web</user>
>       <password>webpass</password>
>     </jdbc>
> </datasources>
> 
> And a fuller stack trace is as follows:
> 
> org.apache.cocoon.ProcessingException: Exception in
> ServerPagesGenerator.generate():
> java.lang.NullPointerException 
>       at
>
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGe
> nerator.java:212) 
>       at
>
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Cachi
> ngEventPipeline.java:210) 
>       at
>
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach
> ingStreamPipeline.java:359) 
>       at
>
org.apache.cocoon.www.sitemap_xmap.wildcardMatchN4005A9(sitemap_xmap.jav
> a:9309) 
>       at
>
org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:3035)
> 
>       at
>
org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2489)
> 
>       at
>
org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
> 
>       at
>
org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
> 
>       at
> org.apache.cocoon.Cocoon.process(Cocoon.java:514) 
>       at
>
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:647)
> 
>       at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 
>       at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:247) 
>       at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:193) 
>       at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.java:260) 
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:643) 
>       at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 80) 
>       at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
>       at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> e.java:191) 
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:643) 
>       at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 80) 
>       at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
>       at
>
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:239
> 6) 
>       at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :180) 
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:643) 
>       at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
> lve.java:170) 
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:641) 
>       at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :172) 
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:641) 
>       at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 80) 
>       at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
>       at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:174) 
>       at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
> nvokeNext(StandardPipeline.java:643) 
>       at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
> 80) 
>       at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
>       at
>
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> 
>       at
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:40
> 5) 
>       at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
> onnection(Http11Protocol.java:380) 
>       at
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:50
> 8) 
>       at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
> .java:533) 
>       at java.lang.Thread.run(Thread.java:479)
> 
> Any help most appreciated - again apologies if I am
> being thick!  
> 
> Thanks
> 
> Tom Place
>  
> 
> 
> 
>
---------------------------------------------------------------------
> 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:    
> <[EMAIL PROTECTED]>
> For additional commands, e-mail:  
> <[EMAIL PROTECTED]>
> 


__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

---------------------------------------------------------------------
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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to