On 04/03/2013 12:29, Cédric Damioli wrote:
It seems that the bundled FOP 1.1 jar is compiled with Java 5
Francesco, have you built it yourself, or does it come from the binary distribution from FOP ?

I have just downloaded the binary distribution, assuming (because of [1]) that it was working correctly under JDK 1.4.

However, if you take a look at [2]:

  <property name="javac.source" value="1.5"/>
  <property name="javac.target" value="1.5"/>

make the final word to this.

I will re-open COCOON-2295 for reverting to FOP 1.0 (where 1.4 is the javac.source / javac.target [3]) and also open an issue to the FOP team for fixing [1].


[1] http://xmlgraphics.apache.org/fop/1.1/running.html
[2] http://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-1_1/build.xml
[3] http://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-1_0/build.xml

Le 04/03/2013 08:05, David Crossley a écrit :
Francesco Chicchiriccò (JIRA) wrote:
    [ https://issues.apache.org/jira/browse/COCOON-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13578204#comment-13578204 ] 

Francesco Chicchiriccò commented on COCOON-2295:

According to [1] FOP 1.1 still requires JDK 1.4.

If the patch looks fine, I'd commit and close this issue.

[1] http://xmlgraphics.apache.org/fop/1.1/running.html
I just tried building Cocoon-2.1 using Java 1.4.2
and get complaints from the Cocoon FOP Block:
..../cocoon_2_1/src/blocks/fop/java/org/apache/cocoon/serialization/FOPSerializer.java:34: cannot access org.apache.fop.apps.FOPException
bad class file: ..../cocoon_2_1/lib/optional/fop-1.1.jar(org/apache/fop/apps/FOPException.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
import org.apache.fop.apps.FOPException;

However the block is okay when using Java 5.


Integrate FOP 1.0

                Key: COCOON-2295
                URL: https://issues.apache.org/jira/browse/COCOON-2295
            Project: Cocoon
         Issue Type: Improvement
         Components: Blocks: Batik, Blocks: FOP
   Affects Versions: 2.1.12
           Reporter: ron van den branden
           Assignee: Francesco Chicchiriccò
            Fix For: 2.1.12

        Attachments: COCOON-2295-FOP_1_1.patch, COCOON-2295.patch, jars.patch, jars.xml

Here are instructions for updating the current FOP-0.95 serializer in Cocoon-2.1.12-dev (see https://issues.apache.org/jira/browse/COCOON-2289):
1. checkout http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X
2. download (and build) FOP-1.0 from http://xmlgraphics.apache.org/fop/download.html
3. update jars in %COCOON_HOME%\lib\*:
    -replace %COCOON_HOME%\lib\optional\batik-all-1.6.jar with %FOP_HOME%\lib\batik-all-1.7.jar
    -replace %COCOON_HOME%\lib\optional\fop-0.95.jar with %FOP_HOME%\build\fop.jar
    -replace %COCOON_HOME%\lib\optional\xmlgraphics-commons-1.3.1.jar with %FOP_HOME%\lib\xmlgraphics-commons-1.4.jar
    -copy %FOP_HOME%\lib\xml-apis-ext-1.3.04.jar to %COCOON_HOME%\lib\endorsed
    -copy %FOP_HOME%\lib\serializer-2.7.0.jar to %COCOON_HOME%\lib\optional
4. update references to these jars in %COCOON_HOME%\lib\jars.xml (see attached file)
5. build Cocoon
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member