Reputation: 11
I'm trying to show a graphic report in a web application run in a local machine using wildfly-8 but a I had next error.
java.lang.NoClassDefFoundError: Lorg/jfree/chart/plot/PlotOrientation; at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.8.0_31] at java.lang.Class.privateGetDeclaredFields(Class.java:2575) [rt.jar:1.8.0_31] at java.lang.Class.getDeclaredField(Class.java:2060) [rt.jar:1.8.0_31] at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1659) [rt.jar:1.8.0_31] at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:72) [rt.jar:1.8.0_31] at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:480) [rt.jar:1.8.0_31] at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:468) [rt.jar:1.8.0_31] at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_31] at java.io.ObjectStreamClass.(ObjectStreamClass.java:468) [rt.jar:1.8.0_31] at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:365) [rt.jar:1.8.0_31] at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:602) [rt.jar:1.8.0_31] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623) [rt.jar:1.8.0_31] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518) [rt.jar:1.8.0_31] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623) [rt.jar:1.8.0_31] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518) [rt.jar:1.8.0_31] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774) [rt.jar:1.8.0_31] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) [rt.jar:1.8.0_31] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993) [rt.jar:1.8.0_31] at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:501) [rt.jar:1.8.0_31] at net.sf.jasperreports.engine.base.JRBaseChart.readObject(JRBaseChart.java:828) [jasperreports-6.1.0.jar:6.1.0]
I imported libraries like:
But I'm still having that error. Anybody can help me ?
I have this in a server with jboss 6.1.0 functional but in local machine doesn't works.
Upvotes: 0
Views: 5146
Reputation: 45
If you're using a dependency manager (Maven, SBT, Ivy, Gradle, etc.) copy and paste the respective snippet above into your project file. If you're using a dependency manager, that's all there is to resolving this exception.
Upvotes: 1
Reputation: 7008
Go to the files tab, expand the .war file in the dist subdirectory, expand the WEB-INF.lib directory within the .war file and check to see if the jfreechart is in there. If it is expand its org.jfree.chart.plot directory to check for PlotOrientation.class.
...
...
If its there, maybe your wildfly is out of sync. Undeploy your web application, stop wildfly, and restart.
Upvotes: 1