Hi,
I am developing an RCP application that contains multiple plugins. One plugin is JPA capable in order to manage CRUD operations. If I test the code in this plugin with a class with a main in it it works fine. The entities get loaded with the data from the database using the DAOs and the EntityManagerHelper generated by MyEclipse 9.1.
When I run the application as a plugin the following exception is thrown:
java.lang.ClassNotFoundException: javax.persistence.Persistence
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at edu.unmc.cns.condb.model.EntityManagerHelper.<clinit>(EntityManagerHelper.java:20)
at edu.unmc.cns.condb.model.jpa.db.dao.AccountCategoryDAO.findAll(AccountCategoryDAO.java:228)
…
Work with the test class in the JPA plugin running as a Java Application but not when ran as an Eclipse application.
What I am doing wrong?
Thanks,
eric