What is this: Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError?

George Tomlinson

I copied a java program (called SwingAccumulator.java) which enables the user to enter integers one by one in a GUI and prints the current sum. I then copied a class written by someone else (called createGraph()) to plot a line graph. I'm trying to combine the 2, calling the program ODESolver.java. The second part (createGraph()) uses JFreeChart. I've just tried to call the createGraph() method from the SwingAccumulator part and I get the following error:

Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError

Can anyone help me to understand what is causing these errors and how to fix them please?

Full details of my error are as follows:

Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
    at odesolver.ODESolver.createGraph(ODESolver.java:66)
    at odesolver.ODESolver.<init>(ODESolver.java:60)
    at odesolver.ODESolver$2.run(ODESolver.java:101)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: java.lang.RuntimeException: Uncompilable source code - package org.jfree.util does not exist
    at org.jfree.data.general.Series.<clinit>(Series.java:69)
    ... 17 more  

I suppose the classpath has not been set properly. I've just set it to the folder containing the jfreechart-1.0.16 folder. I was wondering if the JCommon classpath hasn't been set, but I thought JCommon was included in the jfreechart-1.0.16 folder.

trashgod

As @Foo Bar User comments, both jfreechart and jcommon must be in the classpath:

java -cp lib/jfreechart-1.0.16.jar:lib/jcommon-1.0.20.jar 
    org.jfree.chart.demo.TimeSeriesChartDemo1

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException in basic Java GUI interest calculator

From Dev

java parseint - Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: ""

From Dev

Matlab reports "Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException"

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException [NetBeans]

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException if-statement

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: javax.swing.JButton

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "11101110110100011110111011010001"

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException Login form error

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException For Loops

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Comparison method violates its general contract

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException (Panel displays before fully loaded?)

From Dev

NetBeans Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: DSA

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.StringIndexOutOfBoundsException: String index out of range: 8

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 100

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException and JTable problems

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException in GUI?

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "FALSE"

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException and how to fix it?

From Dev

Exception in "AWT-EventQueue-0" java.lang.NullPointerException

From Dev

Exception in "AWT-EventQueue-0" java.lang.NullPointerException

From Dev

Java error in my code Exception in thread "AWT-EventQueue-0"

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.IllegalMonitorStateException at java.lang.Object.notify(Native Method)

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.put(Ljava/lang/Object;)V

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to university.pojo.Schedule

From Dev

Jframe Error: Exception: "AWT-EventQueue-0" java.lang.NullPointerException

From Dev

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.JTable$1 cannot be cast to javax.swing.table.DefaultTableModel

From Dev

Exception in thread "AWT-EventQueue-0" NullPointerException error in Swing

From Dev

Exception in thread "AWT-EventQueue-0" NullPointerException error in Swing

Related Related

  1. 1

    Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException

  2. 2

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException in basic Java GUI interest calculator

  3. 3

    java parseint - Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: ""

  4. 4

    Matlab reports "Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException"

  5. 5

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException [NetBeans]

  6. 6

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException if-statement

  7. 7

    Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: javax.swing.JButton

  8. 8

    Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "11101110110100011110111011010001"

  9. 9

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException Login form error

  10. 10

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException For Loops

  11. 11

    Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Comparison method violates its general contract

  12. 12

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException (Panel displays before fully loaded?)

  13. 13

    NetBeans Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: DSA

  14. 14

    Exception in thread "AWT-EventQueue-0" java.lang.StringIndexOutOfBoundsException: String index out of range: 8

  15. 15

    Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 100

  16. 16

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException and JTable problems

  17. 17

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException in GUI?

  18. 18

    Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "FALSE"

  19. 19

    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException and how to fix it?

  20. 20

    Exception in "AWT-EventQueue-0" java.lang.NullPointerException

  21. 21

    Exception in "AWT-EventQueue-0" java.lang.NullPointerException

  22. 22

    Java error in my code Exception in thread "AWT-EventQueue-0"

  23. 23

    Exception in thread "AWT-EventQueue-0" java.lang.IllegalMonitorStateException at java.lang.Object.notify(Native Method)

  24. 24

    Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.put(Ljava/lang/Object;)V

  25. 25

    Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to university.pojo.Schedule

  26. 26

    Jframe Error: Exception: "AWT-EventQueue-0" java.lang.NullPointerException

  27. 27

    Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.JTable$1 cannot be cast to javax.swing.table.DefaultTableModel

  28. 28

    Exception in thread "AWT-EventQueue-0" NullPointerException error in Swing

  29. 29

    Exception in thread "AWT-EventQueue-0" NullPointerException error in Swing

HotTag

Archive