Thanks for the suggestion.

 

But the same seem to be working on cocoon2.1.5.

Ok even if I modify the jx as follows I am getting the same exception

<?xml version="1.0" encoding="utf-8"?>
 
<jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
  <page xmlns:sql=http://apache.org/cocoon/SQL/2.0>
               <sql:execute-query> 
                 <sql:use-connection>imAdmin</sql:use-connection>
                 <sql:query>
                               Select id from temp
               </sql:query>
               </sql:execute-query
</page>
 
Please suggest me something so that I can try out.
 
Thanks and Regards,
Baskar

 

 


From: Ard Schrijvers [mailto:[EMAIL PROTECTED]
Sent: Monday, May 08, 2006 7:23 PM
To: users@cocoon.apache.org
Subject: RE: SQLTransformer problem with cocoon 2.1.7

 

 Looks like a namespace problem that after your transform type="jx" the element <page> belongs to sql namespace.  

Hi all,

 

I ma trying to use SQL Transformer to execute a query from cocoon.

SQL Transformer seems to be working fine with cocoon2.1.5 and when we port our application from 2.1.5 to cocoon2.1.7

We are getting the following exception.

SQLTransformer: Not expecting a start value element: page

org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.IllegalStateException: SQLTransformer: Not expecting a start value element: page

cause: java.lang.IllegalStateException: SQLTransformer: Not expecting a start value element: page

full exception chain stacktrace[hide]

org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.IllegalStateException: SQLTransformer: Not expecting a start value element: page 
      at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:582) 
      at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:183) 
      at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:483) 
      at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:120) 
      at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46) 
      at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130) 
      at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68) 
      at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:138) 
      at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68) 
      at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92) 
      at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234) 
      at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:176) 
      at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243) 
      at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117) 
      at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46) 
      at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130) 
      at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68) 
      at org.apache.cocoon.components.treeprocessor.sitemap.
 
Do I need to change anything with the xml which I supply to the sql transformer. I am constructing an xml with jxtemplate as follows :-
 
<?xml version="1.0" encoding="utf-8"?>
 
<jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
             xmlns:sql="http://apache.org/cocoon/SQL/2.0">
  <page>
               <sql:execute-query> 
                 <sql:use-connection>imAdmin</sql:use-connection>
                 <sql:query>
                               Select id from temp
               </sql:query>
               </sql:execute-query
 
</page>

 

I have an entry in sitemap.xmap as follows :-

 

    <map:match pattern="display-output">

      <map:generate type="jx" src="">

        <map:parameter name="lenient-xpath" value="true"/>

      </map:generate>

      <map:transform type="sql">

        <map:parameter name="clob-encoding" value="UTF-8"/>

      </map:transform>

      <map:serialize type="xml" />

    </map:match>

 

I tried to remove the page and see but I got the sql generated by the jx template back instead of the output query.

Please tell me any suggestions for this and also please tell me where I can find resources with respect to the SQL transformer.

 

Thanks and Regards,

Baskar

 


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

 


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

Reply via email to