Thanks for posting the solution. I was getting the same org.datanucleus.exceptions.ClassNotResolvedException error. You're correct in stating the problem, classes in the "test" source are compiled in the war/WEB-INF/classes directory. In Eclipse, you need to set an output directory separate from the classes directly. The plugin should handle this, but it doesn't. I didn't play around with whether the DataNucleus plugin excepts packages to be on the "src" path, or whether it's configurable, but you certainly don't want test classes to be deployed in the WEB-INF directory.
Good catch! On Jan 12, 11:01 am, Marcel Overdijk <[email protected]> wrote: > Hmmmm, > My bad I configured the wrong output folder for test classes in > Eclipse. They were written to /WEB-INF/classes. > After writing them to a custom /target/test-classes folder I could > start the app successfully. > > So it seems to work. In my test code I can see entitymanager was not > injected yet, but I think that's another mis configuration on my side. > > On 12 jan, 16:45, Marcel Overdijk <[email protected]> wrote: > > > > > I'have a serioud problem to het DataNuclues and JPA EntityManager to > > work in combination with Spring 3. > > I have this exception: Error creating bean with name > > 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/ > > spring.xml]: Invocation of init method failed; nested exception is > > javax.persistence.PersistenceException: Provider error. Provider: > > org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider: > > > When digging deeper I also noticed this one: > > org.datanucleus.exceptions.ClassNotResolvedException: Class > > "com.footdex.test.appengine.api.urlfetch.HTTPRequestMatcher" was not > > found in the CLASSPATH. Please check your specification and your > > CLASSPATH. > > > And this is true as I'm compiling test classes to another target > > directory and not in WEB-INF/classes. > > When I remove the test classes from the Eclipse build path everything > > works fine. > > > If I don't use the EMF but the low-level datastore API it doesn't > > matter that test classes are not in WEB-INF/classes, so it seems > > DataNuclues or the GAE javax.persistence.Persistence implementation is > > doing something special here... > > > I checked my project setting and I'm only enhancing ORM classes in src/ > > main (here are my app sources). Sources in src/test (here are my test > > sources) are not configured to be enhances. > > > I'm wondering what is wrong, and more importantly how I can fix this. > > > Cheers, > > Marcel -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
