Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-2815

spring-jcl logging exception

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3
    • None
    • None
    • Java 1.8
      maven 3.5.4

    • Important

    Description

      Update Dependencies

      For compatibility with other libraries the dependencies could do with updating and moving to non deprecated methods.

       

      I came across the issue below with the logger library when using the dependencies below.

       

      Issue

      org.apache.commons.logging.impl.SimpleLog is deprecated and equivalent to NoOpLog in spring-jcl. Use a standard LogFactory.getLog(Class/String) call instead.

      https://docs.spring.io/spring/docs/current/javadoc-api/org/apache/commons/logging/impl/SimpleLog.html

      Maven dependencies

      (when used in this order, putting fop first uses older logging 1.0.4)

      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-websocket</artifactId>

        <version>2.05</version>
      </dependency>

      <dependency>
        <groupId>org.apache.xmlgraphics</groupId>
        <artifactId>batik-transcoder</artifactId>
        <version>1.10</version>
      </dependency>

      <dependency>
        <groupId>org.apache.xmlgraphics</groupId>
        <artifactId>fop</artifactId>
        <version>2.3</version>
      </dependency>

      Stack Trace

      java.lang.NoSuchMethodError: org.apache.commons.logging.impl.SimpleLog.setLevel(I)V
      at org.apache.fop.svg.AbstractFOPTranscoder.getLogger(AbstractFOPTranscoder.java:180) ~[fop-2.3.jar:na]
      at org.apache.fop.svg.PDFTranscoder.transcode(PDFTranscoder.java:143) ~[fop-2.3.jar:na]
      at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142) ~[batik-transcoder-1.10.jar:na]
      at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156) ~[batik-transcoder-1.10.jar:na]

      Attachments

        Issue Links

          Activity

            People

              ssteiner Simon Steiner
              Idristhedragon Nathan Williams
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: