I'm generating persistent classes at runtime which are transformed by the PCClassFileTransformer.transform(ClassLoader, String, Class, ProtectionDomain, byte[]) method. Unfortunately, the result of the BCClass.getType() passed as the first argument to the method MetaDataRepository.getMetaData(Class, ClassLoader, boolean) in PCEnhancer(OpenJPAConfiguration, BCClass, MetaDataRepository, ClassLoader) throws a ClassNotFoundException -- the transformer is attempting to load a class that is not defined, therefore not loadable, until transformation is complete. Is there some fundamental reason why the enhancer needs a reference to a defined class rather than just the bytecode?
It seems like it might be possible to cache enhanced bytecode by class name until after transformation and all classes are defined. Corey
