0 Replies Latest reply on Dec 12, 2010 8:49 AM by Aaron Siri

    CNFE for org.hibernate.EmptyInterceptor when using Glassfish

    Aaron Siri Newbie

      I'm attempting to use the Seam 3 Security module in a stock Glassfish environment.  After doing some very basic integration I'm not getting the following exception:




      SEVERE: org/hibernate/EmptyInterceptor
      java.lang.NoClassDefFoundError: org/hibernate/EmptyInterceptor
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
              at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:920)
              at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1430)
              at org.glassfish.weld.BeanDeploymentArchiveImpl.collectJarInfo(BeanDeploymentArchiveImpl.java:240)
              at org.glassfish.weld.BeanDeploymentArchiveImpl.populate(BeanDeploymentArchiveImpl.java:217)
              at org.glassfish.weld.BeanDeploymentArchiveImpl.<init>(BeanDeploymentArchiveImpl.java:102)
              at org.glassfish.weld.DeploymentImpl.<init>(DeploymentImpl.java:118)
              at org.glassfish.weld.WeldDeployer.load(WeldDeployer.java:315)
              at org.glassfish.weld.WeldDeployer.load(WeldDeployer.java:99)
              at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
              at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
              at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
              at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
              at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
              at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
              at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
              at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
              at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
              at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
              at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
              at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
              at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
              at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
              at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
              at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
              at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
              at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
              at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
              at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
              at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
              at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
              at java.lang.Thread.run(Thread.java:680)
      Caused by: java.lang.ClassNotFoundException: org.hibernate.EmptyInterceptor
              at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
              at org.glassfish.web.loader.WebappClassLoader.findClass(WebappClassLoader.java:959)
              at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1430)
              ... 42 more





      Glassfish doesn't bundle Hibernate (EclipseLink is bundled instead).  While I could switch to Hibernate (making configuration a bit more complicated) or switch over to JBoss AS (no real big deal but I'm now more familiar with Glassfish and a switch would just slow me down) it would be nice if Security worked out-of-the-box in a standard CDI/J2EE environment.  Isn't JPA all that should be needed?  I'm using Maven to pull the module and I didn't see any hibernate dependencies come down.


      Thanks for any help,


      -Aaron