[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Eclipselink mapping question
|
Hello all,
I tried this, but this still doesn't solve the problem.
For example, when I'm trying to save another object (Characteristic). I
get the following error:
Below the error you can see my JPA mapping.
javax.persistence.PersistenceException: Exception [EclipseLink-4002]
(Eclipse Persistence Services - 1.0 (Build SNAPSHOT - 20080409)):
org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-00942: table or view does
not exist
Error Code: 942
Call: SELECT ID FROM BASEENTITY WHERE (((ID = ?) AND (DTYPE = ?)) AND
(DTYPE = ?))
bind => [0, Characteristic, Characteristic]
Query: DoesExistQuery()
at
org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:352)
at ********.test.ImportTest.testSaveImport(ImportTest.java:43)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services -
1.0 (Build SNAPSHOT - 20080409)):
org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-00942: table or view does
not exist
These are my JPA annotations:
@MappedSuperclass
public abstract class BaseEntity {
@Id
@GeneratedValue(generator="seqGen")
@SequenceGenerator(name="seqGen",sequenceName="PLI_SEQ",
allocationSize=1)
private long id;
public long getId() {
return id;
}
}
@Entity
@Table(schema="PLI", name = "PLI_CHARACTERISTICS")
public class Characteristic extends BaseEntity{
....
}
Gordon Yorke wrote:
Hello Leon,
Are you using the @Inheritance annotation? Set this annotation on
your CatalogProduct Entity. That will tell EclipseLink that this is
the root of your inheritance.
--Gordon