Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004229 [Quercus] minor always 09-27-10 14:07 09-28-10 06:25
Reporter domdorn View Status public  
Assigned To
Priority normal Resolution open Platform
Status new   OS
Projection none   OS Version
ETA none Fixed in Version Product Version 4.0.11
  Product Build
Summary 0004229: Refactor: MergePath does not include WEB-INF/lib/*.jar in Glassfish v3/non-resin
Description MergePath does not include WEB-INF/lib/*.jar in a Glassfish v3 environment.
Currently only libs in glassfish's module directory currently get scanned.

MergePath -> _root -> _pathList =

[jar:(/home/domdorn/tmp/glassfish/release/server/glassfishv3/glassfish/modules/glassfish.jar)/, jar:(/home/domdorn/tmp/glassfish/release/server/glassfishv3/glassfish/lib/monitor/btrace-agent.jar)/, jar:(/home/domdorn/tmp/glassfish/release/server/glassfishv3/glassfish/modules/endorsed/jaxb-api-osgi.jar)/, jar:(/home/domdorn/tmp/glassfish/release/server/glassfishv3/glassfish/modules/endorsed/javax.annotation.jar)/, jar:(/home/domdorn/tmp/glassfish/release/server/glassfishv3/glassfish/modules/endorsed/webservices-api-osgi.jar)/, jar:(/opt/jdk/jdk1.6.0_21/jre/lib/resources.jar)/, jar:(/opt/jdk/jdk1.6.0_21/jre/lib/rt.jar)/, jar:(/opt/jdk/jdk1.6.0_21/jre/lib/jsse.jar)/, jar:(/opt/jdk/jdk1.6.0_21/jre/lib/jce.jar)/, jar:(/opt/jdk/jdk1.6.0_21/jre/lib/charsets.jar)/, jar:(/home/domdorn/tmp/glassfish/release/server/glassfishv3/glassfish/lib/monitor/btrace-boot.jar)/]

but should include
/WEB-INF/inject-16.jar
/WEB-INF/javamail-141.jar
/WEB-INF/quercus.jar
/WEB-INF/resin.jar
/WEB-INF/resin-kernel.jar



Steps To Reproduce
Additional Information QA php/1t61.qa
would fail in a Glassfish Environment because
com.caucho.quercus.lib.pdf.AfmParser.parse:
MergePath mergePath = new MergePath();
    mergePath.addClassPath();

does not add the WEB-INF/lib folder.

Attached Files

- Relationships

- Notes
(0004758)
domdorn
09-28-10 06:25

temporary fixed in

resin/modules/quercus/src/com/caucho/quercus/lib/pdf/AfmParser.java
resin/modules/quercus/src/com/caucho/quercus/lib/pdf/PDF.java

code involved:

Path p = _env.getQuercus().getPwd().lookup("WEB-INF/lib/");
webInfLibPath = String.valueOf(p);

    MergePath mergePath = new MergePath();
    mergePath.addClassPath();

    File webInfLibFile = new File(webInfLibPath);
    if(webInfLibPath != null && !webInfLibPath.isEmpty() && webInfLibFile.isDirectory())
    {
      Path webInfPath = Vfs.lookup(webInfLibFile.getAbsolutePath());
      for( File f : webInfLibFile.listFiles())
      {
        /*
        only look for files that are either jars or zips
         */
        if(f.isFile() && (f.getAbsolutePath().endsWith(".jar") || f.getAbsolutePath().endsWith(".zip")))
        {
          /*
          get a path object with the Jar relative to WEB-INF/lib
           */
          Path jarPath = webInfPath.lookup(f.getName());
          /*
            Encapsulate it as a JarPath, else mergePath.lookup does not look
            "into" the jar when looking for resources
           */
          mergePath.addMergePath(JarPath.create(jarPath));
        }
      }
    }
...
    Path path = mergePath.lookup("com/caucho/quercus/lib/pdf/font/" + name + ".afm");



This should probably go into MergePath.java or some other nice location to ease handling.
 

- Issue History
Date Modified Username Field Change
09-27-10 14:07 domdorn New Issue
09-28-10 06:25 domdorn Note Added: 0004758
09-28-10 06:25 domdorn version 4.0.10 => 4.0.11
09-28-10 06:25 domdorn Summary MergePath does not include WEB-INF/lib/*.jar in Glassfish v3 => Refactor: MergePath does not include WEB-INF/lib/*.jar in Glassfish v3/non-resin


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker