[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[News.eclipse.technology.eclipselink] Using Microsoft Acces
|
Hello!
I'm trying to get EclipseLink running with Microsoft Access 2003, but I
fail.
I've got a persistence unit only containing a simple entity for testing
purposes. But whenever I invoke createEntityManager() EclipseLink fails
with the exception below. The exception is quite informative but I'm
lacking the knowledge to solve it. Any ideas or hints what might be wrong?
(Tested the persitence unit with MySQL and worked immediately...)
// ********** error message **********
javax.persistence.PersistenceException: Exception [EclipseLink-7144]
(Eclipse Persistence Services - 1.0 (Build SNAPSHOT - 20080508)):
org.eclipse.persistence.exceptions.ValidationException
Exception Description: SEQ_GEN_IDENTITY: platform AccessPlatform doesn't
support NativeSequence.
at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:258)
at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:69)
at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:118)
at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:112)
at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:100)
...
// ********** setup code **********
props.put(PersistenceUnitProperties.JDBC_DRIVER,"sun.jdbc.odbc.JdbcOdbcDriver");
props.put(PersistenceUnitProperties.JDBC_URL,"jdbc:odbc:moo_dsn");
props.put(PersistenceUnitProperties.TARGET_DATABASE,"org.eclipse.persistence.platform.database.AccessPlatform");
EntityManagerFactory emf =
Persistence.createEntityManagerFactory("moo_unit", props);
em = emf.createEntityManager();
// ********** entity **********
@Entity
@Table(name = "moo_table")
public class Moo {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
private String name;
public Moo() {
}
// getters and setters omitted
}
-Greets, Stefan Teitge