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

Last updated on FEBRUARY 22, 2017

Applies to:

Oracle Weblogic Server - Version: 10.3.1 and later   [Release: 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

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms