2004 IR Help Posted August 21, 2006 Share Posted August 21, 2006 By: bst05 - bsharp05 Solaris - jasper file as par in fillReport 2005-02-10 07:22 Hi, I am having a lot of trouble trying to get jasperreports to work under a unix environment (Solaris 5.9). I am using weblogic 8.1 as my app server. <b>Some Background Info: </b> Initially, i was loading the .jrxml file, then compiling it using the JasperCompileManager (JasperReport jasperReport=JasperCompileManager.compileReport(jasperDesign);). This worked fine under winxp, but failed miserably when it was moved over to solaris. I realize this is because my classpath is not being resolved properly, but couldn't get this to work and tried to work around it. <b>What i tried instead:</b> So, instead of having to compile the report in my application itself, i realised that the JasperFillManager.fillReport method can also accept a .jasper file instead of a JasperReport object. I tried this, and it worked great....on a windows machine (where the .jasper file was created using JasperAssistant). Now, when i moved this back over to the sun server, i get a null pointer error at the following line: JasperPrint jasperPrint = JasperFillManager.fillReport(file, parameters,conn ); Why does this happen!?!? I have verified that the file is actually there, so that's not the reason it's dying. I thought that since jasperreports is 100% java, the "comipled" jasper file should be able to run under any OS. Is there something that I am missing?? How can I get around this problem? I have tried just about everything, and need to get this to work very soon. Thanks, BST. By: bst05 - bsharp05 RE: Solaris - jasper file as par in fillRepor 2005-02-11 11:23 I still haven't been able to get the reports working on solaris... Just some more information, the report i am trying to generate has a subreport. I pass the location to the subreport's .jasper file as a parameter to the parent report so that i don't have to hardcode the location. I have verified that the file is in the correct location. Can someone give me some hints as to how to get this to work? Thannks. By: bst05 - bsharp05 RE: Solaris - jasper file as par in fillReport 2005-02-10 14:59 Ok. So i have got the classpath problems figured out, and am now able to compile the .jrxml file without any trouble. Unfortunately, i am still stuck at the same spot as before. It dies on the 3rd line below: JasperDesign jasperDesign = JRXmlLoader.load(file); JasperReport jasperReport=JasperCompileManager.compileReport(jasperDesign); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters,conn ); Again, this works fine under windows (dev), but dies when put on solaris (staging server). I have the following jasperreports related jars in my classpath: commons-beanutils-1-5.jar commons-collections-2.1.jar commons-digester-1.3.jar commons-logging-1.0.2.jar commons-logging.jar commons-logging-api-1.0.2.jar itext-1.01.jar jasperreports-0.6.3.jar jcommon-0.9.4.jar jfreechart-0.9.19.jar log4j-1.2.8.jar xerces.jar Unfortunately, there are no error messages being displayed after this either. What is needed to get this to work under solaris!? Please help, BST. By: oscar_vazquez - vazquezo RE: Solaris - jasper file as par in fillRepor 2005-04-22 12:16 bsharp05 I have the same situation, and I hope someone could help, I will really appreciate Link to comment Share on other sites More sharing options...
bosko Posted January 24, 2007 Share Posted January 24, 2007 Hi, I have the same issue whithout solution.An idea ? Gregory Link to comment Share on other sites More sharing options...
niobe Posted April 13, 2007 Share Posted April 13, 2007 Same problem. Can anyone help? It works on my Windows machine, and even on a solaris machine. but fails to work on another solaris machine. Please respond. Link to comment Share on other sites More sharing options...
teodord Posted April 18, 2007 Share Posted April 18, 2007 Hi, Set the -Djava.awt.headless=true property when you launch the JVM. I hope this helps.Teodor 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