cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnson" <>
Subject Re: a one2many binding with hibernate
Date Mon, 21 Mar 2005 00:56:14 GMT

I got the problem.
in <fb:insert-bean classname="com.goodwillheater.Shclj2" addmethod="addToShclj2Set"/>
the doSave() in throw the error.
But I don't know how to solve still,pls help.

Best Regards

  ----- Original Message ----- 
  From: Johnson 
  Sent: Sunday, March 20, 2005 10:09 PM
  Subject: Re: a one2many binding with hibernate

  If I use a different node than @id/shclj2Csdh even the node is a virtual one,the load is
ok.But save had the same error.
     <fb:value id="id" path="@oid"/>

    ----- Original Message ----- 
    From: Johnson 
    Sent: Sunday, March 20, 2005 9:46 PM
    Subject: a one2many binding with hibernate


    I want to write a one2many binding,the O/R MAP and java code were generated by hibernatesync,
    it had two kind of beans for parent table,Bean,DAO
    and it had three kind of beans child table,Bean,DAO,PK

    The Biding collection is below

     <fb:repeater id="shclj2List" parent-path="." row-path="shclj2Set">
       <fb:value id="shclj2_csdh" path="id/shclj2Csdh"/>
       <fb:value id="shclj2_csjc" path="shclj2Csjc"/>
       <fb:value id="shclj2_cspm" path="shclj2Cspm"/>
       <fb:value id="shclj2_coin" path="shclj2Coin"/>
       <fb:value id="shclj2_price" path="shclj2Price"/>
       <fb:value id="shclj2_cgl" path="shclj2Cgl"/>
      <fb:insert-bean classname="com.goodwillheater.Shclj2" addmethod="addToShclj2Set"/>

    When Load It's ok,But When save org.apache.avalon.framework.CascadingRuntimeException:
InsertBean failed

    If I don't use a PK class,the same error appear.

    If I add a 

       <fb:value id="id" path="@id/shclj2Csdh"/>

    the error happend

    java.lang.RuntimeException: Tried to set value of output widget "" with
an object of an incorrect type: expected class java.lang.Long, received class java.lang.String

    I do not write a hibernate session component in cocoon.xconf like the sample said.

    Best Regards

View raw message