Jump to content
We've recently updated our Privacy Statement, available here ×

trouble with "null"-properties


tom_abv

Recommended Posts

Hello Jasper's!

Since I got the new Version of iReport , I have always troubles when I open an existing and saved Report, wich worked without any problems. After opening, some of the properties have "null"-values, which makes, that the Report is not executable. The Problem is only visible in the XML-view, here an example:

   <staticText>
     <reportElement key="BSP-Ueb" mode="Transparent" x="48" y="40" width="256" height="46" forecolor="#003F87" backcolor="#FFFFFF"/>
     <box>
      <topPen lineWidth="0.0" lineColor="#000000"/>
      <leftPen lineWidth="0.0" lineColor="#000000"/>
      <bottomPen lineWidth="0.0" lineColor="#000000"/>
      <rightPen lineWidth="0.0" lineColor="#000000"/>
     </box>
     <textElement textAlignment="null" rotation="None" lineSpacing="Single">
      <font fontName="GI16-Medium" size="30" isBold="false" isItalic="true" isUnderline="false" isStrikeThrough="false" pdfFontName="GI16MedIta.ttf" pdfEncoding="Cp1252" isPdfEmbedded="true"/>
     </textElement>
     <text><![CDATA[bausparvertrag]]></text>
    </staticText>
    <image hAlign="null" isUsingCache="false">
     <reportElement key="logo" mode="Opaque" x="349" y="17" width="199" height="83" forecolor="#000000" backcolor="#FFFFFF"/>
     <box>
      <topPen lineWidth="0.0" lineColor="#000000"/>
      <leftPen lineWidth="0.0" lineColor="#000000"/>
      <bottomPen lineWidth="0.0" lineColor="#000000"/>
      <rightPen lineWidth="0.0" lineColor="#000000"/>
     </box>
     <graphicElement fill="Solid"/>
     <imageExpression class="java.io.InputStream"><![CDATA[$F{LOGO}]]></imageExpression>
    </image>

 When I switch back in the Designer-View i get the following error

Error loading the report template
Message:
    net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: cvc-enumeration-valid: Value 'null' is not facet-valid with respect to enumeration '[Left, Center, Right, Justified]'. It must be a value from the enumeration.
Level:
    SEVERE
Stack Trace:
org.xml.sax.SAXParseException: cvc-enumeration-valid: Value 'null' is not facet-valid with respect to enumeration '[Left, Center, Right, Justified]'. It must be a value from the enumeration.
    net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:243)
    net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226)
    net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214)
    com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:73)
    com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:512)
    org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
    org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
cvc-enumeration-valid: Value 'null' is not facet-valid with respect to enumeration '[Left, Center, Right, Justified]'. It must be a value from the enumeration.
    com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
    com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
    com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
    com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
    com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:429)
    com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3185)
    com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processOneAttribute(XMLSchemaValidator.java:2799)
    com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processAttributes(XMLSchemaValidator.java:2735)
    com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2094)
    com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)
    com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:330)
    com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
    com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
    com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
    com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
    com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
    com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
    org.apache.commons.digester.Digester.parse(Digester.java:1647)
    net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:239)
    net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226)
    net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214)
    com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:73)
    com.jaspersoft.ireport.designer.JrxmlVisualView.run(JrxmlVisualView.java:512)
    org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
    org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)

This are the Details of my Installation:

Produktversion: iReport 3.5.2

Java: 1.5.0_07; Java HotSpot Client VM 1.5.0_07-b03

System: Windows XP Version 5.1 läuft auf x86; UTF-8; de_AT (ireport) )

 

 

Please help me

TOM

Austria

 

 

 

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Dear Giulio,

 

I am also facing this issue very frequently. it displays the below error while opening a saved report:

 

"Error loading the report template:

org.xml.sax.SAXParseException: cvc-enumeration-valid: Value 'null' is not facet-valid with respect to enumeration '[stretch, Prevent, Immediate]'. It must be a value from the enumeration."

 

Please help as this is coming very often during development.

Link to comment
Share on other sites

  • 2 months later...

 

Hi,

I did face this problem sometime ago.  It's a bug in ireport 3.5.0.

Solution: Open the JRXML in notepad/wordpad, Provide a value to the 'textAlignment' property (select this value for the list of values displayed) like

<textElement textAlignment="Left" rotation="None" lineSpacing="Single">

Save it and then open in 3.5. It works. Later you can change to whatever value u want.

However, v2.04 works without this fix!



Post Edited by anthonyraj at 10/08/2009 14:07
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...