Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7871161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:49:32+00:00 2026-06-03T01:49:32+00:00

I managed to create a java application with eclipselink as shown here http://www.vogella.com/articles/JavaPersistenceAPI/article.html But

  • 0

I managed to create a java application with eclipselink as shown here

http://www.vogella.com/articles/JavaPersistenceAPI/article.html

But i can not do this with an plugin project. I added derby.jar, eclipselink.jar and java.persistence_2.0.3.jar to the build path. i also added javax.persistence and org.apache.derby.jdbc in the dependencies of the MANIFEST.MF in the dependecies tab as imported packages

and my persistence.xml is in META-INF folder with MANIFEST.MF

My persistence.xml looks like

<?xml version="1.0" encoding="UTF-8" ?>
<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_2_0.xsd"
version="2.0" xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="todos" transaction-type="RESOURCE_LOCAL">
<class>Tutorial.Todo</class>
<properties>
    <property name="javax.persistence.jdbc.driver"value="org.apache.derby.jdbc.EmbeddedDriver" />
    <property name="javax.persistence.jdbc.url" value="jdbc:derby:simpleDb;create=true" />
    <property name="javax.persistence.jdbc.user" value="test" />
   <property name="javax.persistence.jdbc.password" value="test" />


   <property name="eclipselink.ddl-generation" value="create-tables" />
   <property name="eclipselink.ddl-generation.output-mode" value="database" />
     </properties>

</persistence-unit>

and i call it like this:

private static final String PERSISTENCE_UNIT_NAME = "todos";
private static EntityManagerFactory factory;

public static void test {
    factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);
    EntityManager em = factory.createEntityManager();
    // Read the existing entries and write to console
    Query q = em.createQuery("select t from Todo t");
    List<Todo> todoList = q.getResultList();
    for (Todo todo : todoList) {
        System.out.println(todo);
    }
    System.out.println("Size: " + todoList.size());

    // Create new todo
    em.getTransaction().begin();
    Todo todo = new Todo();
    todo.setSummary("This is a test");
    todo.setDescription("This is a test");
    em.persist(todo);
    em.getTransaction().commit();

    em.close();
}

The error message i get is:

!ENTRY org.eclipse.osgi 4 0 2012-04-17 20:54:18.568
!MESSAGE Application error
!STACK 1
javax.persistence.PersistenceException: No Persistence provider for EntityManager named todos
at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
at rcptest.Application.start(Application.java:30)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
An error has occurred. See the log file
C:\dev\runtime-RcpTest.application\.metadata\.log.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:49:33+00:00Added an answer on June 3, 2026 at 1:49 am

    You must add a provider into your persistence.xml:

    ...
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    ...
    

    (org.eclipse.persistence.jpa.PersistenceProvider is the Persistence provider for EclipseLink.)

    Example

    <?xml version="1.0" encoding="UTF-8" ?>
    <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_2_0.xsd" version="2.0" xmlns="http://java.sun.com/xml/ns/persistence">
    
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    
        <persistence-unit name="todos" transaction-type="RESOURCE_LOCAL">
            <class>Tutorial.Todo</class>
    
            <properties>
                <!-- your properties -->
            </properties>
        </persistence-unit>
    
    </persistence>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a splash screen for my Java application. I managed to
Following this tutorial http://netbeans.org/kb/docs/javaee/maven-osgiservice-cdi.html I have managed to create a simple OSGI bundle and
I've come across an issue where a web application has managed to create a
I'm currently using a temp folder for my Java application to create a lock
I am trying to create a Java EE Web Application with JSF 2, Spring
I'm fairly new to Java and I'm trying to create a GUI application with
I want to create my Android virtual device from another java application. I don't
I'm trying to create a web user interface for a Java application. The user
i wanna create a java application that must perform some essential action (closing of
I managed to create an application in Blackberry that plays audio file, but it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.