[jboss-dev-forums] [Design of POJO Server] - Re: JBAS-6061 or weird nested jar

adrian@jboss.org do-not-reply at jboss.com
Tue Oct 14 08:36:45 EDT 2008


"alesj" wrote : 
  | What happens is that when VFS tries to read top sqljdbc.jar it finds inner sqljdbc.jar.
  | Currently the policy in JBossAS is to unpack nested jar into temp and again handle them as top level jars.
  | But in this case - probably due to 0 size - JDK's Zip handling fails while handling this newly unpacked inner sqljdbc.jar,
  | propagating the error all the way to the top - classloading part.
  | 

It's only referenced by the VFS because the JarStructure is adding it as a
subdeployment. You could add an option to JarStructure that says something
like:

  | <property name="ignoreBrokenJars">true</property>
  | 

Then in jar structure

  |          else if (JarUtils.isArchive(file.getName()))
  |          {
  | +          if (ignoreBrokenJars && validateZipFile(file))
  | +          {
  | +             log.warn("Ignoring broken archive: " + file);
  | +             return false;
  | +          }
  | 
  |             if (trace)
  |                log.trace("... ok - its an archive or at least pretending to be.");
  |          }
  | 

where validateZipFile() checks to see whether the x.jar or y.zip is really
an archive.

It might be an idea to do the validateZipFile() anyway since we'll then have
"fail early" behaviour when it looks at the structure of the deployment
if one of the jars is broken.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4182091#4182091

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4182091



More information about the jboss-dev-forums mailing list