You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Rano, Didier" <Di...@fr.michelin.com> on 2002/12/05 14:30:43 UTC

Réf:Re: Réf:RE: Problem SQLTransformer

My xml file:

<?xml version="1.0"?>

<page>

 <title>Hello</title>
 <content>

  <execute-query xmlns="http://apache.org/cocoon/SQL/2.0"> 
   <query>
        select rpb_id, rpb_id from hia_rp_bml
   </query>
  </execute-query>

 </content>
</page>

In sitemap.xmap:

   <map:match pattern="hub/sql/*">
    <map:generate src="hub/sql/{1}.xml"/>
    <map:transform type="sql">
      <map:parameter name="use-connection" value="hub_annuaire"/> 
    </map:transform>
    <!-- <map:transform src="stylesheets/simple-sql2html.xsl"/>  -->
    <map:serialize/> 
   </map:match>

In cocoon.xconf:

<jdbc logger="core.datasources.hub_annuaire" name="hub_annuaire">
      <pool-controller min="1" max="2" oradb="true"/>
      <dburl>jdbc:oracle:thin:@myserveur.com:1521:HUB0</dburl>
      <user>myUser</user>
      <password>myPassword</password>
      <auto-commit>true</auto-commit>      
    </jdbc>

In web.xml:

    <init-param>
      <param-name>load-class</param-name>
      <param-value>
        <!-- For IBM WebSphere:
        com.ibm.servlet.classloader.Handler -->

        <!-- For Database Driver: -->
        org.hsqldb.jdbcDriver
        oracle.jdbc.driver.OracleDriver
        <!-- For parent ComponentManager sample:
        org.apache.cocoon.samples.parentcm.Configurator
        -->
      </param-value>
    </init-param>

And result with sqlplus:

SQL> select rpb_id, rpb_id from hia_rp_bml;

RPB_ID                         RPB_ID
------------------------------ ------------------------------
 00427                          00427

SQL> 

____________________Séparateur de messages____________________
Objet : Re: Réf:RE: Problem SQLTransformer
Auteur :    Olivier.Guckert@inria.fr
Date :  05/12/2002 14:10

"Rano, Didier" a écrit :
>
> I verified, and values in column rpb_id are not null.
>
> Columns names are the same, because it is a test with SQL: "select rpb_id,
> rpb_id from hia_rp_bml". But with SQL: "select rpb_id from hia_rp_bml" the
> result has the same problem.
>
> Thank you for your help
>
> Didier Rano
> Serv'N Data

Spo what's a strange problem !

Cann you tell us more about it (what is your XML File ...)

Did you try your SQL syntax without Cocoon ?, and what are the results
...


Olivier GUCKERT

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

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