The deployed Maven POM for Hibernate Entity Manager 3.3.1.ga incorrectly excludes the dependency upon the oswego-concurrent libraries (see below). This leads to a NoClassDefFound error:
nested exception is java.lang.NoClassDefFoundError: EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap
Caused by:
java.lang.NoClassDefFoundError: EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap
at org.jboss.util.file.ArchiveBrowser.<clinit>(ArchiveBrowser.java:52)
I haven't yet determined how the Maven POMs are being managed by the Hibernate team, but they don't seem to be in Subversion; therefore, I've marked this trivial, although it is a little more than that for someone who is trying to use the Maven repository.
In any case, it should be easy to fix. More generally, it might be more correct to employ Maven's ranged version dependency syntax, instead of explicitly excluding other dependencies.
excerpt from
http://repo1.maven.org/maven2/org/hibernate/hibernate-entitymanager/3.3.1.ga/hibernate-entitymanager-3.3.1.ga.pom
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-common-core</artifactId>
<version>2.0.4.GA</version>
<exclusions>
...
<exclusion>
<groupId>oswego-concurrent</groupId>
<artifactId>concurrent</artifactId>
</exclusion>
...
</exclusions>
</dependency>
unfortunatelly we can't change the POM once it is deployed - this is the ibiblio policy. Fixing the pom is not problem, reploying is.
The reason the oswego-concurrent was excluded is because the jar was not listed in the HEM dependencies. I'm a bit puzzled that it did not come up earlier. Could you pleas post a minimal test case/project which would demonstrate this?
I mean, I wonder what I'm doing wrong that I'm not getting the exception.
I will discuss releaseing a 3.3.1.M1.GA version of the POM with the HEM team. Otherwise changes will apply to the next version.
I'd be also grateful if you post your ideas on the ranged versions. I don't get the point there. Thank you.