cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fawzib Rojas <f_ro...@spectron-msim.com>
Subject I really appreciate if somebody would help me with Cocoon 2.2/Fop/Batik
Date Fri, 15 Oct 2010 14:42:36 GMT
  I've posted twice about this and got no response.

My problem:

I'm moving from cocoon 2.1 to 2.2 (haven't done it yet because I knew 
maven would be a PITA and it didn't dissapoint). After a lot of hair 
pulling I finally compiled my webapp + blocks for cocoon 2.2 and was 
able to deploy on geronimo. The problem now is that cocoon-fop-impl will 
not work with embedded SVG. It uses fop-0.20.4 which wants to use batik 
1.6 and those 2 are incompatible. After looking around in a lot of posts 
found out about cocoon-fop-ng-impl, unfortunately it cant be found on 
maven (why?). Found a post that linked to the source, after more hair 
pulling got it working cocoon-fop-ng-impl+fop-1.0+batik 1.7.

I thought I was done but no. Now the SVG serializer stopped working. So 
I'll try and make a batik-ng. I did and now batik is giving me errors I 
was getting NullPointerException in SAXDocumentFactory.java at:

public void startElement(String uri,String localName,String 
rawName,Attributes attributes) throws SAXException {
         // Check If we should halt early.
         if (HaltingThread.hasBeenHalted()) {
             throw new SAXException(new InterruptedIOException());
         }
         if (inProlog) {
             // for some reason parser is null here
             inProlog = false;
             try {
                 isStandalone = parser.getFeature
                     ("http://xml.org/sax/features/is-standalone");
             } catch (SAXNotRecognizedException ex) {
             }
             try {
                 xmlVersion = (String) parser.getProperty
                     ("http://xml.org/sax/properties/document-xml-version");
             } catch (SAXNotRecognizedException ex) {
             }
         }
.....
}

I moved both trys to where the parser is created since that code just 
saves the values so *I think* it makes no difference. Now I get another 
error:

java.lang.ClassCastException: org.apache.batik.dom.GenericElement cannot 
be cast to org.w3c.dom.svg.SVGSVGElement

after another search found a post talking about 
DOMUtilities.deepCloneDocument saying it would convert dom to Batik's 
own dom. It gives me the same error, so I'm stuck. I would really 
appreciate any help on this.

<rant>
It was much easier to work with Cocoon 2.1, just add jars to build path 
in eclipse and that was it. I find maven to be an obstacle, most of the 
time I'm fighting it to get something done. When the dust settles I 
still end up downloading and creating my own things because what I need 
either outdated (cocoon-fop-impl), non-existent even though it was 
created a long time ago (cocoon-fop-ng-impl) or just wrongly configured 
(cocoon-fop-impl again).

Also, why when a new version of a library is created most of the time 
compatibility is just ignored (and I see this a lot with java)? Why not 
add a simple class that uses the old interfaces so you can move up to 
new versions without problems.
</rant>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message