Yup it creats fine with an artifical key. So what could be wrong with
this sequence...

Creates fine with a insert statement in oracle. I have checked
spelling.

>>> [EMAIL PROTECTED] 04/05/05 12:15PM >>>
My first bet is something with the key-generator is screwy. Can you
take that out and see if it will work correctly (just fake the key on
one)? Everything else looks fine.

As far as the logging go, are you using Log4j at all? If so you can
set the default logging in the properties file to DEBUG for org.exolab
and also change the property in the castor.properties file which is in
the castor jar file. (forget which one, but its clearly commented)

On Apr 5, 2005 1:48 PM, Eric Anderson <[EMAIL PROTECTED]> wrote:
> Seems as though I have another newbie problem
> 
>  public void create(Object object) throws Exception {
>     Database db = null;
>     try {
>       db = getDatabase();
>       db.begin();
>       db.create(object);
>       db.commit();
>     }
>     catch (Exception e) {
>       db.rollback();
>       throw e;
>     }
>     finally {
>       close(db);
>     }
>   }
> 
> When I call create(cForm); the java process goes to 99% and hangs
until
> I kill it. Is there some kind of logging I can turn on to see where
it
> is hanging?
> I am using castor-0.9.5.3.jar and classes12 from oracle 10g (thin
> client)
> 
> Here is the mapping.
> 
> <key-generator name="SEQUENCE" alias="www_patient_comments_seq">
>     <param name="sequence" value="www_patient_comments_seq"/>
>     <param name="returning" value="true"/>
>   </key-generator>
> <!-- comments area -->
> <class name="org.usiis.struts.CommentForm" identity="patCommentId"
> key-generator="www_patient_comments_seq">
>         <!--<cache-type type="unlimited"/>-->
>         <map-to table="WWW_PATIENT_COMMENTS"/>
>         <field name="patCommentId" type="integer"><sql
> name="pat_comment_id" type="integer"/></field>
>         <field name="usiisId" type="string"><sql name="usiis_id"
> type="integer"/></field>
>         <field name="patientId" type="string"><sql name="patient_id"
> type="char"/></field>
>         <field name="providerId" type="string"><sql
name="provider_id"
> type="char"/></field>
>         <field name="date" type="date"><sql name="date_created"
> type="date"/></field>
>         <field name="comment" type="string"><sql name="pat_comment"
> type="char"/></field>
>         <field name="share" type="boolean"><sql name="share_flag"
> type="char[NY]"/></field>
> </class>
> 
>

Reply via email to