Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: NoSuchMethodError

  1. #1
    Join Date
    Mar 2003
    Posts
    4,947

    Default NoSuchMethodError

    I have 'borrowed' some of the code from HelloWorld. I get a clean compile, but I get the following stack trace when I try to print data from my table.

    Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: org.jfree.base.BasicProjectInfo.addOptionalLibrary(Ljava/lang/StringV
    at org.jfree.report.JFreeReportInfo.<init>(JFreeReportInfo.java:97)
    at org.jfree.report.JFreeReportBoot.<init>(JFreeReportBoot.java:221)
    at org.jfree.report.JFreeReportBoot.getInstance(JFreeReportBoot.java:235)
    at javaSource.TestPanel.executeReport(TestPanel.java:277)
    at javaSource.HelperFrame.actionPerformed(HelperFrame.java:325)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)

    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
    at java.awt.Component.processMouseEvent(Component.java:5488)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
    at java.awt.Component.processEvent(Component.java:5253)
    at java.awt.Container.processEvent(Container.java:1966)

    at java.awt.Component.dispatchEventImpl(Component.java:3955)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
    at java.awt.Container.dispatchEventImpl(Container.java:2010)
    at java.awt.Window.dispatchEventImpl(Window.java:1774)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Finished executing

    Line 277 in TestPanel.java is this: JFreeReportBoot.getInstance().start();

    I am pretty sure it is something with the classpath but not sure what I am missing. Here is the javac command (from my IDE):

    C:\Program Files\Java\jdk1.5.0_06\bin\java.exe -classpath "C:\Program Files\Java\jdk1.5.0_06\jre\lib\rt.jar;C:\Program Files\Java\jdk1.5.0_06\lib\tools.jar;C:\Program Files\Java\jfreechart-1.0.0\lib;C:\Program Files\Java\PSwing\bin;C:\Program Files\Java\jfreereport-0.8.7-2\lib;C:\Program Files\Java\jfreereport-0.8.7-2\jfreereport-0.8.7-2.jar;C:\Program Files\Java\jfreereport-0.8.7-2\lib\bsf-2.3.0.jar;C:\Program Files\Java\jfreereport-0.8.7-2\lib\bsh-1.3.0.jar;C:\Program Files\Java\jfreereport-0.8.7-2\lib\gnujaxp.jar;C:\Program Files\Java\jfreereport-0.8.7-2\lib\itext-1.4.jar;C:\Program Files\Java\jfreereport-0.8.7-2\lib\jcommon-1.0.2.jar;C:\Program Files\Java\jfreereport-0.8.7-2\lib\jcommon-xml-1.0.2.jar;C:\Program Files\Java\jfreereport-0.8.7-2\lib\libfonts-0.1.5.jar;C:\Program Files\Java\jfreereport-0.8.7-2\lib\pixie-0.8.4.jar;C:\Program Files\Java\jfreereport-0.8.7-2\lib\poi-3.0-alpha1-20050704.jar;C:\Program Files\Java\jfreereport-ext-0.8.7-2\jfreereport-ext-0.8.7-2.jar;C:\Program Files\Java\jfreereport-ext-0.8.7-2\lib;C:\greg\budgetProgram\classes" javaSource.BudgetHelper -Xlint:unchecked

  2. #2
    Join Date
    Mar 2003
    Posts
    4,947

    Default got it

    Modified the jar file order and that problem is now corrected...must have an old version of something that wsa causing a problem.

    Now I have another problem.

    The preview window surfaces, but when I close it (from the File -> Close Menu), control is not returned correctly to the JPanel that displays the data from the TableModel.

  3. #3
    Join Date
    Mar 2003
    Posts
    4,947

    Default Same Issue

    Good advice, thanks!

    I had the same issue with:
    JFreeReportBoot.getInstance().start();

    Once I changed the order of the jar files in my classpath, the report worked.

    I'm also having the issue with control not switching back to the java app. once I 'exit' the report window. This is a minor issue.

  4. #4
    Join Date
    Mar 2003
    Posts
    4,947

    Default jar files

    make sure you have all of the files in the jfreereport and the jfreereport-ext lib folders in your classpath...I had the same problem and once I added ALL of the jar files in both lib folders the problem went away. Not exactly sure which ONE did it, but at least it now works.

  5. #5
    Join Date
    Jun 2006
    Posts
    4

    Default Re: Same Issue

    Hi all,

    Can anyone please tell me which all jar files I should include in the classfile and the order as well.

  6. #6

    Default

    Hi,

    The problem is that JCommon is used by JFreeReport and JFreeChart, Try to use lastest version of both or at leat versions that are using the same JCommon library version.
    May the Moo force be with you,
    Said Mimil

    A student of JFree & Pentaho Academies,
    Cedric Pronzato

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.