Jasper Reports HTML Components

0

Hi Im  new to jasper . The HTML Component does not render html content , instead it shows an error message as follows .

null: net.sf.jasperreports.engine.JRException: Class not found when loading object from InputStream
Caused by: java.lang.ClassNotFoundException: net.sf.jasperreports.components.html.HtmlComponent from [Module "deployment.myproject.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
at java.lang.Class.forName0(Native Method) [:1.7.0_09]
at java.lang.Class.forName(Class.java:264) [:1.7.0_09]
at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:622) [:1.7.0_09]
at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.resolveClass(ContextClassLoaderObjectInputStream.java:75) [jasperreports-4.5.1.jar:]
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1593) [:1.7.0_09]
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514) [:1.7.0_09]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750) [:1.7.0_09]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) [:1.7.0_09]
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964) [:1.7.0_09]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888) [:1.7.0_09]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) [:1.7.0_09]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) [:1.7.0_09]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369) [:1.7.0_09]
at java.util.ArrayList.readObject(ArrayList.java:733) [:1.7.0_09]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0_09]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.7.0_09]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.7.0_09]
at java.lang.reflect.Method.invoke(Method.java:601) [:1.7.0_09]
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1004) [:1.7.0_09]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866) [:1.7.0_09]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) [:1.7.0_09]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) [:1.7.0_09]
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964) [:1.7.0_09]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888) [:1.7.0_09]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) [:1.7.0_09]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) [:1.7.0_09]
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1685) [:1.7.0_09]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1341) [:1.7.0_09]
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964) [:1.7.0_09]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888) [:1.7.0_09]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) [:1.7.0_09]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) [:1.7.0_09]
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964) [:1.7.0_09]
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:498) [:1.7.0_09]
at net.sf.jasperreports.engine.base.JRBaseReport.readObject(JRBaseReport.java:729) [jasperreports-4.5.1.jar:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0_09]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.7.0_09]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.7.0_09]
at java.lang.reflect.Method.invoke(Method.java:601) [:1.7.0_09]
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1004) [:1.7.0_09]
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866) [:1.7.0_09]
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) [:1.7.0_09]
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) [:1.7.0_09]
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369) [:1.7.0_09]
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:214) [jasperreports-4.5.1.jar:]

can anyone please tell me how to work with html components in jasper reports with some sample ?

prisalty's picture
Joined: Apr 1 2013 - 2:12am
Last seen: 6 years 6 months ago
Hi, Have you added the HTML component JAR to the classpath of your application that is running the reports? The JAR can be built from the /demo/samples/htmlcomponent either using the >ant jar command. I hope this helps. Teodor
teodord - 6 years 6 months ago
You can also grab the jar from the Jaspersoft Studio download. Just search for the htmlcomponent.jar once you've downloaded it.
ryan130724 - 6 years 6 months ago

0 Answers:

No answers yet
Feedback
randomness