manz_jasper Posted January 10, 2007 Share Posted January 10, 2007 Hi, I'm new comer in jasper report, its nice. I success for deploying the example to my tomcat 6.0 server and explore it, but, unfortunately, when i trying using applet (from sample) to print-out to the printer it has message : Error printing report. See the console for details. Can anyone resolve this? Thank you. size=347]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/errorapplet.JPG Link to comment Share on other sites More sharing options...
manz_jasper Posted January 10, 2007 Author Share Posted January 10, 2007 Continue to first problem. And also when print it out from http://localhost:8080/jasper-webapp/printer.html And click the print the report button, its same, has an error :---------------java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.awt.windows)---------------I attach the image, but maybe you can't see the full error. after we surf, we found the solution to put the permission java.lang.RuntimePermission "accessClassInPackage.sun.awt.windows"; grant codeBase "http://localhost:8080/jasper-webapp/applets/*" { permission java.lang.RuntimePermission "accessClassInPackage.sun.awt.windows";}; in catalina.policy because we use the tomcat 6.x, but still no effect and didn't resolve this problem. Anyone can help ? size=400]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/errorapplet3_copy.jpgPost edited by: manz_jasper, at: 2007/01/10 07:04 Link to comment Share on other sites More sharing options...
anandharaj Posted January 11, 2007 Share Posted January 11, 2007 It would be nice if you send me the Full Error messages / Logs msg Link to comment Share on other sites More sharing options...
manz_jasper Posted January 11, 2007 Author Share Posted January 11, 2007 Thanks for respond. This full error displayed when i use tomcat standard server configuration. java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.awt.windows)at java.security.AccessControlContext.checkPermission(Unknown Source)at java.security.AccessController.checkPermission(Unknown Source)at java.lang.SecurityManager.checkPermission(Unknown Source)at java.lang.SecurityManager.checkPackageAccess(Unknown Source)at sun.applet.AppletSecurity.checkPackageAccess(Unknown Source)at java.lang.Class.checkMemberAccess(Unknown Source)at java.lang.Class.getMethod(Unknown Source)at net.sf.jasperreports.engine.print.JRPrinterAWT.initPrinterJobFields(JRPrinterAWT.java:273)at net.sf.jasperreports.engine.print.JRPrinterAWT.printPages(JRPrinterAWT.java:140)at net.sf.jasperreports.engine.print.JRPrinterAWT.printPages(JRPrinterAWT.java:88)at net.sf.jasperreports.engine.JasperPrintManager.printPages(JasperPrintManager.java:348)at net.sf.jasperreports.engine.JasperPrintManager.printReport(JasperPrintManager.java:239)at PrinterApplet$3.run(PrinterApplet.java:185)at java.lang.Thread.run(Unknown Source) But, after im add the permission java.lang.RuntimePermission "accessClassInPackage.sun.awt.windows"; grant codeBase "http://localhost:8080/jasper-webapp/applets/*" { permission java.lang.RuntimePermission "accessClassInPackage.sun.awt.windows"; }; in catalina.policy and restart with :1. catalina start the error displayed same result. 2. catalina start -security its display error : net.sf.jasperreports.engine.JRException: Error loading object from URL: http://localhost:8080/jasper-webapp/servlets/jasperprintat net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:145)at EmbeddedViewerApplet.init(EmbeddedViewerApplet.java:70)at sun.applet.AppletPanel.run(Unknown Source)at java.lang.Thread.run(Unknown Source)Caused by: java.io.StreamCorruptedException: invalid stream headerat java.io.ObjectInputStream.readStreamHeader(Unknown Source)at java.io.ObjectInputStream.<init>(Unknown Source)at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:140)... 3 morePost edited by: manz_jasper, at: 2007/01/11 05:50 Link to comment Share on other sites More sharing options...
manz_jasper Posted January 12, 2007 Author Share Posted January 12, 2007 .: SOLVED :. Post edited by: manz_jasper, at: 2007/01/12 08:36 Link to comment Share on other sites More sharing options...
anandharaj Posted January 12, 2007 Share Posted January 12, 2007 Hi... Instead you post that your problems solved, it would be better to post what you did to solve the problem. So that other people know what need to be done if they facing same problem. 10q Link to comment Share on other sites More sharing options...
manz_jasper Posted January 15, 2007 Author Share Posted January 15, 2007 Sorry anandharaj,when we staying in forum and watching some people respond including you, we trying every clue to resolve this problem. Fortunately, change setting in java.policy or catalina.policy to add the grant codeBase and setting runtime permission and also restart the tomcat server, that make me success to resolve this problem. Anyway, thanks. 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