Oh, and can you post the full stack trace?

-Patrick

On 9/6/07, Patrick Linskey <[EMAIL PROTECTED]> wrote:
> Hi,
>
> A bunch of questions:
>
> What happens if you check to see if one of your persistent classes is
> instanceof org.apache.openjpa.enhance.PersistenceCapable?
>
> Are you running the OpenJPA enhancer, or relying on the new unenhanced 
> support?
>
> If the instanceof check passes, what happens if you manually iterate
> the results of MyEntity.class.getInterfaces() and print out the names?
> If PersistenceCapable is in there, then it's probably a classloader
> problem. What does your runtime environment look like?
>
> -Patrick
>
> On 9/6/07, Johan Andrén <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > I have a strange problem with OpenJPA and I have had no success
> > finding a solution on the net (yet).
> >
> > We have a multi module maven2 project, the subprojects interesting in
> > this case beeing a data model with annotated classes - "model" and
> > ejb3 beans accessing the data - "ejb".
> >
> > I have managed to set up unit tests in the ejb project by making
> > maven copy the model-jar into the target/test-classes and referencing
> > it from src/test/resources/META-INF/persistence.xml. This works well.
> >
> > Since we want to catch the mapping errors etc. with the unit tests in
> > the model I have been working on setting up OpenJPA for the unit
> > tests in that project as well. When the unit tests are run they fail
> > with the following exception from OpenJPA:
> >
> > <openjpa-1.0.0-r420667:568756 fatal user error>
> > org.apache.openjpa.persistence.ArgumentException: The type "class
> > se.databyran.prosang.questionnaire.Questionnaire" has not been enhanced.
> >
> > I have seen another question about this and tried to set the
> > "openjpa.RuntimeUnenhancedClasses" property to "warn" but this does
> > not seem to affect the problem in any way.
> >
> > The only difference I can se between the successful setup and the
> > failing one is that the entity classes are packed in a jar in the ejb
> > project and only as directories in the classpath in the failing one.
> >
> > Is this a known problem?
> >
> > Versions:
> > Java 1.5
> > Maven 2.0.7
> > OpenJPA 1.0.0
> >
> > --
> >
> > Best regards
> >
> > Johan Andrén        [EMAIL PROTECTED]
> > Databyrån AB        http://www.databyran.se/
> > Tel:  +46(0) 8 50 65 64 00
> > Fax: +46(0) 8 50 65 64 30
> >
> > Databyrån AB är certifierat enligt ISO 9001:2000
> >
> >
> >
> >
> >
> >
>
>
> --
> Patrick Linskey
> 202 669 5907
>


-- 
Patrick Linskey
202 669 5907

Reply via email to