P
P
pomaz_andrew2017-04-06 12:12:01
Java
pomaz_andrew, 2017-04-06 12:12:01

Why is it throwing an error when starting the servlet?

Good day everyone! I am developing a servlet (Eclipse + Tomcat). After connecting a third-party jar-library, it began to give out such an error.

06.04.2017 11:58:32 org.apache.tomcat.util.digester.Digester getParser
SEVERE: Digester.getParser: 
java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
  at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source)
  at sun.security.util.SignatureFileVerifier.process(Unknown Source)
  at java.util.jar.JarVerifier.processEntry(Unknown Source)
  at java.util.jar.JarVerifier.update(Unknown Source)
  at java.util.jar.JarFile.initializeVerifier(Unknown Source)
  at java.util.jar.JarFile.getInputStream(Unknown Source)
  at sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown Source)
  at java.net.URL.openStream(Unknown Source)
  at java.lang.ClassLoader.getResourceAsStream(Unknown Source)
  at javax.xml.parsers.SecuritySupport$4.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at javax.xml.parsers.SecuritySupport.getResourceAsStream(Unknown Source)
  at javax.xml.parsers.FactoryFinder.findJarServiceProvider(Unknown Source)
  at javax.xml.parsers.FactoryFinder.find(Unknown Source)
  at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
  at org.apache.tomcat.util.digester.Digester.getFactory(Digester.java:492)
  at org.apache.tomcat.util.digester.Digester.getParser(Digester.java:707)
  at org.apache.tomcat.util.digester.Digester.getXMLReader(Digester.java:917)
  at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1576)
  at org.apache.catalina.startup.Catalina.load(Catalina.java:616)
  at org.apache.catalina.startup.Catalina.load(Catalina.java:667)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:253)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:427)
06.04.2017 11:58:32 org.apache.catalina.startup.Catalina load
WARNING: Catalina.start using conf/server.xml:

The source is like this:
package com.prepaywrapper;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


/**
 * Servlet implementation class PrepayServlet
 */
public class PrepayServlet extends HttpServlet {
  private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public PrepayServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

  /**
   * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
   */
  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    
  
  }

  /**
   * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
   */
  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    // TODO Auto-generated method stub
  }
  

}

That is, in fact, we do nothing yet. What could be the reason for such an error?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2017-04-06
@saboteur_kiev

In a third-party jar library, the signature is crooked. As a workaround, you can get inside this third party jar and remove the meta directories.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question