When building a test app to experiment with JPA I've hit a dead end getting my classes to be enhanced by OpenJPA, using a MappedSuperclass annotation. Can anyone suggest an approach to force enhancement of my classes (available linked at the github below)?
The failure reported is... <openjpa-2.0.1-r422266:989424 fatal user error> org.apache.openjpa.util.MetaDataException: The type "class com.cefn.filesystem.impl.LocatableImpl" has not been enhanced. FailedObject: com.cefn.filesystem.impl.filei...@1bca1c3 [java.lang.String] The issue is no doubt in App, or FileImpl or LocatableImpl, or in the overall configuration of the environment. All these classes are (deliberately) fairly simple. The superficial aim of the application is to provide an identical exposure of a 'real' filesystem and a 'fake' filesystem which has been saved using JPA. If it worked, it would do the following; 1) The app creates a 'real' filesystem data structure 2) A traversal of this datastructure begins. Each encountered object in the filesystem is stored through an EntityManager. 3) A 'fake' filesystem data structure is created, backed by the data stored in step 2 4) This fake filesystem is then traversed, and the tree is printed out. DI configuration is through Guice. Since Guice is constructing all the objects involved, and explicitly loads the JPA EntityManager I expected it to work straight off, but no luck. Additionally I've tried runtime enhancement using -javaagent:lib/openjpa-all-2.0.1.jar which has no effect. The code and a list of jars is at the github linked below. Excuse the misleading repository name, it's because I'm experimenting to find the right kind of dependency injection framework for a real app. Main App class... https://github.com/cefn/Spring-JPA-MVC-Postgres/blob/449239a9b62b15a4b12cc46bdaa9c82d085a363c/src/com/cefn/filesystem/App.java Persistent class and superclass... https://github.com/cefn/Spring-JPA-MVC-Postgres/blob/449239a9b62b15a4b12cc46bdaa9c82d085a363c/src/com/cefn/filesystem/impl/FileImpl.java https://github.com/cefn/Spring-JPA-MVC-Postgres/blob/449239a9b62b15a4b12cc46bdaa9c82d085a363c/src/com/cefn/filesystem/impl/LocatableImpl.java List of jars... https://github.com/cefn/Spring-JPA-MVC-Postgres/tree/637cdfec020911ab327a0747209ca2eb0f95d33c/lib
