cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bobby Mitchell <bmitc...@niac.usra.edu>
Subject Re: Problems with Database Tutorial
Date Tue, 02 Jul 2002 15:36:35 GMT
Christian Haul wrote:

>On 28.Jun.2002 -- 09:19 AM, Bobby Mitchell wrote:
>
>>I'm using Cocoon 2.1-dev, IBM JDK 1.3, running on RedHat 7.2, and using 
>>Sybase 11.9.2.
>>
Now I'm using Cocoon 2.0.3-dev, Sun J2SDK 1.4.0, Tomcat 4.0.2.

>>
>>
>>I can't add or update users in the DB. I can only delete them. I tried 
>>this with both Sybase and Hsqldb and the results are the same.
>>
>
>AFAIK there's a pending bug that the treeprocssor (which interpretes
>the sitemap for 2.1-dev per default) does not allow to nest actions in
>an action-set. Hence using db-add inside form-val does not work with
>that release and the tutorial is broken.
>
>With 2.0.2 and 2.0.3 (not released, yet, available from CVS, branch
>cocoon_2_0_3_branch) it should work.
>

I cownloaded 2.0.3 from cvs using the installation documentation. I had 
to make the following changes (unix):

   1. Enter "cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic -z3
      checkout -r HEAD xml-cocoon2". This will create a directory called
      "xml-cocoon2" where the Cocoon2 source will be stored.


      to

   1. Enter "cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic -z3
      checkout -r cocoon_2_0_3_branch xml-cocoon2". This will create a
      directory called "xml-cocoon2" where the Cocoon2 source will be
      stored.


All of the database functions work properly, but ...

>
>>While using Sybase I had to remove the <esql:parameter> begin and end 
>>tags in order to actually edit the entry, otherwise I get an sql error 
>>stating that "SELECT name, department_id FROM employee WHERE id = ? " is 
>>an error. The id is being passed as a ? so it causes an error. When 
>>using Hsqldb I made no changes to the code.
>>
This behaviour is the same as before. Here is the error message:


org.apache.cocoon.ProcessingException: Exception in 
ServerPagesGenerator.generate(): java.lang.RuntimeException: Error 
executing statement: SELECT name, department_id FROM employee WHERE id = 
? : com.sybase.jdbc2.jdbc.SybSQLException: Implicit conversion from 
datatype 'CHAR' to 'INT' is not allowed. Use the CONVERT function to run 
this query.

Original exception : java.lang.RuntimeException: Error executing 
statement: SELECT name, department_id FROM employee WHERE id = ? : 
com.sybase.jdbc2.jdbc.SybSQLException: Implicit conversion from datatype 
'CHAR' to 'INT' is not allowed. Use the CONVERT function to run this 
query. at 
org.apache.cocoon.www.tutorial.docs.edit_empl_xsp.generate(/var/tomcat4/work/localhost/cocoon/cocoon-files/org/apache/cocoon/www/tutorial/docs/edit_empl_xsp.java:991)

at 
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:258)

at 
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:250)

at 
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:399)

at 
org.apache.cocoon.www.tutorial.sitemap_xmap.matchN100BC(/var/tomcat4/work/localhost/cocoon/cocoon-files/org/apache/cocoon/www/tutorial/sitemap_xmap.java:1271)

at 
org.apache.cocoon.www.tutorial.sitemap_xmap.process(/var/tomcat4/work/localhost/cocoon/cocoon-files/org/apache/cocoon/www/tutorial/sitemap_xmap.java:757)

at 
org.apache.cocoon.www.tutorial.sitemap_xmap.process(/var/tomcat4/work/localhost/cocoon/cocoon-files/org/apache/cocoon/www/tutorial/sitemap_xmap.java:684)

at org.apache.cocoon.sitemap.Handler.process(Handler.java:224) at 
org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179) at 
org.apache.cocoon.www.sitemap_xmap.matchN102F1(/var/tomcat4/work/localhost/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:3411)

at 
org.apache.cocoon.www.sitemap_xmap.process(/var/tomcat4/work/localhost/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:2640)

at 
org.apache.cocoon.www.sitemap_xmap.process(/var/tomcat4/work/localhost/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:2538)

at org.apache.cocoon.sitemap.Handler.process(Handler.java:224) at 
org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179) at 
org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154) 
at org.apache.cocoon.Cocoon.process(Cocoon.java:575) at 
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java) at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) 
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 
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.java:190) 
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 
at 
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) 
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 
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:2343) 
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) 
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 
at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) 
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) 
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) 
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 
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:566) 
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:1012) 
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107) 
at java.lang.Thread.run(Thread.java:536)

I took out the <esql:parameter> tags and it works fine. I'm using the 
jdbc driver jConnect-5_5, the latest version.

It works, but it is not standard. Are there any problems that could 
arise by leaving out these tags?


>
>This is standard JDBC syntax for a prepared statement that takes
>parameters. Maybe the original error message provides more information?
>
>>Has anyone ever seen this before? Where do I look in the log files for 
>>debug info, such as tracking what is taking place behind the scenes? Are 
>>there debug parameters that I can pass to Cocoon and receive more debug 
>>info.
>>
>
>That is spread among several files. Most interesting are probably
>core.log and sitemap.log. This can be configured in logkit.xconf.
>
>>My wish list:
>>   A debug feature that outlines each move Cocoon makes, so I can trace 
>>what my code is producing and more importantly where it fails.
>>
>
>The java code produced from an XSP is located
>$TOMCAT/work/Standalone/localhost/cocoon/cocoon-files/org/apache/cocoon/path/relative/to/context/name_xsp.java

>
>It often helps a lot to have a look at it.
>
>	Chris.
>
>Please follow up summarizing your problem and which suggested solution /
>information worked for you. Add "SUMMARY: " to the subject line. This
>will make FAQ generation and searching the list easier. In addition,
>it makes helping you more fun. Thank you.
>

-- 
Robert J. (Bobby) Mitchell
Systems Administrator
NASA Institute for Advanced Concepts
555A 14th St Atlanta, Ga. 30318
Phone: (404)347-9633 Fax: (404)347-9638





---------------------------------------------------------------------
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message