Jump to content
Changes to the Jaspersoft community edition download ×

Help: JRException: Attribute "class" with val


Recommended Posts

By: Ade Panko - adepanko

Help: JRException: Attribute "class" with val

2002-08-20 15:30

I've been playing around with Jasper for a couple of weeks and really like it. However, whenever I create a report with the designer, I'm unable to later reload it into the designer, I get a "Error at (-1, -1:null)" stop screen.

 

Also, whenever I attempt to compile the generated .xml file, I get the following error (sorry to paste such a long message). I checked all my java.lang. datatypes and they are as requested in the message below.

 

All sample reports work well. Modified xml based reports also work without this problem.

 

Thanx in advance, as I'm sure others have seen and gotten beyond this error in the past. (Long live Jasper!!)

 

Buildfile: build.xml

 

compile:

[java] Parse Error at line -1 column -1: Attribute "class" with value "dori

.jasper.engine.JRDataSource" must have a value from the list "java.lang.Boolean

java.lang.Byte java.util.Date java.sql.Timestamp java.lang.Double java.lang.Floa

t java.lang.Integer java.lang.Long java.lang.Short java.math.BigDecimal java.lan

g.String ".

[java] org.xml.sax.SAXParseException: Attribute "class" with value "dori.ja

sper.engine.JRDataSource" must have a value from the list "java.lang.Boolean jav

a.lang.Byte java.util.Date java.sql.Timestamp java.lang.Double java.lang.Float j

ava.lang.Integer java.lang.Long java.lang.Short java.math.BigDecimal java.lang.S

tring ".

[java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExce

ption(ErrorHandlerWrapper.java:223)

[java] at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandler

Wrapper.java:170)

[java] at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorR

eporter.java:363)

[java] at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorR

eporter.java:297)

[java] at org.apache.xerces.impl.dtd.XMLDTDValidator.validateDTDattribu

te(XMLDTDValidator.java:2042)

[java] at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrs

AndValidate(XMLDTDValidator.java:1960)

[java] at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement

(XMLDTDValidator.java:2629)

[java] at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDT

DValidator.java:782)

[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSta

rtElement(XMLDocumentFragmentScannerImpl.java:747)

[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragmen

tContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1445)

[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDoc

ument(XMLDocumentFragmentScannerImpl.java:328)

[java] at org.apache.xerces.parsers.StandardParserConfiguration.parse(S

tandardParserConfiguration.java:479)

[java] at org.apache.xerces.parsers.StandardParserConfiguration.parse(S

tandardParserConfiguration.java:521)

[java] at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:148)

 

[java] at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAX

Parser.java:972)

[java] at org.apache.commons.digester.Digester.parse(Digester.java:1206

)

[java] org.xml.sax.SAXParseException: Attribute "class" with value "dori.ja

sper.engine.JRDataSource" must have a value from the list "java.lang.Boolean jav

a.lang.Byte java.util.Date java.sql.Timestamp java.lang.Double java.lang.Float j

ava.lang.Integer java.lang.Long java.lang.Short java.math.BigDecimal java.lang.S

tring ".

[java] at dori.jasper.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:4

98)

[java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExce

ption(ErrorHandlerWrapper.java:223)

[java] at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandler

Wrapper.java:170)

[java] at dori.jasper.engine.xml.JRXmlLoader.load(JRXmlLoader.java:286)

 

[java] at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorR

eporter.java:363)

[java] at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorR

eporter.java:297)

[java] at dori.jasper.engine.JasperCompileManager.compileReportToFile(J

asperCompileManager.java:49)

[java] at ProductApp.main(ProductApp.java:82)

[java] at org.apache.xerces.impl.dtd.XMLDTDValidator.validateDTDattribu

te(XMLDTDValidator.java:2042)

[java] at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrs

AndValidate(XMLDTDValidator.java:1960)

[java] at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement

(XMLDTDValidator.java:2629)

[java] at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDT

DValidator.java:782)

