cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gensky Regnus <>
Subject Re: xsp-castor taglib
Date Tue, 11 Jul 2000 20:03:37 GMT

Donald Ball wrote:
> On Tue, 11 Jul 2000, Gensky Regnus wrote:
> > I am having problems with boolean variables when using xsp-castor. I
> > think it's related to the way the sql type is handled in
> > XSPCastorLibrary, in the char[01]  conversion from char SQL type to
> > Boolean Java type. I was successful in deleting/storing/retrieving  and
> > marshaling the same objects from the command line.
> holy canoli, someone's _using_ xsp-castor (besides kevin and
> i)? hurrah! can you give me some more details on your database and its
> schema?

I added the following in the Author class

  private boolean active;

  public void setActive(boolean newActive) {
    active = newActive;

  public boolean isActive() {
    return active;

added  active char(1) to the author_table and inserted

  <field name="active"  type="boolean" get-method="isActive"
set-method="setActive"     required="true">
   <sql name="active" type="char[01]"/>
   <xml node="element"/>

inside the Author class mapping in the mapping.xml file

The form shows up with the given name, family name and a select box for
active, but when I try to save a new Author, I get

Error: 500

Location: /wz-castor/servlet/AdminServlet

Internal Servlet Error:
javax.servlet.ServletException: java.lang.IllegalArgumentException: The
wrong convertor was used to convert value of type java.lang.Boolean
com.webslingerZ.castor.AdminServlet.service(, Compiled
        at javax.servlet.http.HttpServlet.service(
Compiled Code)
This setup worked before adding the boolean field.

> > I am also looking for advice on how to do the SAX to DOM thing. The
> > interface provided by Castor (Marshaller) is SAX based while XSP seems
> > to expect DOM elements being returned.
> Er, can't see what you're looking for here.

My question was, how do I retrieve a java object, say Author, as a DOM
element so it can be further processed by Cocoon. Should I use the
Castor Marshaller instead?


View raw message