Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Eclipselink in SE Environment not able to provide persistence

The way Persistence works is like this:

It goes looking for persistence providers based on a service advertisement in the jar located in META-INF/services. (in eclipselink.jar there is a file called META-INF/services/javax.persistence.spi.PersistenceProvider)

For each provider it finds, it attempts to create an EntityManagerFactory and returns the first one it is capable of finding.

Please set your the eclipselink.logging setting in your persistence.xml to FINEST and post the logging information you get when you call Persistence.createEntityManagerFactory()

Also, try listing your de.eclipselink.db.User as a class in your persistence.xml to see if it helps.

-Tom

JMarco wrote:
Hi Tom!
Sorry forgot to mention how I organized the files.
The project looks like this.

EclipseLinkTest
|-- bin
|   |-- META-INF
|   |   `-- persistence.xml
|   `-- de
|       `-- eclipselinktest
|           |-- RunTest.class
|           |-- db
|           |   `-- User.class
|           `-- eclipseLinkTest.class
|-- lib
|   |-- eclipselink.jar
|   |-- javax.persistence_1.0.0.jar
|   `-- jtds-1.2.2.jar
`-- src
    |-- META-INF
    |   `-- persistence.xml
    `-- de
        `-- eclipselinktest
            |-- RunTest.java
            |-- db
            |   `-- User.java
            `-- eclipseLinkTest.java

11 directories, 11 files

And "src" is of course on the buildpath in eclipse.


Back to the top