Bug 10255 - FOP Cannot be embeded in Tomcat 4.0.4
Summary: FOP Cannot be embeded in Tomcat 4.0.4
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: all
Hardware: All other
: P3 major
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-26 16:11 UTC by Vicente Salvador
Modified: 2012-04-01 06:56 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vicente Salvador 2002-06-26 16:11:01 UTC
FOP needs to get the Classloader of org.apache.fop.fo.ElementMapping.class to
start, but in TC4.0.4 we cannot access to classloader. This is an issue that
blocks the use of embeded FOP in TC 4.0.4

This is due a security change on TC, so the best solution is to patch FOP and
don't say "This is a TC issue"




       // add mappings from available services
        Enumeration providers =
            Service.providers(org.apache.fop.fo.ElementMapping.class);
        if (providers != null) {
            while (providers.hasMoreElements()) {
                String str = (String)providers.nextElement();
                try {
                    addElementMapping(str);
                } catch (IllegalArgumentException e) {}

            }
        }




class Service {

    static Hashtable providerMap = new Hashtable();

    public static synchronized Enumeration providers(Class cls) {
        ClassLoader cl = cls.getClassLoader(); ----- wil return null on tomcat
4.04!!!!
        String serviceFile = "META-INF/services/" + cls.getName();
Comment 1 Christian Geisert 2003-10-15 00:23:50 UTC
A fix for this has been recently ported from trunk back to maintenance branch

See
http://nagoya.apache.org/eyebrowse/ReadMsg?listName=fop-cvs@xml.apache.org&msgNo=2136
Comment 2 Glenn Adams 2012-04-01 06:56:39 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed