JChart does not work with ICEFaces project generated with seam-gen,
java.lang.NoClassDefFoundError: org/krysalis/jcharts/Chart
------------------------------------------------------------------------------------------------------------------------------
Key: JBSEAM-2851
URL:
http://jira.jboss.com/jira/browse/JBSEAM-2851
Project: JBoss Seam
Issue Type: Bug
Components: Tools
Affects Versions: 2.1.0.A1
Environment: JBoss-4.2.2 GA, JBoss Seam 2.1.0.A1, MacOS X
Reporter: Nicolas Martignole
Priority: Minor
I created a new project using seam-gen tools on a new project.
During the seam setup phase, I specified the latest version of ICEFaces.
Everything went well and the default pages generated with seam-gen works properly.
I tried to insert the JCharts component from ICEFaces to draw a simple 3D Pie Chart
with the following code in home.xhtml
<ice:form>
<ice:panelGrid columns="2" columnClasses="leftMenu,
leftMenu" rendered="#{identity.loggedIn}">
<ice:outputChart type="pie3d"
chartTitle="Network Health"
labels="OK,WARN,ERROR,FATAL"
data="80,10,5,5"
colors="green,yellow,orange,red"
/>
</ice:panelGrid>
</ice:form>
I did a "seam restart" and I get the following exception in JBoss stack
Caused by: java.lang.NoClassDefFoundError: org/krysalis/jcharts/Chart
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
at java.lang.Class.getDeclaredMethods(Class.java:1763)
at java.beans.Introspector$1.run(Introspector.java:1265)
at java.security.AccessController.doPrivileged(Native Method)
at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1263)
at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1129)
at java.beans.Introspector.getBeanInfo(Introspector.java:387)
at java.beans.Introspector.getBeanInfo(Introspector.java:159)
at
javax.faces.component.UIComponentBase.getPropertyDescriptors(UIComponentBase.java:167)
at
javax.faces.component.UIComponentBase.populateDescriptorsMapIfNecessary(UIComponentBase.java:132)
at javax.faces.component.UIComponentBase.<init>(UIComponentBase.java:121)
at javax.faces.component.UICommand.<init>(UICommand.java:102)
at javax.faces.component.html.HtmlCommandButton.<init>(HtmlCommandButton.java:53)
at
com.icesoft.faces.component.ext.HtmlCommandButton.<init>(HtmlCommandButton.java:93)
at
com.icesoft.faces.component.outputchart.OutputChart.<init>(OutputChart.java:118)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at com.sun.faces.application.ApplicationImpl.newThing(ApplicationImpl.java:1014)
... 84 more
I managed to fix the issue by
- copying krysalis-jCharts-1.0.0-alpha-1.jar from ${icefaces.home}/lib to myproject/lib
folder
- updating my build.xml in the EAR target, by adding an " <include
name="lib/krysalis-jCharts-1.0.0-alpha-1.jar"/>"
in the EAR target in the fileset
I don't know very well seam-gen but it seems that it's a small bug
in one of the template build.xml defined in seam-gen folder.
Hope it will help someone
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira