cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yosauron <yosauron.desarro...@gmail.com>
Subject RE: Database connection by cocoon 2.2
Date Tue, 23 Sep 2008 07:12:32 GMT

Please, Does anybody know where is the error? I have been searching the error
for 5-6 days and I don't have any more clues... Can anyone help me?



yosauron wrote:
> 
> Hi Dom,
> 
> I have followed these steps but I get the following error when I request
> the url from the web browser: 
> 
> 
> 
>> javax.servlet.ServletException: org.apache.cocoon.ProcessingException:
>> Failed to process pipeline
>> 	at <map:serialize type="xml"> -
>> file:///home/caribdis/cocoon/bloqueBD2/./src/main/resources/COB-INF/sitemap.xmap:45:36
>> 	at <map:transform type="sql"> -
>> file:///home/caribdis/cocoon/bloqueBD2/./src/main/resources/COB-INF/sitemap.xmap:39:35
>> 	at <map:generate> -
>> file:///home/caribdis/cocoon/bloqueBD2/./src/main/resources/COB-INF/sitemap.xmap:38:42
>> 	at <map:match> -
>> file:///home/caribdis/cocoon/bloqueBD2/./src/main/resources/COB-INF/sitemap.xmap:37:37
>> 	at
>> org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:232)
>> 	at
>> org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:64)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>> 	at
>> org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:567)
>> 	at
>> org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:544)
>> 	at
>> org.apache.cocoon.servletservice.spring.ServletFactoryBean$ServiceInterceptor.invoke(ServletFactoryBean.java:230)
>> 	at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
>> 	at
>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
>> 	at $Proxy5.service(Unknown Source)
>> 	at
>> org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherServlet.java:102)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>> 	at
>> org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServlet.service(ReloadingServlet.java:89)
>> 	at
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>> 	at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
>> 	at
>> org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(MultipartFilter.java:119)
>> 	at
>> org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter.doFilter(ReloadingServletFilter.java:50)
>> 	at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>> 	at org.apache.cocoon.servlet.DebugFilter.doFilter(DebugFilter.java:169)
>> 	at
>> org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter.doFilter(ReloadingServletFilter.java:50)
>> 	at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>> 	at
>> org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingSpringFilter.doFilter(ReloadingSpringFilter.java:69)
>> 	at
>> org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter.doFilter(ReloadingServletFilter.java:50)
>> 	at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>> 	at
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
>> 	at
>> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>> 	at
>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>> 	at
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
>> 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>> 	at
>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
>> 	at
>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>> 	at
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>> 	at org.mortbay.jetty.Server.handle(Server.java:313)
>> 	at
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
>> 	at
>> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
>> 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
>> 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>> 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
>> 	at
>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
>> 	at
>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
>> Caused by: org.apache.cocoon.ProcessingException: Failed to process
>> pipeline
>> 	at <map:serialize type="xml"> -
>> file:///home/caribdis/cocoon/bloqueBD2/./src/main/resources/COB-INF/sitemap.xmap:45:36
>> 	at <map:transform type="sql"> -
>> file:///home/caribdis/cocoon/bloqueBD2/./src/main/resources/COB-INF/sitemap.xmap:39:35
>> 	at <map:generate> -
>> file:///home/caribdis/cocoon/bloqueBD2/./src/main/resources/COB-INF/sitemap.xmap:38:42
>> 	at <map:match> -
>> file:///home/caribdis/cocoon/bloqueBD2/./src/main/resources/COB-INF/sitemap.xmap:37:37
>> 	at
>> org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:143)
>> 	at
>> org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.handleException(AbstractProcessingPipeline.java:921)
>> 	at
>> org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:370)
>> 	at
>> org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:727)
>> 	at
>> org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.preparePipeline(AbstractProcessingPipeline.java:464)
>> 	at
>> org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:409)
>> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> 	at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> 	at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> 	at java.lang.reflect.Method.invoke(Method.java:597)
>> 	at
>> org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:72)
>> 	at $Proxy8.process(Unknown Source)
>> 	at
>> org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:144)
>> 	at
>> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55)
>> 	at
>> org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:87)
>> 	at
>> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
>> 	at
>> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:151)
>> 	at
>> org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
>> 	at
>> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
>> 	at
>> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:240)
>> 	at
>> org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:171)
>> 	at
>> org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:251)
>> 	at
>> org.apache.cocoon.servlet.RequestProcessor.process(RequestProcessor.java:357)
>> 	at
>> org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:171)
>> 	... 38 more
>> Caused by: org.springframework.beans.factory.BeanCreationException: Error
>> creating bean with name
>> 'org.apache.cocoon.transformation.Transformer/sqlPooled': Initialization
>> of bean failed; nested exception is java.lang.NoSuchMethodError:
>> org.apache.cocoon.transformation.SQLTransformer.getLogger()Lorg/apache/commons/logging/Log;
>> 	at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:448)
>> 	at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:270)
>> 	at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>> 	at
>> org.apache.cocoon.core.container.spring.avalon.PoolableFactoryBean.getFromPool(PoolableFactoryBean.java:212)
>> 	at
>> org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:68)
>> 	at $Proxy9.setup(Unknown Source)
>> 	at
>> org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeline(AbstractProcessingPipeline.java:354)
>> 	... 59 more
>> Caused by: java.lang.NoSuchMethodError:
>> org.apache.cocoon.transformation.SQLTransformer.getLogger()Lorg/apache/commons/logging/Log;
>> 	at
>> org.apache.cocoon.transformation.SQLTransformer.configure(SQLTransformer.java:278)
>> 	at
>> org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:202)
>> 	at
>> org.apache.cocoon.core.container.spring.avalon.AvalonBeanPostProcessor.postProcessBeforeInitialization(AvalonBeanPostProcessor.java:235)
>> 	at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:301)
>> 	at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1167)
>> 	at
>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
>> 	... 65 more
>> 
> 
> 
> Dominic Tootell-2 wrote:
>> 
>> Inside your cocoon 2 block:
>> 
>> 
>> 1)  inside
>> src/main/resources/META-INF/cocoon/avalon/custom-sitemap-compents.xconf
>> put:
>> 
>> <map:components>
>> 
>>  	.....
>> 
>> 	<map:transformers>
>> 		<map:transformer logger="sitemap.transformer.sql"
>> name="sql" src="org.apache.cocoon.transformation.SQLTransformer"/> 
>> 
>> 		....
>> 
>> 	</map:transformers>
>> </map:components>
>> 
>> 
>> 2)  in the block pom.xml:
>> 
>>   <dependency>
>>       <groupId>org.apache.cocoon</groupId>
>>       <artifactId>cocoon-databases-impl</artifactId> 
>>       <version>1.0.0</version>
>>     </dependency>
>>     <dependency>
>>     	<groupId>oracle</groupId>
>>     	<artifactId>oracle-jdbc</artifactId>
>>     	<version>10.2.0.4</version>
>>     </dependency>
>> 
> 
> I have installed oracle XE 10.2.0.1.0, so I put my version instead of
> yours (10.2.0.4). When I build the block, I got an artifact missing error
> (oracle:oracle-jdbc:jar:10.2.0.1.0), so I downloaded from the 
> http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html
> oracle's web page  the 
> http://download.oracle.com/otn/utilities_drivers/jdbc/10201/ojdbc14.jar
> ojdbc14.jar  driver.
> 
> After that, I installed the driver whith:
> 
> mvn install:install-file -DgroupId=oracle -DartifactId=oracle-jdbc
> -Dversion=10.2.0.1.0 -Dpackaging -Dfile=ojdbc14.jar
> 
> 
> Do I load wrong the jdbc driver? Is it the root of my error? Thank you.
> 
> 
> 
> 
> 
> 
> 
>> 3)  inside src/main/resources/META-INF/cocoon/spring/datasources.xml
>> 
>> <beans xmlns="http://www.springframework.org/schema/beans"
>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>        xsi:schemaLocation="http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>> 
>>     <bean
>> name="org.apache.avalon.excalibur.datasource.DataSourceComponent/lastmod
>> "
>> class="org.apache.cocoon.databases.bridge.spring.avalon.SpringToAvalonDa
>> taSourceWrapper">
>>         <property name="wrappedBean">
>>             <bean
>> class="org.springframework.jdbc.datasource.DriverManagerDataSource" >
>>               <property name="driverClassName"
>> value="oracle.jdbc.driver.OracleDriver"/>
>>               <property name="url"
>> value="jdbc:oracle:thin:@cmcdev2007:1521:cmccis"/>
>>               <property name="username" value="xxxx"/>
>>               <property name="password" value="xxxxx"/>
>>             </bean>
>>         </property>
>>     </bean>
>> </beans>
>> 
>> 4)  inside src/main/resources/COB-INF/sitemap.xmap:
>> 
>> <map:match pattern="runsql/*">
>> 	<map:generate src="sql/sql.xml"/>
>> 	<map:transform type="sql">
>> 					<map:parameter
>> name="use-connection" value="lastmod"/>
>> 					<map:parameter
>> name="show-nr-of-rows" value="true"/> 
>> 					<map:parameter
>> name="clob-encoding" value="UTF-8"/>
>> 					<map:parameter name="date"
>> value="{1}"/>
>> 	</map:transform>
>> 	<map:serialize type="xml"/>
>> </map:match>
>> 
>> 
>> 5)  inside src/main/resources/COB-INF/sql/sql.xml:
>> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <page>
>>     <title>Hello</title>
>>     <content>
>>         <para>The following concepts were modified since:</para>
>>         <sql:execute-query xmlns:sql="http://apache.org/cocoon/SQL/2.0">
>> 
>>             <sql:query name="lastmod">
>>                 SELECT * FROM DALCONCEPT_LASTMOD 
>>                 WHERE LASTMODIFIED &gt;= TO_DATE('<sql:substitute-value 
>>                     sql:name="date"/>','YYYYMMDD')
>>             </sql:query>
>>         </sql:execute-query>
>>     </content>
>> </page>
>> 
>> 
>> I agree with the others though.... Hibernate + Spring should be used for
>> any production type app, for a quick mock up, the above should work
>> without having to go near Spring + Hibernate.
>> 
>> /dom
>> 
>> 
> 

-- 
View this message in context: http://www.nabble.com/Database-connection-by-cocoon-2.2-tp17674320p19622454.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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


Mime
View raw message