NoClassDefFoundError while OpenJPA subclasses persistent classes

2008-06-05 Thread Rüdiger Herrmann
Hi, this post is related to a previous pos on the mailing list: "JPA: adding entities to EntityManagerFactory programmatically" I experience a NoClassDefFoundError while OpenJPA creates subclasses for persistent classes that live in a different class loader than OpenJPA itself. In short, I a

Re: JPA: adding entities to EntityManagerFactory programmatically

2008-05-30 Thread Rüdiger Herrmann
Hi, removing IProject isn't really an option as it is the only entity class so far. The other yet to come entity classes will be designed with the same pattern (see previous post). However, after doing so it works. Yes, all three points are true for my environment. Cheers, Rüdiger Pinaki P

Re: JPA: adding entities to EntityManagerFactory programmatically

2008-05-29 Thread Rüdiger Herrmann
Hi, again, your documentation is good, and your support as well. It's just me too dumb to read it. Sorry for bothering you, this I could've found out myself. But now for something completely different (hopefully not again a not-read-documentation-issue;) I get the stack trace below when co

Re: JPA: adding entities to EntityManagerFactory programmatically

2008-05-29 Thread Rüdiger Herrmann
HURRAY, the example is working! But making the same changes to my PDE TestCases fails. I am pretty sure this is because of different class loaders. Is it possible to also specify a distinct class loader for each entity class? Background: I am running in an OSGi environment in which the code

Re: JPA: adding entities to EntityManagerFactory programmatically

2008-05-28 Thread Rüdiger Herrmann
If it is more convenient, I can also send the example projects, which consists of two classes, hsqldb.jar and the openJPA jars (which I can leave aside) Here goes the stack trace: Exception in thread "main" error> org.apache.openjpa.persistence.ArgumentException: The type "class org.example.o

Re: JPA: adding entities to EntityManagerFactory programmatically

2008-05-28 Thread Rüdiger Herrmann
P) example is all I want to see running for now. Dealing with the class-loading issues will probably be the next step;) Cheers, Rüdiger Marco Schwarz wrote: I work on a RCP using openJPA and Derby. It works fine. Kann I see your RCP (and Plugin) Source? Bye Marco - Original Message - Da

Re: JPA: adding entities to EntityManagerFactory programmatically

2008-05-28 Thread Rüdiger Herrmann
t :) [1] http://openjpa.apache.org/docs/latest/manual/manual.html#ref_guide_pc_enhance [2] http://openjpa.apache.org/docs/latest/manual/manual.html#ref_guide_pc_enhance_unenhanced_types Rüdiger Herrmann wrote: Hi, using OpenJPA in a JavaSE (Eclipse RCP) environment, I would like to re

JPA: adding entities to EntityManagerFactory programmatically

2008-05-27 Thread Rüdiger Herrmann
Hi, using OpenJPA in a JavaSE (Eclipse RCP) environment, I would like to register JPA-annotated classes that will participate in the persistence mechanism at runtime. Background: Presistence-aware classes are contributed via Eclipse Extension Points. All these classes have JPA annotations.