This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes Problem: Jasper Report 3.7.2 and Oracle JDeveloper 11g Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Problem: Jasper Report 3.7.2 and Oracle JDeveloper 11g" Watch "Problem: Jasper Report 3.7.2 and Oracle JDeveloper 11g" New topic
Author

Problem: Jasper Report 3.7.2 and Oracle JDeveloper 11g

Sulaiman Malik
Greenhorn

Joined: Apr 12, 2010
Posts: 25
I am having the problem with jasper report 3.7.2 and using in Oracle JDeveloper 11g. I made the report in IReport 3.7.2 and calling it from by writing the java code in Oracle JDeveloper 11g. and i am getting an exception when i run it from Oracle JDeveloper 11g. I need an urgent help on this exception may be i am missing some Jar Files or not using the rite jar files. The exception is given below. You can see the bold ones, the rest are the details of the exception

net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'html'.
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:245)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:228)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:216)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:170)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:154)
at net.sf.jasperreports.engine.JasperManager.loadXmlDesign(JasperManager.java:967)
at jsp_servlet._fas.__samplereport._jspService(__samplereport.java:83)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'html'.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1915)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:626)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3103)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:922)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:133)
at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:173)
at org.apache.commons.digester.Digester.parse(Digester.java:1745)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:241)

and SomeTimes this :

net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:245)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:228)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:216)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:170)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:154)
at net.sf.jasperreports.engine.JasperManager.loadXmlDesign(JasperManager.java:967)
at jsp_servlet._fas.__samplereport._jspService(__samplereport.java:83)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:416)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:326)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1039)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:133)
at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:173)
at org.apache.commons.digester.Digester.parse(Digester.java:1745)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:241)
... 25 more
I need an urgent help....
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Looks like it's trying to load an HTML document, is this the behaviour you're expecting?


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Agreed--are you feeding it a valid report XML file?
Sulaiman Malik
Greenhorn

Joined: Apr 12, 2010
Posts: 25
@Martijn Verburg...Yeah, i am exporting it to Html File.
Sulaiman Malik
Greenhorn

Joined: Apr 12, 2010
Posts: 25
@David Newton, yeah i am feeding a correct XML, i made the sample report through wizard and calling that report from a java code written in Oracle JDevelopr 11g
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I don't believe you :) Jasper is trying to load a file with HTML in it:So perhaps post the relevant portions of the JSP (this should be done in Java, not in a JSP) that is creating the report.
Sulaiman Malik
Greenhorn

Joined: Apr 12, 2010
Posts: 25
@David Newton... i am writing the java code in a jsp file by using the scriplets....
well i will try this out also by making a java file and write the code in java file.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Ah, that explains it. Look at the Javadocs for JasperExportManager:

exportReportToHtmlFile(JasperPrint, String)
exportReportToHtmlFile(String, String)
exportReportToHtmlFile(String)

And hope you have a backup. And trust us, and the exception message, when we all say the same thing :)
Sulaiman Malik
Greenhorn

Joined: Apr 12, 2010
Posts: 25
@David Newton...ok David i will look at the java docs and will let you know for this.
Sulaiman Malik
Greenhorn

Joined: Apr 12, 2010
Posts: 25
@David Newton....i have also made the java file but still an exception.....one thing more it is not compiling the report, it throws the exception during the compilation of the report so one thing is for sure that it is not compiling the report
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Come on: pay attention to what you're doing. *Look* at the documentation; I provided links. Destination file... *destination* file. You're right, it's *not* compiling the report, and two people and the documentation have told you why not.Now do you see?
Sulaiman Malik
Greenhorn

Joined: Apr 12, 2010
Posts: 25
@David Newton...its done i have missed a little point now its done...thnx a lot
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

No problem--glad you figured it out :) Seeing stuff like that can be tricky sometimes, especially when things aren't refactored and easy to read. Almost any time I see any repeated code I try to eliminate it, making this kind of error more difficult to make.
Sulaiman Malik
Greenhorn

Joined: Apr 12, 2010
Posts: 25
@David Newton...yeah you are right, there is always a little problem left which is a little difficult to figured it out...I was stuck in this problem from the last 2 days,but i am glad now it is solved out...so much thanks David. Will be looking forward for more help from you if any needed.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem: Jasper Report 3.7.2 and Oracle JDeveloper 11g
 
Similar Threads
cannot pass to value to a jasper parameter
org.xml.sax.SAXParseException: The content of element type "forward" must match" Please help
using JSTL in ICEFaces
javax.net.ssl.SSLKeyException: [Security:090504]Certificate chain received from
Error loading the report template: org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute