You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ed Yavno <ey...@feedroom.com> on 2003/06/24 00:51:17 UTC
SQL Transformer/Resin broken?
Hi All,
I'm having problems trying to use something under Caucho Resin that works perfectly fine under Tomcat:
SQL Transformer in Cocoon 2.0.4 deployed under Resin 2.1.8/10(same result) trying to query Oracle 8i.
Both Tomcat 4.0.6 and Resin 2.1.8 use the exact same settings (see below: web.xml, cocoon.xconf, sitemap.xmap, generator source), yet Tomcat is able to connect and query the database, but Resin generates the error with the following stack trace:
java.lang.IllegalStateException: can't clear response after writing headers
at com.caucho.server.http.ResponseStream.clear(ResponseStream.java:209)
at com.caucho.server.http.Response.reset(Response.java:1272)
at com.caucho.server.http.Response.reset(Response.java:1254)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1079)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
at com.caucho.server.http.Invocation.service(Invocation.java:315)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:536)
What interesting is that the SQL transformer sample that comes with Cocoon distribution and uses HSQL database is working fine with Resin, but not with Oracle.
I would appreciate any ideas/suggestions on how this can be resolved.
I've started looking through SQLTransformer source code, but don't see anything that can cause the above error.
Thanks,
- Ed Y.
Configs:
web.xml,
in
<init-param>
<param-name>load-class</param-name>
<param-value>:
<!-- For oracle: -->
oracle.jdbc.driver.OracleDriver
cocoon.xconf,
in <datasources>:
<jdbc name="MyNewtConnection">
<pool-controller min="5" max="10" oradb="true" />
<dburl>jdbc:oracle:thin:@rosie.feedroom.com:1521:newt</dburl>
<user>user</user>
<password>password</password>
</jdbc>
sitemap.xmap :
<map:match pattern="dbtests/dbtest1">
<map:generate src="docs/custom/dbtest.xml"/>
<map:transform type="sql">
<map:parameter name="use-connection" value="MyNewtConnection"/>
</map:transform>
<map:transform src="stylesheets/simple-sql2html.xsl"/>
<map:serialize type="html" />
</map:match>
dbstest.xml:
<page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
<execute-query xmlns="http://apache.org/cocoon/SQL/2.0" xmlns:sql="http://apache.org/cocoon/SQL/2.0">
<query>
select * from models
</query>
</execute-query>
</page>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org