Jump to content

The tag keepTogether does not compile


brotelle

Recommended Posts

 Hello,

 

I posted a few days before but did not have any answer... hope to have more luck this time :P

I get something really strange, I create a report using jasperReport, and I use the flag keepTogether on a group header. When I preview it on the software, it works but when I use the report in my application, the jrxml does not compile and I get the error enclosed in the code part.

 

Does anyone know why this is happening ?

 

Thanks

 

 

Code:
org.apache.commons.digester.Digester - Digester.java:1538 - Parse Error at line 60 column 46: <Line 60, Column 46>: XML-24535: (Error) Attribute 'keepTogether' not expected.org.xml.sax.SAXParseException: <Line 60, Column 46>: XML-24535: (Error) Attribute 'keepTogether' not expected.	at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:441)	at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:303)	at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:290)	at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:195)	at org.apache.commons.digester.Digester.parse(Digester.java:1647)	at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:235)	at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:222)	at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:210)	at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:164)	at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:148)
Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

I'm curious if you have figured out an answer to this yet or not.  By the looks of your stack trace:

oracle.xml.parser.v2.XMLParser

It looks like in your application you're using a different XML parsing and that Jasper's internal engine is now also using within your application. That is one key difference as to why it could be giving you errors.

 



Post Edited by frankhassanabad at 10/31/2011 23:21
Link to comment
Share on other sites

 Hello,

 

Thanks for your answer, i have not figured this out yet. To parse my xml in my application, i use jasper jar. The only thing that I can see is that maybe I don't have the last version of this jar ? do you know where I can download it ?

 

Thanks

Link to comment
Share on other sites

Yea, you can grab the latest from:

http://sourceforge.net/projects/jasperreports/files/jasperreports/

However, looking at your stack trace it appears that another jar has taken over your SAX parsing.  Jasper probably uses all factories to create and get its XML parsing implementations that are on its class path.  If an Oracle SAX parser is configured to be the default implementation, then Jasper will use that.  If not, then it will use whatever the default java one is.

I would suggest checking your classpath and figuring out which jar(s) are taking over the SAX parsing as that implementation might be what's causing your issues.



Post Edited by frankhassanabad at 11/01/2011 15:18
Link to comment
Share on other sites

I have made some tests and it appears that the problem is that the jar I use on my application is really old compared to my version of iReport, the tag keepTogether is not in the xsd.

But at this time I cannot upgrade this jar because it is not compatible with my version of java which is 1.5...

 

Thanks for your help

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...