2

I am getting the following error. I assume there is some sort of dependency issue but can't find it.

Here is the error

Aug 31, 2011 9:43:00 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\ui-services-1.0\WEB-INF\lib\servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

Aug 31, 2011 9:43:08 PM org.apache.catalina.startup.HostConfig deployWAR
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 60

SEVERE: Error deploying web application archive ui-services-1.0.war

at org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:131)
prayagupa
  • 30,204
  • 14
  • 155
  • 192
Kelly Roper
  • 125
  • 1
  • 2
  • 5
  • Same problem as http://stackoverflow.com/questions/6751920/tomcat-7-servlet-3-0-invalid-byte-tag-in-constant-pool? – Bert F Sep 01 '11 at 03:23
  • Related: http://stackoverflow.com/questions/4076601/how-do-i-import-the-javax-servlet-api-in-my-eclipse-project – BalusC Sep 01 '11 at 03:36

1 Answers1

4

You have packaged the servlet API into your WAR file (servlet-api-2.5.jar). Remove WEB-INF/lib/servlet-api-2.5.jar from the WAR file you're creating and the problem should go away.

You can't load any of the core J(2)EE classes from within your web application.

Femi
  • 64,273
  • 8
  • 118
  • 148
  • Thanks for the help. I guess some dependencies were changed and running on Tomcat 6 (as opposed to Tomcat 7) made it work. Ugh. – Kelly Roper Sep 01 '11 at 04:44