Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

gwt-user Jar not loaded offending class javax.servlet.Servlet

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a war file (GWT app) which

  • works fine in UAT Env 1
  • works fine in Production environment
  • gives below error when deploying in UAT Env 2
  • the jar files ... servlet-api.jar , gwt-user.jar is located in same folder in all the environment
  • as per suggestion below tried deleting the gwt-user.jar from the folder , still same issue just the first line of error disappears

  • INFO: validateJarFile(/.../tomcat/webapps/abc-browser/WEB-INF/lib/gwt-user-1.7.0.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    Aug 21, 2013 2:35:46 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart
    Aug 21, 2013 2:35:46 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/abc-browser] startup failed due to previous errors

    I have seen similar issues in this forum which advice
    1) link 1 : to delete servlet-api.jar in tomcat\lib : i tried this doesnt help : http://stackoverflow.com/questions/10992644/validatejarfileservlet-api-jar-jar-not-loaded-in-tomcat-using-eclipse
    2) link 2 : to change the pom.xml : but same war file ( hence pom ) is working fine in other environments ( esp prod ) : http://stackoverflow.com/questions/15601469/jar-not-loaded-see-servlet-spec-2-3-section-9-7-2-offending-class-javax-serv

    Not sure if there is some more debug points , solution ?
    Tried Solution 1 (failed) : manually deleting the gwt-user-1.7.0.jar from WEB-INF\lib of the web application

    Tried Solution 2 (failed) : From dependency tree i get below

    [INFO] +- com.xyz.global.gxtfw:client:jar:2.0.0:compile
    [INFO] | \- com.xyz.global.gxtfw:common:jar:2.0.0:compile
    [INFO] | +- com.extjs:gxt:jar:2.0.1:compile
    [INFO] | \- com.google.gwt:gwt-user:jar:1.7.0:compile


    I tried changing the scope of com.xyz.global.gxtfw to provided , doesnt help

    Tried Solution 3 (failed) : add exclusion like below

    <dependency>
    <groupId>com.xyz.global.gxtfw</groupId>
    <artifactId>client</artifactId>
    <version>2.0.0</version>
    <exclusions>
    <exclusion>
    <groupId>com.google.gwt</groupId>
    <artifactId>gwt-user</artifactId>
    </exclusion>
    </exclusions>
    </dependency>

     
    If I had asked people what they wanted, they would have said faster horses - Ford. Tiny ad:
    Enterprise-grade Excel API for Java
    https://products.aspose.com/cells/java
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!