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: 16
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: 1
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: 20
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 message
Rick Curtis is currently offline Rick CurtisFriend
Messages: 20
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?
Previous Topic:EclipseLink bugs: where/how to report?
Next Topic:oneToMany with composite key using eclipselink
Goto Forum:
  


Current Time: Sat Mar 28 12:26:51 GMT 2015

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

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