0

I have created a simple Hello World Java project using REST with instructions from the following location.

https://netbeans.org/community/magazine/html/04/restfulws.html

Unfortunately, when I go to deploy the application, I get the following error.

SEVERE: Begin event threw error java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/servlet/ServletException

The only change I made that isn't listed there was that I added javaee-api-6.jar to the libs directory in my Tomcat folder.

Can anyone tell me what I am doing wrong?

My JDK is 6, my Tomcat version is 7.0.34, all build and compile settings in Netbeans are pointing to JDK 6.

4

1 回答 1

0

My mistake was by trying to use Tomcat as my server and guessing that JAR's needed to be dropped into it to make it work. Once I stuck with Glashfish, I had no problems at all.

于 2013-09-06T12:44:00.333 回答