Service Virtualization

Tech Tips: java.lang.RuntimeException: java.lang.RuntimeException: The database has not been initialized correctly. There is at least one missing table. 

04-25-2019 05:56 PM

Issue:

Connecting Registry for the first time to an Oracle 12c instance.

 

Getting this error in the Registry log:

 

When using Oracle, you must ensure the user has CONNECT and RESOURCE roles in order to create tables. Contact your DBA for more details.
The database has not been initialized correctly. There is at least one missing table.
java.lang.RuntimeException: java.lang.RuntimeException: The database has not been initialized correctly. There is at least one missing table.
at com.itko.lisa.utils.JpaUtil.<init>(JpaUtil.java:507)
.
,
2019-04-24 19:20:24,503Z (19:20) [main] DEBUG com.mchange.v2.resourcepool.BasicResourcePool - acquire test -- pool size: 1; target_pool_size: 1; desired target? 2
2019-04-24 19:20:24,504Z (19:20) [main] DEBUG com.mchange.v2.resourcepool.BasicResourcePool - awaitAvailable(): com.mchange.v2.c3p0.impl.NewPooledConnection@3ed42849
2019-04-24 19:20:24,918Z (19:20) [main] ERROR com.itko.lisa.utils.JpaUtil - ==== #################################### ====
2019-04-24 19:20:24,919Z (19:20) [main] ERROR com.itko.lisa.utils.JpaUtil - Database does not contain a table DRADISCACHE
2019-04-24 19:20:24,919Z (19:20) [main] ERROR com.itko.lisa.utils.JpaUtil - ==== #################################### ====
2019-04-24 19:20:24,919Z (19:20) [main] ERROR System.err - Database does not contain a table DRADISCACHE
2019-04-24 19:20:24,919Z (19:20) [main] ERROR com.itko.lisa.utils.JpaUtil - ==== #################################### ====

 

Diagnostics:

The Enterprise Dashboard had connected to Oracle, so this was not a permissions issue.

 

Then  decided to run the the oracle.ddl manually from Oracle SQL Developer to found out why the DRADISCACHE table is not being created:

 

Error starting at line : 2 in command -
CREATE TABLE DRADISCACHE (ID NUMBER(10) NOT NULL, DATA CLOB NULL, PRIMARY KEY (ID))
Error report -
ORA-60019: Creating initial extent of size 14 in tablespace of extent size 8
60019. 00000 - "Creating initial extent of size %s in tablespace of extent size %s"
*Document: YES
*Cause: Creation of SECUREFILE segment failed due to small tablespace
extent size.
*Action: Create tablespace with larger extent size and reissue command.

 

The tablespace was set at 30G and after the DDL manually the tablespace is at 29G.  

 

Resolution:

https://peoplesofttutorial.com/ora-60019-creating-initial-extent-of-size-14-in-tablespace-of-extent-size-13/

 

How to Resolve: ORA-60019: Creating initial extent of size 14 in tablespace of extent size 13

 

The issue occurs because space in Oracle is allocated in chunks called ‘extents’. Your existing tables have already been allocated extents containing enough space but you don’t have enough unallocated free space in the tablespace to add a whole new extent, which is needed for a new table or alter of the table.

 

Interestingly, the same SQL would work if you try it on a 11g database but not on 12c database. The difference between versions, which causes this error is that in Oracle 11g the default value for DB_SECUREFILE is PERMITTED while in Oracle 12c it is PREFERRED.

 

All LOB’s are treated as secured files as default from 12c onwards and hence it differs in security structure than the earlier releases before 12c. One option to make it work is that you can use a session level parameter as below to alter it as LOB. Use any of the below mentioned SQLs before running the SQL in error:

 

alter session set db_securefile=ignore;

If you’d like to provide a permanent fix, you can get your systems DBA involved and have them make the below change:

alter system set db_securefile=NEVER scope=both;
or
alter system set db_securefile=PERMITTED scope=both;
or
db_securefile='PERMITTED'

 

After the DBA made these changes, dropped the Oracle schema and created it again, then let DevTest add all of the tables.  Issue resolved.

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

04-26-2019 01:56 AM

Super Marcy !!!

Related Entries and Links

No Related Resource entered.