Tomcat 5.5: “Exception processando JAR no caminho do recurso” leva a java.lang.OutOfMemoryError

1

Temos um servidor antigo executando o Tomcat 5.5.

Ontem, implantamos um arquivo war e, em seguida, ele começou a falhar.

Olhando para catalina.date.log eu encontrei alguns java.util.zip.ZipException e java.lang.OutOfMemoryError. Acho que está resultando em vazamento de memória que trava o Tomcat quando não há mais memória para alimentá-lo.

3 arquivos estão envolvidos:

  • /var/tomcat/tomcat-5.5.25/common/i18n/._tomcat-i18n-es.jar
  • /var/tomcat/tomcat-5.5.25/common/lib/._jasper-compiler-jdt.jar
  • /var/tomcat/tomcat-5.5.25/common/lib/._naming-factory-dbcp.jar

Eles estão todos em seus lugares e não estão corrompidos. É claro que o ._ é o primeiro suspeito de causar o erro. O problema é que esses arquivos não são referenciados em qualquer lugar do aplicativo, ainda mais que um arquivo i18n-es, porque ele não tem nenhum recurso i18n e nenhuma configuração em espanhol e, ALAIK, nem no Tomcat.

O upgrade do Tomcat o 7 não é uma possibilidade, e ele não estava travando antes de o aplicativo ser implantado, portanto, culpar o servidor não é uma solução viável.

Alguém pode me dar uma idéia do que pode estar usando esses arquivos ou adicionar ._ neles?

abaixo é o log de rastreios completo, ele vai da implementação para a reinicialização do Tomcat. {AppName} é o nome da guerra. Não há nenhuma referência a todos os nossos pacotes em qualquer lugar nos stacktraces, tudo acontece com o código do Tomcat.

18/11/2013 11:06:24 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive {AppName}.war
18/11/2013 11:06:24 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/i18n/._tomcat-i18n-es.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:127)
    at java.util.jar.JarFile.<init>(JarFile.java:135)
    at java.util.jar.JarFile.<init>(JarFile.java:99)
    at org.apache.catalina.startup.TldConfig.tldScanJar(TldConfig.java:457)
    at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:307)
    at org.apache.catalina.core.StandardContext.processTlds(StandardContext.java:4307)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4144)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515)
    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:458)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
    at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1394)
    at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:213)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    at java.lang.Thread.run(Thread.java:662)
18/11/2013 11:06:24 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._jasper-compiler-jdt.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:06:24 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/i18n/._tomcat-i18n-ja.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:06:24 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._naming-factory-dbcp.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:06:24 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._jsp-api.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:06:24 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/i18n/._tomcat-i18n-en.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:06:24 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/i18n/._tomcat-i18n-fr.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:06:24 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._naming-resources.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:06:24 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._jasper-compiler.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:06:24 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._commons-el.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:06:24 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._naming-factory.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:06:24 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._servlet-api.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:06:24 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._jasper-runtime.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:07:21 org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/{AppName}]
18/11/2013 11:12:02 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive {AppName}.war
18/11/2013 11:12:02 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/i18n/._tomcat-i18n-es.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:12:02 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._jasper-compiler-jdt.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:12:02 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/i18n/._tomcat-i18n-ja.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:12:02 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._naming-factory-dbcp.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:12:02 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._jsp-api.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:12:02 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/i18n/._tomcat-i18n-en.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:12:02 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/i18n/._tomcat-i18n-fr.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:12:02 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._naming-resources.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:12:02 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._jasper-compiler.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:12:02 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._commons-el.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:12:02 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._naming-factory.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:12:02 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._servlet-api.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:12:02 org.apache.catalina.startup.TldConfig tldScanJar
GRAVE: Exception processing JAR at resource path /var/tomcat/tomcat-5.5.25/common/lib/._jasper-runtime.jar in context /{AppName}
java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
...
18/11/2013 11:12:15 org.apache.tomcat.util.net.PoolTcpEndpoint processSocket
GRAVE: Unexpected error processing socket
java.lang.OutOfMemoryError: PermGen space
18/11/2013 11:17:41 org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8081
18/11/2013 11:17:42 org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
18/11/2013 11:18:46 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
18/11/2013 11:18:46 org.apache.coyote.http11.Http11BaseProtocol init
    
por Hikari 19.11.2013 / 15:17

2 respostas

1

No meu caso, excluo acidentalmente o diretório 'temp' no diretório raiz do Tomcat e ele exibe essa mensagem de erro. Talvez você possa verificar se existe temp ou não. Se sim, verifique se a propriedade da conta inicia o Tomcat.

    
por 18.09.2014 / 17:09
0

Você pode querer aumentar suas configurações de memória compartilhada ao iniciar o tomcat. isso pode ser um problema de pasta temporária (não há espaço, permissões, como Scott escreveu)

Além disso, é possível que este seja um excesso de memória que você usa:

Aumente seus valores de Xmx e Xms e talvez você queira atualizar suas configurações de heap também.

Escolha a busca por "OOM tomcat" e você encontrará o resto das coisas que precisa aprender.

    
por 18.09.2014 / 17:23