users@glassfish.java.net

Re: java.lang.ClassNotFoundException: org.hibernate.ejb.HibernatePersistenc

From: <glassfish_at_javadesktop.org>
Date: Thu, 22 Jul 2010 14:58:15 PDT

The problem seems to be that GlassFish expects all dependent jars (except for direct modules of the enterprise application) in the lib directory of the ear file. You can enforce this by setting <defaultLibBundleDir>lib</defaultLibBundleDir> in the plugin configuration of the maven ear plugin in the ear pom.xml:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-ear-plugin</artifactId>
        <version>2.4.2</version>
        <configuration>
            <version>6</version>
            [b]<defaultLibBundleDir>lib</defaultLibBundleDir>[/b]
        </configuration>
      </plugin>

HTH!
[Message sent by forum member 'ascheman']

http://forums.java.net/jive/thread.jspa?messageID=478320