3 Replies Latest reply on Jun 23, 2010 8:17 AM by Cay Horstmann

    Absent Code attribute in method

    Cay Horstmann Newbie
      I am trying to put together a lab for a summer class where I foolishly
      agreed to use NetBeans 6.9, Glassfish 3.0.1 and CDI. I am getting the
      following error:
      java.lang.ClassFormatError: Absent Code attribute in method that is
      not native or abstract in class file com/horstmann/qq/beans/<error>
             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.populate(BeanDeploymentArchiveImpl.java:192)
             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)
             ...

      No, I have no idea what makes Weld unhappy. I did a bit of
      refactoring, and now I am hosed.

      This is with hot deployment inside NetBeans. When I deploy the WAR
      manually, the problem doesn't arise. Unfortunately, that's not an
      option for my lab.

      Did anyone run into this?

      Thanks,

      Cay