[ 
https://issues.apache.org/jira/browse/GERONIMO-5553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903400#action_12903400
 ] 

Donald Woods commented on GERONIMO-5553:
----------------------------------------

In geronimo-transformer, the TransformerWrapper class is commented out and no 
longer used, but geronimo-persistence-jpa20 and geronimo-aries-jpa contains its 
own implementation of TransformerWrapper, which only calls the transformer if 
the provided classloader is an instance of BundleReference?  Is that the right 
behavior for geronimo-persistence-jpa20 for a WAR case, where it is not a 
Bundle? Seems okay for the Aries case...

    public byte[] transform(ClassLoader loader, String className, Class<?> 
classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) 
throws IllegalClassFormatException {
        if (loader instanceof BundleReference && ((BundleReference) 
loader).getBundle() == bundle) {
            try {
                return classTransformer.transform(loader, className, 
classBeingRedefined, protectionDomain, classfileBuffer);
            } catch (IllegalClassFormatException e) {
                throw e;
            } catch (RuntimeException e) {
                return null;
            }
        }
        return null;
}


> Fail to enchance entities on Geronimo
> -------------------------------------
>
>                 Key: GERONIMO-5553
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5553
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: persistence
>    Affects Versions: 3.0
>         Environment: OS:win xp
> Geronimo :3.0 20100824 build
>            Reporter: Lu Jiang
>            Assignee: Rick McGuire
>             Fix For: 3.0
>
>         Attachments: booknew.war
>
>
> I tried to deploy a simple jpa sample on geronimo.But when persist data into 
> database.
> Following exception will occur.
> <openjpa-2.0.0-r422266:935683 nonfatal user error> 
> org.apache.openjpa.persistence.ArgumentException: Attempt to cast instance 
> "org.apache.sample.entities.b...@97781f" to PersistenceCapable failed.  
> Ensure that it has been enhanced.
> FailedObject: org.apache.sample.entities.b...@97781f

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to