Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Duplicate schema for sequence table
Duplicate schema for sequence table [message #1406714] Sun, 10 August 2014 23:33 Go to next message
Don Nguyen is currently offline Don NguyenFriend
Messages: 1
Registered: August 2014
Junior Member
I have a simple entity called A with a primary key set to a sequence table.

[code]
@Entity
@Table
public class A implements Serializable {


	// Automatically generated primary key
	@Id
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "A")
	@TableGenerator(name = "A", table = "ASequenceTable", pkColumnName = "id", valueColumnName = "SEQUENCE_VALUE", pkColumnValue = "A")
	private Long id;


I also have an orm.xml file that provides the schema

<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings>
    <persistence-unit-metadata>
        <persistence-unit-defaults>
            <schema>CUSTOM_SCHEMA</schema>
        </persistence-unit-defaults>
    </persistence-unit-metadata>
</entity-mappings>


Everything seems to work fine in almost all the weblogic servers I have tried instead of Weblogic 12.1.2 which should be using EclipseLink 2.4.2.

It keeps complaining that my sequence table doesn't exist because it keeps appending my schema twice when I try to add entity A

Call: UPDATE CUSTOM_SCHEMA.CUSTOM_SCHEMA.ASequenceTable SET SEQUENCE_VALUE = SEQUENCE_VALUE + ? WHERE id = ?
bind => [2 parameters bound]
Query: DataModifyQuery(name="Server" sql="UPDATE CUSTOM_SCHEMA.CUSTOM_SCHEMA.ASequenceTable SET SEQUENCE_VALUE = SEQUENCE_VALUE + ? WHERE id = ?")
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)

If I take off the orm.xml, then it complains that tries to do "UPDATE ASequenceTable SET SEQUENCE_VALUE = SEQUENCE_VALUE + ? WHERE id = ?" without any schemas and that fails too.

Does anyone know why it appends in two schemas? This fails only with weblogic 12.1.2 and not any other versions of weblogic.
Re: Duplicate schema for sequence table [message #1434568 is a reply to message #1406714] Tue, 30 September 2014 09:09 Go to previous messageGo to next message
Matthias F is currently offline Matthias FFriend
Messages: 20
Registered: June 2011
Junior Member
We seem to have the same issue with EclipseLink 2.4.2 and a Oracle DB in a Java SE environment. We also tried to use 2.5.2 but the error remains.

Output in ddl-generation:
Quote:
CREATE TABLE NURO.NURO.jpaKeygenNuRo (tableName VARCHAR2(50) NOT NULL, lastUsedId NUMBER(38) NULL, PRIMARY KEY (tableName))

This also causes all the queries to be wrong.

Is there any solution to this problem?
Re: Duplicate schema for sequence table [message #1587560 is a reply to message #1434568] Tue, 27 January 2015 12:18 Go to previous messageGo to next message
vk new is currently offline vk newFriend
Messages: 2
Registered: January 2015
Location: UK
Junior Member
I am facing same issue "Duplicate schema name appended to the table generator". my dev environment is on tomcat7 and using eclipseLink2.5.2. I have used orm.xml to change the default schema. A quick response will be highly appreciated.
Re: Duplicate schema for sequence table [message #1597776 is a reply to message #1587560] Mon, 02 February 2015 14:50 Go to previous messageGo to next message
Rick Curtis is currently offline Rick CurtisFriend
Messages: 24
Registered: September 2014
Location: Rochester, MN
Junior Member
This has been fixed in 2.6.0.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=445466
Re: Duplicate schema for sequence table [message #1636943 is a reply to message #1597776] Thu, 26 February 2015 13:02 Go to previous messageGo to next message
Shaswat Dasgupta is currently offline Shaswat DasguptaFriend
Messages: 1
Registered: February 2015
Junior Member
We have migrated our application from Glassfish 3.1.2 to Glassfish 4.1.We are facing the same issue here.The schema name is duplicated for sequence table causing it to throw Database exception.The issue is with eclipselink version 2.5.2 .They are planning to fix this with version 2.6 but Glassfish 4.1 comes bundled with eclipselink 2.5.2.
We are unable to proceed untill this issue is fixed .We can't do simple persist and update operations.

Any suggestion on this is highly appreciable Smile
Re: Duplicate schema for sequence table [message #1637155 is a reply to message #1636943] Thu, 26 February 2015 15:18 Go to previous messageGo to next message
Rick Curtis is currently offline Rick CurtisFriend
Messages: 24
Registered: September 2014
Location: Rochester, MN
Junior Member
Shaswat Dasgupta wrote on Thu, 26 February 2015 13:02

We are unable to proceed untill this issue is fixed .We can't do simple persist and update operations.

Any suggestion on this is highly appreciable Smile


Perhaps check with Glassfish support to see about porting this fix back to 2.5.x and then pull in updated binaries?
Re: Duplicate schema for sequence table [message #1693453 is a reply to message #1636943] Fri, 24 April 2015 10:30 Go to previous messageGo to next message
vk new is currently offline vk newFriend
Messages: 2
Registered: January 2015
Location: UK
Junior Member
add TableSequence class (fixed version of 2.6) in your class path or take TableSequence.java file and add in your project. It worked for me with EclipseLink v2.5.2
Re: Duplicate schema for sequence table [message #1716816 is a reply to message #1693453] Tue, 08 December 2015 11:43 Go to previous messageGo to next message
Constantinos Symeonides is currently offline Constantinos SymeonidesFriend
Messages: 1
Registered: December 2015
Junior Member
Hi, I'm still experiencing this issue with EclipseLink v2.6.0 - is there anything else I need to do?

[ERROR ] Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20150309-bf26070): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=CUSTOM_SCHEMA.CUSTOM_SCHEMA.SEQ_GEN_SEQUENCE, DRIVER=4.20.4
Error Code: -204
Call: VALUES(NEXT VALUE FOR CUSTOM_SCHEMA.CUSTOM_SCHEMA.SEQ_GEN_SEQUENCE)
Query: ValueReadQuery(sql="VALUES(NEXT VALUE FOR CUSTOM_SCHEMA.CUSTOM_SCHEMA.SEQ_GEN_SEQUENCE)")
Re: Duplicate schema for sequence table [message #1748062 is a reply to message #1406714] Fri, 18 November 2016 09:43 Go to previous message
Dhaval Yoganandi is currently offline Dhaval YoganandiFriend
Messages: 1
Registered: November 2016
Junior Member
I am facing this issue with version 2.6.3. Anyone else is facing problem?
Previous Topic:XmlPath Issue with MOXy 2.6.0
Next Topic:FetchType.EAGER not always loaded eagerly
Goto Forum:
  


Current Time: Thu Apr 25 04:41:02 GMT 2024

Powered by FUDForum. Page generated in 0.03761 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top