Opened 15 years ago

Closed 15 years ago

#1464 closed defect (fixed)

Automatic plug-in installer crashes when an invalid jar file is found

Reported by: Jari Häkkinen Owned by: Nicklas Nordborg
Priority: major Milestone: BASE 2.15
Component: web Version:
Keywords: Cc:

Description

The crash can be triggered by adding a dummy soft link in a directory scanned by the automatic plug-in installer, ln -s /tmp/dummy.jar, and then running the automatic installer. The installer tries to read the content of dummy.jar.

Change History (4)

comment:1 by Nicklas Nordborg, 15 years ago

The same thing happens if the JAR file is not valid JAR file. It is simple to check by placing any other type of file an renaming it with a .jar extension. The stack trace is:

error in opening zip file

BaseException
...at net.sf.basedb.util.PluginInfo.loadFromJar(PluginInfo.java:204)
...at org.apache.jsp.admin.plugindefinitions.auto_005finstall_jsp.addPluginJarFile(auto_005finstall_jsp.java:54)
...at org.apache.jsp.admin.plugindefinitions.auto_005finstall_jsp.addDirectory(auto_005finstall_jsp.java:47)
...at org.apache.jsp.admin.plugindefinitions.auto_005finstall_jsp._jspService(auto_005finstall_jsp.java:319)
...at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
...at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
...at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)

...at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
...at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
...at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
...at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
...at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
...at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
...at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
...at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:694)
...at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:665)
...at org.apache.jsp.admin.plugindefinitions.index_jsp._jspService(index_jsp.java:591)
...at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
...at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
...at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
...at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
...at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
...at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
...at net.sf.basedb.clients.web.servlet.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:70)
...at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
...at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
...at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
...at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
...at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
...at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
...at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
...at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
...at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:852)
...at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:584)
...at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
...at java.lang.Thread.run(Unknown Source)

Caused by: java.util.zip.ZipException: error in opening zip file
...at java.util.zip.ZipFile.open(Native Method)
...at java.util.zip.ZipFile.<init>(Unknown Source)
...at java.util.jar.JarFile.<init>(Unknown Source)
...at java.util.jar.JarFile.<init>(Unknown Source)
...at net.sf.basedb.util.PluginInfo.loadFromJar(PluginInfo.java:141)
...at org.apache.jsp.admin.plugindefinitions.auto_005finstall_jsp.addPluginJarFile(auto_005finstall_jsp.java:54)
...at org.apache.jsp.admin.plugindefinitions.auto_005finstall_jsp.addDirectory(auto_005finstall_jsp.java:47)
...at org.apache.jsp.admin.plugindefinitions.auto_005finstall_jsp._jspService(auto_005finstall_jsp.java:319)
...at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
...at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
...at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
...at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
...at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
...at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
...at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
...at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
...at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
...at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
...at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:694)
...at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:665)
...at org.apache.jsp.admin.plugindefinitions.index_jsp._jspService(index_jsp.java:591)
...at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
...at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
...at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
...at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
...at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
...at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
...at net.sf.basedb.clients.web.servlet.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:70)
...at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
...at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
...at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
...at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
...at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
...at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
...at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
...at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
...at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:852)
...at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:584)
...at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
...at java.lang.Thread.run(Unknown Source)

comment:2 by Nicklas Nordborg, 15 years ago

Status: newassigned

comment:3 by Nicklas Nordborg, 15 years ago

Summary: Automatic plug-in installer crashes when a link to a non existent jar file is foundAutomatic plug-in installer crashes when an invalid jar file is found

comment:4 by Nicklas Nordborg, 15 years ago

Resolution: fixed
Status: assignedclosed

(In [5268]) Fixes #1464: Automatic plug-in installer crashes when an invalid jar file is found

Note: See TracTickets for help on using tickets.