Olá,
Estou criando um relatório e gostaria de executar um gráfico METER do iReport… bom o relatório funcionou perfeitamente… acontece que quando vou executar ele no sistema ela traz o seguinte erro…
[quote]0 [AWT-EventQueue-0] ERROR digester.Digester - Parse Error at line 181 column 17: Element type “meterChart” must be declared.
org.xml.sax.SAXParseException: Element type “meterChart” must be declared.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1647)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:238)
at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:225)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:213)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:167)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:151)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:142)
at relatorios.gera_relatorios.gera_notas(gera_relatorios.java:140)
at graficos.grafico.jButton49ActionPerformed(grafico.java:5105)
at graficos.grafico.access$10100(grafico.java:116)
at graficos.grafico$103.actionPerformed(grafico.java:4929)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:5501)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
at java.awt.Component.processEvent(Component.java:5266)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3968)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1778)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
[/quote]
o codigo que uso para gerar o documento é o seguinte…
[code]public static void gera_notas(String arquivo, int parametro_inteiro){
JasperReport relatorio = null;
try {
relatorio = JasperCompileManager.compileReport(arquivo);
} catch (JRException ex) {
ex.printStackTrace();
}
try {
banco.init();
Connection conn;
try {
conn = banco.getConnection();
Statement stat = conn.createStatement();
Map parametros = new HashMap();
parametros.put("mes",new Integer(parametro_inteiro));
JasperPrint Impressao = null;
try {
System.out.println("teste");
Impressao = JasperFillManager.fillReport(relatorio, parametros, conn);
} catch (JRException ex) {
ex.printStackTrace();
}
JasperViewer view = new JasperViewer(Impressao, false);
view.show();
} catch (SQLException ex) {
ex.printStackTrace();
}
} catch (ClassNotFoundException ex) {
ex.printStackTrace();
} catch (IOException ex) {
ex.printStackTrace();
}
}[/code]
Desde já agradeço…