openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: [Resolved] enhancement roadblock - but with a bug
Date Mon, 09 Feb 2009 14:08:41 GMT
Hi Adam,

The issue caused you more than enough pain - please go ahead and open a JIRA
issue. I can't promise that we'll have it fixed immediately but we should do
a better job here.

-mike

On Mon, Feb 9, 2009 at 7:19 AM, Adam Hardy <adam.sql@cyberspaceroad.com>wrote:

> After a frustrating time building a test project to isolate what I thought
> was a new issue, I discovered that there was nothing wrong with my project,
> I had just  forgotten to add one entity class to the PCEnhancer command
> during my build-time enhancement routine.
>
> So the class was unenhanced.
>
> With RuntimeUnenhancedClasses set to unsupported, instead of receiving a
> "cannot run with unenhanced classes" error, OpenJPA threw the exceptions
> below.
>
> I think this definitely qualifies as a bug - OpenJPA is throwing the wrong
> exception. It definitely misled me for a while.
>
> Shall I open a JIRA for it?
>
>
> Regards
> Adam
>
>
> Adam Hardy on 08/02/09 23:46, wrote:
>
>> Following on from my initial response, I copied the superclass into the
>> same project so that the enhancer can process the class file properly.
>>
>> It looks like I'm taking the scenic route around all the OpenJPA issues
>> right now.
>>
>> I hit this problem with enhanced files that doesn't happen with the
>> unenhanced.
>>
>> I carefully set the property openjpa.RuntimeUnenhancedClasses=unsupported
>> so I can be certain I am running with the enhanced classes.
>>
>> So with build-time enhancement, I get stacktraces of exceptions as
>> follows, although it's not clear which is the original cause:
>>
>> Caused by: java.lang.IllegalStateException: No registered metadata for
>> type "class org.permacode.patternrepo.domain.entity.CollatedRun".
>>        at
>> org.apache.openjpa.enhance.PCRegistry.getMeta(PCRegistry.java:255)
>>
>> NestedThrowables:
>> <openjpa-1.2.0-r422266:683325 fatal user error>
>> org.apache.openjpa.persistence.ArgumentException: Unable to resolve type
>> "org.permacode.patternrepo.domain.entity.TestAnalysis" due to previous
>> errors resolving related type
>> "org.permacode.patternrepo.domain.entity.CollatedRun".
>>        at
>> org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:731)
>>
>>
>> <openjpa-1.2.0-r422266:683325 fatal user error>
>> org.apache.openjpa.persistence.ArgumentException: Unable to resolve type
>> "org.permacode.patternrepo.domain.entity.Weighting" due to previous errors
>> resolving related type
>> "org.permacode.patternrepo.domain.entity.CollatedRun".
>>        at
>> org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:731)
>>
>>
>> <openjpa-1.2.0-r422266:683325 fatal user error>
>> org.apache.openjpa.persistence.ArgumentException: Attempt to map
>> "org.permacode.patternrepo.domain.entity.CollatedRun.portfolio" failed: the
>> owning entity is not mapped.
>>        at
>> org.apache.openjpa.jdbc.meta.MappingInfo.assertTable(MappingInfo.java:547)
>>
>> java.lang.IllegalStateException: No registered metadata for type "class
>> org.permacode.patternrepo.domain.entity.CollatedRun".        at
>> org.apache.openjpa.enhance.PCRegistry.getMeta(PCRegistry.java:255)
>>
>>
>> I figure that the "no registered metadata for type ..." must be the
>> original since it appears first and last. It runs fine unenhanced, so what
>> can it be? Do enhanced entities only work with annotations? These entities
>> are all mapped via xml.
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message