Jump to content
  • Cannot compile JRXML with JDK 1.4


    jmartens
    Assigned User lucianc
    CategoryBug report
    PriorityNormal
    ReproducibilityAlways
    ResolutionFixed
    SeverityBlock
    StatusClosed

    I swapped out the jasperreports-3.1.4.jar with the new 3.5.1.jar in our application, and now experience an error on JasperCompileManager.compileReportToFile( String, String ).

    The error is:

    java.lang.NoSuchMethodError: java.lang.String java.lang.String.replace(java.lang.CharSequence, java.lang.CharSequence)

     

    at net.sf.jasperreports.engine.util.JRStringUtil.escapeJavaStringLiteral(JRStringUtil.java:364)

    We use the JDK 1.4 for our application and we can't yet upgrade to the newer JDK (don't ask why). The String.replace(CharSequence, CharSequence) method didn't exist back in 1.4.



    User Feedback

    Recommended Comments

    A fix has been checked in for this. The dependency on Java 1.5 has been removed.

     

    SVN log:

    Sending lucru/jasperreports/src/net/sf/jasperreports/engine/util/JRStringUtil.java

    Transmitting file data ...

    Committed revision 2782.

     

    Regards,

    Lucian

    Link to comment
    Share on other sites

    Hongwei, I have no problem with compiling this report.

    Looks like it's something wrong with the jrxml file itself (XML Parser complains on DOCTYPE). Have you ever edited it?..

    Try the original file - it should be ok

    Link to comment
    Share on other sites

    Hongwei,

     

    Please do not pollute bug trackers with questions that are not related to the problem described in the bug. Post your queries on the forums instead (again, if the query is not directly related to the original forum topic, start a new thread).

     

    Regards,

    Lucian

    Link to comment
    Share on other sites


×
×
  • Create New...