Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » EclipseLink-8034 error
EclipseLink-8034 error [message #647352] Wed, 05 January 2011 18:28 Go to next message
Leonardo Kenji Shikida is currently offline Leonardo Kenji ShikidaFriend
Messages: 37
Registered: July 2009
Member
Hi

I am trying to make an app work using eclipselink + tomcat 6 from inside eclipse.

Everything was going fine until I´ve added a 2nd data source, I mean, half of my entities are mapped in one DB and the other half, into another DB.

My eclipselink is quite old, it´s a legacy code, check the manifest

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: 2.3 (IBM Corporation)
Implementation-Title: Eclipse Persistence Services
Implementation-Version: 1.0.1-20080905
Specification-Version: 1.0.1
Implementation-Vendor: Oracle
Release-Designation: EclipseLink
Premain-Class: org.eclipse.persistence.internal.jpa.deployment.JavaSEC
MPInitializerAgent

My persistence.xml is at src->META-INF and it looks like this

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="default" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider >
<class>xxx.MyClassThatWorks</class>
(...)
<properties>
<property name="eclipselink.logging.level" value="ALL" />
<property name="eclipselink.jdbc.driver" value="com.ibm.db2.jcc.DB2Driver" />
<property name="eclipselink.jdbc.url" value="xxx" />
<property name="eclipselink.jdbc.user" value="xxx" />
<property name="eclipselink.jdbc.password" value="xxx" />
</properties>
</persistence-unit>

<persistence-unit name="mySecondOne" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider >
<class>yyy.MyClassThatDoesNotWork</class>
(...)
<properties>
<property name="eclipselink.logging.level" value="ALL" />
<property name="eclipselink.jdbc.driver" value="com.ibm.db2.jcc.DB2Driver" />
<property name="eclipselink.jdbc.url" value="yyy" />
<property name="eclipselink.jdbc.user" value="yyy" />
<property name="eclipselink.jdbc.password" value="yyy" />
</properties>
</persistence-unit>
</persistence>

the exception is

Caused by: Exception [EclipseLink-8034] (Eclipse Persistence Services - 1.0.1 (Build 20080905)): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Error compiling the query [select x from MyClassThatDoesNotWork x]. Unknown abstract schema type [MyClassThatDoesNotWork].

My class is mapped in the persistence.xml and its header looks like

@Entity
@Table(name="MY_TABLE_HERE",schema="DB2ADMIN")
public class MyClassThatDoesNotWork implements Serializable {
private static final long serialVersionUID = 1L;

@Id
@Column(name="CO_SEQ_XXX")
private int coSeqXxx;
(...)

I am pretty sure I am doing something wrong, but I can´t find any helpful info just googling around.

One strange thing I´ve noticed is that if I just fill the database connection information with wrong values, the error is the same, so it seems it´s trying to map something right before connecting to the database, so it seems to be a configuration problem.

Any help is extremely welcome.

Thanks in advance

Leo K.
Re: EclipseLink-8034 error [message #647509 is a reply to message #647352] Thu, 06 January 2011 17:34 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
Hello Leo,

Seems like the "select x from MyClassThatDoesNotWork x" query is being processed in the persistence unit that doesn't have the MyClassThatDoesNotWork entity. Does this occur if you only have the default persistence unit defined (but the same jar setup)? Where is the "select x from MyClassThatDoesNotWork x" query defined, and does the MyClassThatWorks or default persistence unit have any references to the MyClassThatDoesNotWork class that might cause it to get loaded and processed by the annotation processor?

I could not find any bugs specifically related to this issue, but as you mentioned, EclipseLink 1.0.1 is far back. Can you try the latest releases (such as a 2.2 nightly), even if only to confirm that this is a new issue or to see if any of the many classloading fixes might have resolved the issue?

Best Regards,
Chris
Previous Topic:JPQL statement: wrong generated SQL code?
Next Topic:Problem using a Converter to convert to list
Goto Forum:
  


Current Time: Sat Apr 20 00:12:52 GMT 2024

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

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

Back to the top