[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSta

rtElement(XMLDocumentFragmentScannerImpl.java:747)

[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragmen

tContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1445)

[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDoc

ument(XMLDocumentFragmentScannerImpl.java:328)

[java] at org.apache.xerces.parsers.StandardParserConfiguration.parse(S

tandardParserConfiguration.java:479)

[java] at org.apache.xerces.parsers.StandardParserConfiguration.parse(S

tandardParserConfiguration.java:521)

[java] at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:148)

 

[java] at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAX

Parser.java:972)

[java] at org.apache.commons.digester.Digester.parse(Digester.java:1206

)

[java] at dori.jasper.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:4

98)

[java] at dori.jasper.engine.xml.JRXmlLoader.load(JRXmlLoader.java:286)

 

[java] at dori.jasper.engine.JasperCompileManager.compileReportToFile(J

asperCompileManager.java:49)

[java] at ProductApp.main(ProductApp.java:82)

 

[java] NESTED BY :

[java] org.xml.sax.SAXParseException: Attribute "class" with value "dori.ja

sper.engine.JRDataSource" must have a value from the list "java.lang.Boolean jav

a.lang.Byte java.util.Date java.sql.Timestamp java.lang.Double java.lang.Float j

ava.lang.Integer java.lang.Long java.lang.Short java.math.BigDecimal java.lang.S

tring ".

[java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExce

ption(ErrorHandlerWrapper.java:223)

[java] at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandler

Wrapper.java:170)

[java] at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorR

eporter.java:363)

[java] at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorR

eporter.java:297)

[java] at org.apache.xerces.impl.dtd.XMLDTDValidator.validateDTDattribu

te(XMLDTDValidator.java:2042)

[java] at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrs

AndValidate(XMLDTDValidator.java:1960)

[java] at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement

(XMLDTDValidator.java:2629)

[java] at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDT

DValidator.java:782)

[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanSta

rtElement(XMLDocumentFragmentScannerImpl.java:747)

[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragmen

tContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1445)

[java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDoc

ument(XMLDocumentFragmentScannerImpl.java:328)

[java] at org.apache.xerces.parsers.StandardParserConfiguration.parse(S

tandardParserConfiguration.java:479)

[java] at org.apache.xerces.parsers.StandardParserConfiguration.parse(S

tandardParserConfiguration.java:521)

[java] at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:148)

 

[java] at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAX

Parser.java:972)

[java] at org.apache.commons.digester.Digester.parse(Digester.java:1206

)

[java] at dori.jasper.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:4

98)

[java] at dori.jasper.engine.xml.JRXmlLoader.load(JRXmlLoader.java:286)

 

[java] at dori.jasper.engine.JasperCompileManager.compileReportToFile(J

asperCompileManager.java:49)

[java] at ProductApp.main(ProductApp.java:82)

 

[java] NESTED BY :

[java] dori.jasper.engine.JRException: Attribute "class" with value "dori.j

asper.engine.JRDataSource" must have a value from the list "java.lang.Boolean ja

va.lang.Byte java.util.Date java.sql.Timestamp java.lang.Double java.lang.Float

java.lang.Integer java.lang.Long java.lang.Short java.math.BigDecimal java.lang.

String ".

[java] at dori.jasper.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:5

18)

[java] at dori.jasper.engine.xml.JRXmlLoader.load(JRXmlLoader.java:286)

 

[java] at dori.jasper.engine.JasperCompileManager.compileReportToFile(J

asperCompileManager.java:49)

[java] at ProductApp.main(ProductApp.java:82)

[java] Java Result: 1

 

 

Thanx.

Ade.

 

 

By: Teodor Danciu - teodord

RE: Help: JRException: Attribute "class" with val

2002-08-21 00:04

 

Hi,

 

Are you sure you don't have a text field in your

XML report design for which you have wrote this:

 

class="dori.jasper.engine.JRDataSource"

 

As you can see from the exception message,

all the possible values for this "class" attribute

are listed.

 

I hope this helps.

Teodor

 

 

 

By: Ade Panko - adepanko

RE: Help: JRException: Attribute "class" with val

2002-08-22 07:48

Teodor, thank you very much. Your suggestion worked. I had put that in the report as a report parameter to see what value it would print.

 

I'm gaining a better understanding of Jasper and exceptions.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...