cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Gallardo Rivera <agalla...@agsoftware.dnsalias.com>
Subject How to code the boolean datatype in a descriptor?
Date Wed, 28 Aug 2002 20:36:49 GMT
I am using cocoon to let the users fill a database.

I am using Cocoon 2.03, Tomcat 4.1.9 and Java 1.4.1 on Linux.

I wrote the following descriptor:

<root>
  <parameter name="id" nullable="no" type="long" default="1"/>
  <parameter name="nombre" nullable="no" max-len="50" min-len="3" 
type="string"/>
  <parameter name="habilitado" nullable="no" min="0" max="1" type="long"/>
  <constraint-set name="update">
    <validate name="id"/>
    <validate name="nombre"/>
    <validate name="habilitado"/>
  </constraint-set>
  <constraint-set name="add">
    <validate name="nombre"/>
    <validate name="habilitado" default="1"/>
  </constraint-set>
  <connection>mp_pool</connection>
  <table name="categoria">
    <keys>
      <key dbcol="cat_id" mode="manual" param="id" type="int"/>
    </keys>
    <values>
      <value dbcol="cat_nombre" param="nombre" type="string"/>
      <value dbcol="cat_habilitado" param="habilitado" type="boolean"/>
    </values>
  </table>
</root>

Cocoon give me and error in the line:

      <value dbcol="cat_habilitado" param="habilitado" type="boolean"/>

Then how I can code a boolean value to store and retrieve it from ProstgreSQL 
7.2.1?

The error I got is:

"Can't set column because the type boolean is unrecognized"

Detail:

Original exception : java.sql.SQLException: Can't set column because the type 
boolean is unrecognized at 
org.apache.cocoon.acting.AbstractDatabaseAction.setColumn(AbstractDatabaseAction.java:415)

at 
org.apache.cocoon.acting.AbstractDatabaseAction.setColumn(AbstractDatabaseAction.java:393)

at 
org.apache.cocoon.acting.AbstractDatabaseAction.setColumn(AbstractDatabaseAction.java:379)

at 
org.apache.cocoon.acting.AbstractDatabaseAction.setColumn(AbstractDatabaseAction.java:355)

at 
org.apache.cocoon.acting.DatabaseAddAction.processTable(DatabaseAddAction.java:221) 
at org.apache.cocoon.acting.DatabaseAddAction.act(DatabaseAddAction.java:117) 
at
....

---------------------------------------------------------------------
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