Thursday, August 14, 2014

ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/servlet/HttpConstraintElement

Hi,

To my environment

  - Eclipse version 4.3.0
  - Google Plugin for Eclipse version 3.5.1
  - m2e  version 1.4.0
  - gwt-maven-plugin version 2.6.1
  - maven-war-plugin  version 2.1

My problem:

I am developing a maven project consisting of 3 modules. Two of them are GWT modules.
I managed to successfully compile the whole project (using gwt-maven-plugin) and building the
war (using maven-war-plugin).
When trying to launch the (GWT) application in eclipse I get the following exception:

Exception in thread "main" java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/servlet/HttpConstraintElement
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at com.google.gwt.dev.shell.jetty.JettyLauncher.createWebAppContext(JettyLauncher.java:744)
    at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:711)
    at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:522)
    at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1104)
    at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:844)
    at com.google.gwt.dev.DevMode.main(DevMode.java:322)

After Googling, I found out that I need a Javaee implementation, since java-api.jar contains no implementation.
This makes me really confused. I thought that the internal server used by GWT will provide a default implementation.
Can someone give me a hint on how to fix this problem.
Any idea is welcome.

Regards
Junior

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment