Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

SequenceGenerator not working, TableGenerator is.

572079Apr 21 2008 — edited Apr 28 2008
I'm able to generate keys using a sequence-table. The annotations of the PK field are:

@Id
@GeneratedValue(generator="relation.relationnr", strategy=GenerationType.TABLE)
@TableGenerator( name="relation.relationnr", pkColumnValue="relationnr", table="sequence", pkColumnName="seq_name", valueColumnName="seq_count", initialValue=1, allocationSize=1)
@Column(name="relationnr")


But I'm not able to get the same behavior using sequences:

@Id
@SequenceGenerator( name="relation.relationnr", sequenceName="relationnr", allocationSize=1)
@GeneratedValue(generator="relation.relationnr", strategy=GenerationType.SEQUENCE)
@Column(name="relationnr")


With the second approach Toplink simply does not assing a value to the related field:

SQL errorcode: -391
SQL state: 23000
local message: Cannot insert a null into column (relation.relationnr).
java.sql.SQLException: Cannot insert a null into column (relation.relationnr).


The sequence exists:

select relationnr.nextval from _number where n = 1;

nextval

100246


Using another name for the sequence, or have the Toplink generate one, does not help.

Why isn't the sequence working?

Comments

Forms6i uses Oracle 8.0.6 client libraries. MetaLink Note 207303.1 lists supported client/server configurations, and the last database version supported with those libraries is Oracle 9.2. The only exception is made for e-Business Suite (Oracle Applications). Therefore, you configuration is not supported.

Anyway, Oracle 8.0.6 does not support AL32UTF8 well. You should select UTF8 as the database character set (not national character set!). You need to select a check box on DBCA interface (possibly unavailable in fast/default installation path) which allows you to see non-recommended character sets.


-- Sergiusz
Abk
Thanks Sergiusz.

Here i am able to connect forms 6i with 11g Database without any issue.
only problem is connect with AL32UTF8 DB.

Doc 207303.1 speaks about only network connectivity. can you support your statement +"Anyway, Oracle 8.0.6 does not support AL32UTF8 well"+ providing any document.

Thanks & Regards

Abk
MetaLink note 237593.1



-- Sergiusz
Abk
Thank you Sergiusz.

Your documents are very useful


--
Abk
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 26 2008
Added on Apr 21 2008
20 comments
5,174 views