-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: i can't use the sequence of oracle
PostPosted: Thu Apr 22, 2004 1:03 am 
Regular
Regular

Joined: Tue Dec 30, 2003 2:35 am
Posts: 85
Code:
SQL> desc rkxx_xh;
Name Type       Nullable Default Comments
---- ---------- -------- ------- --------
RKXH NUMBER(10)                           
JMZH CHAR(18)   Y




Code:
            <id length="10" name="v_RKXH" type="java.lang.Integer" unsaved-value="any">
                 <column length="10" name="RKXH" not-null="true" sql-type="NUMBER(10)"/>
                 <generator class="sequence">
                        <param name="sequence">RKXX_XH_RKXH_SEQ</param>
                 </generator>
            </id>


when i run the hibernate ,it tell me the error:
net.sf.hibernate.MappingException: could not instantiate id generator

but the sequence of oracle run ok!
SQL> select rkxx_xh_rkxh_seq.nextval from dual;

NEXTVAL
----------
67077434

thanks a lot!


Top
 Profile  
 
 Post subject: ......
PostPosted: Thu Apr 22, 2004 3:37 am 
Regular
Regular

Joined: Tue Dec 30, 2003 2:35 am
Posts: 85
but i this is right:

<id length="10" name="v_RKXH" type="java.lang.Integer" unsaved-value="0">
<column length="10" name="RKXH" not-null="true" sql-type="NUMBER(10)"/>
<generator class="assigned"/>
<!--
<generator class="sequence">
<param name="sequence">RKXX_XH_RKXH_SEQ</param>
</generator>
-->
</id>

i use the assigned,is right,but in my operation ,it must use the sequence...

help,help!!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 22, 2004 3:59 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Show more of the log/exception stack trace.


Top
 Profile  
 
 Post subject: o my god
PostPosted: Thu Apr 22, 2004 5:24 am 
Regular
Regular

Joined: Tue Dec 30, 2003 2:35 am
Posts: 85
after i restart my eclipse,the code runs ok!

o my god


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.