My Oracle Support Banner

WLS 10.3.x - Auto Generation Of Primary Keys Does Not Work With Generator-Type=Oracle (Doc ID 1166313.1)

Last updated on OCTOBER 13, 2020

Applies to:

Oracle WebLogic Server - Version 10.3.1 and later
Information in this document applies to any platform.

Symptoms

When running com.bea.wls.ejbgen.EJBGen in 10.3 converts EmployeeBean.java containing following annotation:

* @ejbgen:automatic-key-generation
* name = SEQ_EMPLOYEE
* cache-size = 1
* type = ORACLE


generates weblogic-cmp-rdbms-jar.xml containing following content:

<automatic-key-generation>
<generator-type>Sequence</generator-type>
<generator-name>SEQ_EMPLOYEE</generator-name>
<key-cache-size>1</key-cache-size>
</automatic-key-generation>


With the above content when running weblogic.appc gives following error:

[java] [EJB:011017]Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:
[java]
[java] There are 1 nested errors:
[java] weblogic.j2ee.validation.ComplianceException: Not all databases support the automatic primary key generator type 'Sequence'. The RDBMS CMP bean, 'EmployeeBean', specifies the generator type 'Sequence', but this generator type is not supported with the database type UNKNOWN.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.