You can clone with
HTTPS or Subversion.
I tried to use Kundera 2.2 under Glassfish 3.1 with MongoDB 2.2. I placed the Kundera jars (along with their dependencies) under the /glassfish/domains/domain1/lib directory, because I did not want to package them inside the application WAR file. Now the problem I have detected is that altough method findResourcesByContextLoader in class ClasspathReader used (correctly) the current thread's class loader to find entitiy classes, method scanClassAndPutMetadata in class MetamodelConfiguration used its own classloader, and therefore it did not find the entity classes in the web application. However, if you change the line
Class<?> clazz = Class.forName(className);
Class<?> clazz = Thread.currentThread().getContextClassLoader().loadClass(className);
it works correctly.
It is fixed as you suggested
please verify .
Thanks for the fix. I am not very proficient in maven, so it is possible that I have misconfigured something, but with the current 2.3-SNAPSHOT I still get the same error. I suspect that the class loader associated with the PersistenceUnitMetadata class (variable puMetadata) is still the same class loader which loaded the JARs from the Glassfish domain/domain1/lib directory and therefore does not "see" the entity classes present in the web app.
Planning to fix and test it on glassfish as an external kundera jar. Will be fixed in 2.3
I tried but couldn't replicate your issue. I am attaching image screenshots of /glassfish/domains/domain1/lib and /glassfish/domains/domain1/applications/twitample/WEB-INF/lib folders. (twitample is name of my web application).
This worked for me, Please compare this with your configuration and resolve disrepency (if any)
I will be happy to send you my entire code (which is also available at https://github.com/xamry/twitample)
The screenshots represent the situation I was dealing with, so if your test project worked for you, the problem was indeed fixed. Unfortunately I could not test the fix with my own project because I did not manage to build Kundera from source. However, if you happen to have a fairly recent version in a publicly accessible maven repo, I will gladly test it myself.
I guess, mvn clean install -DskipTests should work for you to build Kundera.
2.3 release(releasing soon) will be available on public maven repo.
Any update on this? Shall i mark it close for 2.3(releasing today) ?
I can confirm that in version 2.3 the problem has been fixed, the issue can be closed.