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();
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
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed