aspose file tools
The moose likes BEA/Weblogic and the fly likes Jasper reports error in weblogic 8.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Reply Bookmark "Jasper reports error in weblogic 8.1" Watch "Jasper reports error in weblogic 8.1" New topic
Author

Jasper reports error in weblogic 8.1

Nick Potter
Ranch Hand

Joined: May 07, 2008
Posts: 125
Hello,

I'm using jasperreports 3.6.0 in weblogic 8.1. When I try to compile a report I'm getting:

net.sf.jasperreports.engine.JRRuntimeException: Error creating SAX parser
at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.createParser(JRReportSaxParserFactory.java:109)
at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createParser(JRXmlDigesterFactory.java:1320)
at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createDigester(JRXmlDigesterFactory.java:1295)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:199)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:164)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:148)
at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:85)
at report.ReportController.compileReport(ReportController.java:93)
at report.ReportController.doPost(ReportController.java:43)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


......

Caused by: org.xml.sax.SAXNotRecognizedException: http://java.sun.com/xml/jaxp/properties/schemaLanguage
at org.apache.xerces.framework.XMLParser.setProperty(XMLParser.java:1714)
at org.apache.xerces.parsers.SAXParser.setProperty(SAXParser.java:770)
at org.apache.xerces.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:190)
at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.configureParser(JRReportSaxParserFactory.java:140)
at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.createParser(JRReportSaxParserFactory.java:104)



Does anyone know how to solve this issue? Thanks.
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6588
    
    1

That property does not seem to be recognized by your version of sax. Which one are you using ? Did you try "http://java.sun.com/xml/properties/jaxp/schemaLanguage"


SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
Nick Potter
Ranch Hand

Joined: May 07, 2008
Posts: 125

I use xerces 1.4.4. But i don't know how to change the property.
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6588
    
    1

This link should be useful -> http://xerces.apache.org/xerces2-j/properties.html
Nick Potter
Ranch Hand

Joined: May 07, 2008
Posts: 125
I believe this is done in the back by weblogic (probably a conflict in the libs, since the jasper version is very new and xerces one is very old, yet i'm not able to find the correct jasper version for xerces 1.4.4). This is how my controller looks like:




This works on tomcat 6 and jboss 5. So it must be a jar conflict (or more). I don't know if the link you gave me helps in this matter because i don't see where I should insert the code.
Nick Potter
Ranch Hand

Joined: May 07, 2008
Posts: 125
New error, after trying with jasper 2.0.5:

net.sf.jasperreports.engine.JRException: No report compiler set for language : null
at net.sf.jasperreports.engine.JasperCompileManager.getCompiler(JasperCompileManager.java:508)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:219)
at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:135)
at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:94)

What's this?
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6588
    
    1

That error seems to be Jasper specific. Google churned up a few links when I searched. Here is one

http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=47369
Nick Potter
Ranch Hand

Joined: May 07, 2008
Posts: 125
I have a new error now. I'm trying to compile the jrxml in the servlet but i'm getting a filenotfoundexception:

my servlet uri is http://localhost:8080/tests/report.jsp

i have the file in tests/reports.

JasperCompileManager.compileReportToFile("reports/example.jrxml");

i've tried in different ways, with full server path, replacing / with \\, etc yet it doesn't find it. So how to i put the path to the file relative to the server? if i hardcode it (C:\\server\\....) it finds it...
Nick Potter
Ranch Hand

Joined: May 07, 2008
Posts: 125
Nevermind, i got it

Thanks for the help
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6588
    
    1

Nick Potter wrote:Nevermind, i got it

Thanks for the help


I am glad that you solved the problem. Can you share your solution with us so that others will also benefit from it ? Thanks
Nick Potter
Ranch Hand

Joined: May 07, 2008
Posts: 125
Sure, here it is:
JasperCompileManager.compileReportToFile(getServletContext().getRealPath("/jsp/example.jrxml"));

my jrxml was in the application on the server/jsp
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6588
    
    1

Thank you
 
I agree. Here's the link: jrebel
 
subject: Jasper reports error in weblogic 8.1
 
Similar Threads
compileing .jrxml file
Jasper Report Error
Jasper and JBoss server
Jasper Reports Error
jasper report error