2005 IR Help Posted August 27, 2006 Share Posted August 27, 2006 By: KHollister - khollister Question about Webapp sample 2004-08-16 10:55 Hi, What I'm trying to accomplish is to write an applet that will allow the end user to print a report on their local printer. From what I can see, the PrinterApplet in the webapps sample will do this. I've taken the code for this applet and modified it slightly, as I don't want the end users to see the report. I can compile the code just fine, and everything seems to be fine when I run the HTML file in appletviewer -- but when I click on the Print button, I get the following error: java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/util/JRLoader at PrinterApplet.btnPrintActionPerformed(PrinterApplet.java:133) at PrinterApplet.access$000(PrinterApplet.java:14) at PrinterApplet$1.actionPerformed(PrinterApplet.java:72) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245) at java.awt.Component.processMouseEvent(Component.java:5100) at java.awt.Component.processEvent(Component.java:4897) at java.awt.Container.processEvent(Container.java:1569) at java.awt.Component.dispatchEventImpl(Component.java:3615) at java.awt.Container.dispatchEventImpl(Container.java:1627) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128) at java.awt.Container.dispatchEventImpl(Container.java:1613) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) I have jasperreports-0.6.0.jar and jasperreports-0.6.0-applet.jar in my classpath, so I am a bit confused about the "Class not found" error. I've also tried running the original applet, and I get the error "java.security.AccessControlException: access denied". Could someone point me in the right direction? I apologize in advance for my newbie status when it comes to applets.... Thank you, Ken Hollister By: shunbeii - shunbeii RE: Question about Webapp sample 2004-09-12 19:56 hi, i'm not sure if this applies to you too. i've got a similar error (java.lang.NoClassDefFoundError) when trying to make webapp run.. i tried including the .jar file in the tomcat/commons/lib directory and then the error msg changed (to another error). so maybe you could trying the same way.. and by the way, this is my current error, but nothing seems to help... StandardWrapperValve[PdfServlet]: Servlet.service() for servlet PdfServlet threw exception java.lang.NoClassDefFoundError at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:151) at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:353) at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:293) at dori.jasper.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:284) at servlets.PdfServlet.service(PdfServlet.java:110) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644) at java.lang.Thread.run(Unknown Source) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now