cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gou...@osmosis.gr
Subject Re: Mysql i Cocoon 2.1
Date Tue, 02 Sep 2003 07:54:18 GMT
On Mon, 1 Sep 2003, Marcin Stefaniuk wrote:

> Hello!
> I have problem with connection to mysql. Sample for hsqldb works ok.
> I installed mysql_connector_java_3.0.8-stable.jar from mysql.com in WEB-INF.
> I checked that I have excalibur-datasource-1.1.1.jar
> 
> I put entry in web.xml:
> 
> <init-param>
>  <param-name>load-class</param-name>
>   <param-value>com.mysql.jdbc.Driver</param-value>
>   <param-value>
>  <!-- For parent ComponentManager sample:
>  org.apache.cocoon.samples.parentcm.Configurator -->
>  <!-- For IBM WebSphere:
>  com.ibm.servlet.classloader.Handler -->
>  <!-- For Database Driver: -->
>  org.hsqldb.jdbcDriver
>  </param-value>
> </init-param>

my entry in web.xml 
<init-param>
	<param-name>load-class</param-name>
	<param-value>
        org.hsqldb.jdbcDriver
        <!-- mysql -->
        org.gjt.mm.mysql.Driver        
</param-value>
</init-param>


-- stavros

> 
> I extended datasource:
> 
> <datasources>
> <jdbc logger="core.datasources.personnel" name="personnel">
> <pool-controller max="10" min="5"/>
> <auto-commit>false</auto-commit>
> <dburl>jdbc:hsqldb:hsql://localhost:9002</dburl>
> <user>sa</user>
> <password/>
> </jdbc>
> <jdbc logger="core.datasources.test" name="test">
> <pool-controller max="10" min="5"/>
> <dburl>jdbc:mysql://host.pl:3306/vshopTest</dburl>
> <user>superReader</user>
> <password>test</password>
> </jdbc>
> </datasources>
> 
> I added to sitemap (in main context):
> 
> <map:match pattern="sqltest">
>  <map:generate src="sql/test.xsql"/>
>  <map:transform type="sql">
>  <map:parameter name="use-connection" value="personnel"/>
>  </map:transform>
> <map:transform src="samples/databases/stylesheets/sql2html.xsl">
>  <map:parameter name="servletPath" value="{request:servletPath}"/>
>  <map:parameter name="sitemapURI" value="{request:sitemapURI}"/>
>  <map:parameter name="contextPath" value="{request:contextPath}"/>
>  <map:parameter name="file" value=".xsql"/>
> </map:transform>
> <map:serialize/>
> </map:match>
> 
> But I receive "Failed to obtain connection. Made 5 attempts with 5000ms
> interval "
> In core.log it shows:
> WARN    (2003-09-01) 20:50.21:019   [core.datasources.test]
> (/cocoon/sqltest) Thread-66/ResourceLimitingJdbcDataSource: Could not return
> Connection
> java.sql.SQLException: No suitable driver
>  at java.sql.DriverManager.getConnection(DriverManager.java:532)
>  at java.sql.DriverManager.getConnection(DriverManager.java:171)
>  at
> org.apache.avalon.excalibur.datasource.JdbcConnectionFactory.newInstance(Jdb
> cConnectionFactory.java:185)
>  at
> org.apache.avalon.excalibur.pool.ResourceLimitingPool.newPoolable(ResourceLi
> mitingPool.java:672)
>  at
> org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPool.newPoolable(V
> alidatedResourceLimitingPool.java:178)
>  at
> org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcConnectionPool.ne
> wPoolable(ResourceLimitingJdbcConnectionPool.java:123)
>  at
> org.apache.avalon.excalibur.pool.ResourceLimitingPool.get(ResourceLimitingPo
> ol.java:402)
>  at
> org.apache.avalon.excalibur.pool.ValidatedResourceLimitingPool.get(Validated
> ResourceLimitingPool.java:130)
>  at
> org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource.getCon
> nection(ResourceLimitingJdbcDataSource.java:222)
>  at
> org.apache.cocoon.transformation.SQLTransformer$Query.getConnection(SQLTrans
> former.java:988)
>  at
> org.apache.cocoon.transformation.SQLTransformer$Query.execute(SQLTransformer
> .java:1061)
>  at
> org.apache.cocoon.transformation.SQLTransformer.executeQuery(SQLTransformer.
> java:309)
>  at
> org.apache.cocoon.transformation.SQLTransformer.endExecuteQueryElement(SQLTr
> ansformer.java:466)
>  at
> org.apache.cocoon.transformation.SQLTransformer.endTransformingElement(SQLTr
> ansformer.java:747)
>  at
> org.apache.cocoon.transformation.AbstractSAXTransformer.endElement(AbstractS
> AXTransformer.java:358)
>  at
> org.apache.cocoon.components.sax.XMLTeePipe.endElement(XMLTeePipe.java:124)
>  at
> org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XMLByteStrea
> mInterpreter.java:137)
>  at
> org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserialize(XMLByt
> eStreamInterpreter.java:110)
>  at
> org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
> .processXMLPipeline(AbstractCachingProcessingPipeline.java:270)
>  at
> org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
> tractProcessingPipeline.java:492)
>  at
> org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
> alizeNode.java:150)
>  at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
> keNodes(AbstractParentProcessingNode.java:84)
>  at
> org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
> e(PreparableMatchNode.java:164)
>  at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
> keNodes(AbstractParentProcessingNode.java:108)
>  at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
> ineNode.java:164)
>  at
> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
> keNodes(AbstractParentProcessingNode.java:108)
>  at
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
> linesNode.java:161)
>  at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
> or.java:327)
>  at
> org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
> or.java:309)
>  at org.apache.cocoon.Cocoon.process(Cocoon.java:639)
>  at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1096)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:247)
>  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:193)
>  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:256)
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:191)
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  at
> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
>  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
> )
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
>  at
> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> java:171)
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:641)
>  at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
> )
>  at
> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:641)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>  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.invok
> eNext(StandardPipeline.java:643)
>  at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>  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:601)
>  at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
> ction(Http11Protocol.java:392)
>  at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
>  at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:619)
>  at java.lang.Thread.run(Thread.java:536)
> 
> Thank you in advance
> Marcin Stefaniuk
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


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


Mime
View raw message