Error compiling report

Developers
2008-10-03
2014-03-21
  • Humberto Perdomo

    Hi everybody

    I want to modify the chartsales report, for this I use iReport. When I compile the report I get these errors:

    Compiling to file... ./chartsales.jasper -> /opt/iReport-2.0.3/bin/chartsales.java
    Errors compiling ./chartsales.jasper.
    net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
    1. com.openbravo.data.loader.ImageUtils cannot be resolved to a type
                      value = (java.awt.Image)(com.openbravo.data.loader.ImageUtils.readImageFromResource("/com/openbravo/images/poweredby.png"));//$JR_EXPR_ID=8$
                                                                <---------------------------------->
    2. com.openbravo.format.Formats.DATE cannot be resolved to a type
                      value = (java.lang.String)(com.openbravo.format.Formats.DATE.formatValue((java.util.Date)((Object[])((Object[])((java.lang.Object)parameter_ARG.getValue()))[0])[1]));//$JR_EXPR_ID=10$                                            <------------------------------->
    3. com.openbravo.format.Formats.DATE cannot be resolved to a type
                      value = (java.lang.String)(com.openbravo.format.Formats.DATE.formatValue((java.util.Date)((Object[])((Object[])((java.lang.Object)parameter_ARG.getValue()))[0])[3]));//$JR_EXPR_ID=11$                                            <------------------------------->
    4. com.openbravo.data.loader.ImageUtils cannot be resolved to a type
                      value = (java.awt.Image)(com.openbravo.data.loader.ImageUtils.readImageFromResource("/com/openbravo/images/poweredby.png"));//$JR_EXPR_ID=8$
                                                                <---------------------------------->
    5. com.openbravo.format.Formats.DATE cannot be resolved to a type
                      value = (java.lang.String)(com.openbravo.format.Formats.DATE.formatValue((java.util.Date)((Object[])((Object[])((java.lang.Object)parameter_ARG.getValue()))[0])[1]));//$JR_EXPR_ID=10$                                            <------------------------------->
    6. com.openbravo.format.Formats.DATE cannot be resolved to a type
                      value = (java.lang.String)(com.openbravo.format.Formats.DATE.formatValue((java.util.Date)((Object[])((Object[])((java.lang.Object)parameter_ARG.getValue()))[0])[3]));//$JR_EXPR_ID=11$                                            <------------------------------->
    7. com.openbravo.data.loader.ImageUtils cannot be resolved to a type
                      value = (java.awt.Image)(com.openbravo.data.loader.ImageUtils.readImageFromResource("/com/openbravo/images/poweredby.png"));//$JR_EXPR_ID=8$
                                                                <---------------------------------->
    8. com.openbravo.format.Formats.DATE cannot be resolved to a type
                      value = (java.lang.String)(com.openbravo.format.Formats.DATE.formatValue((java.util.Date)((Object[])((Object[])((java.lang.Object)parameter_ARG.getValue()))[0])[1]));//$JR_EXPR_ID=10$                                            <------------------------------->
    9. com.openbravo.format.Formats.DATE cannot be resolved to a type
                      value = (java.lang.String)(com.openbravo.format.Formats.DATE.formatValue((java.util.Date)((Object[])((Object[])((java.lang.Object)parameter_ARG.getValue()))[0])[3]));//$JR_EXPR_ID=11$                                            <------------------------------->

    9 errors     at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:193)     
    at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:588)     
    at java.lang.Thread.run(Thread.java:619)
    Compilation running time: 169.

    I just opened the file chartsales.jrxml and compiled it. Can anybody help me?

    Thanks in advance.

     
    • Adrián Romero

      Adrián Romero - 2008-10-06

      Hello Humberto

      It is not possible to compile Openbravo POS inside a clean iReports installation because Openbravo POS reports make use of java Objects of Openbravo POS.

      You can do the trick adding openbravopos.jar and the .jar libraries of Openbravo POS to the classpath of iReport. To add .jar files to the classpath in iReport go to the menu option Options -> Classpath

      Saludos

      Adrián Romero.

       
      • Humberto Perdomo

        Thanks a lot Adrian, finally I could compile the reports without error.

         
      • Mitch

        Mitch - 2014-03-21

        Hi Adrian,
        how do i do this ? I added all *.jar from "C:\Program Files (x86)\unicentaopos-3.56\lib" in the classpath of iReport 4.5. But i do not get a connection. Can you help me please ?
        Thanks !

         
  • Randoll

    Randoll - 2011-11-24

    I'm having problems with the reports on unicenta pos, (openbravo based POS) the problem is: when i click one of the button of reports, they dont do anything, im working with a netbeans project with the source code, and i see tha the project hava 2 kind of version of jasper reports, 3.1… and 3.7… this right ? its normal ?

    in the console the exeption throws this:

    Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: net.sf.jasperreports.engine.component.DefaultComponentManager.setDesignConverter(Lnet/sf/jasperreports/engine/component/ComponentDesignConverter;)V
    at net.sf.jasperreports.components.ComponentsExtensionsRegistryFactory.<clinit>(ComponentsExtensionsRegistryFactory.java:98)

    if you helme….. thanks
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:161)
    at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:119)
    at net.sf.jasperreports.engine.util.ClassUtils.instantiateClass(ClassUtils.java:57)
    at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.instantiateRegistry(DefaultExtensionsRegistry.java:211)
    at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:188)
    at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:141)
    at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getRegistries(DefaultExtensionsRegistry.java:127)
    at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:104)
    at net.sf.jasperreports.engine.component.ComponentsEnvironment.findComponentBundles(ComponentsEnvironment.java:94)
    at net.sf.jasperreports.engine.component.ComponentsEnvironment.getCachedComponentBundles(ComponentsEnvironment.java:82)
    at net.sf.jasperreports.engine.component.ComponentsEnvironment.getComponentBundles(ComponentsEnvironment.java:70)
    at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.getSchemaLocations(JRReportSaxParserFactory.java:162)
    at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.configureParser(JRReportSaxParserFactory.java:143)
    at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.createParser(JRReportSaxParserFactory.java:108)
    at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createParser(JRXmlDigesterFactory.java:1138)
    at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createDigester(JRXmlDigesterFactory.java:1113)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:203)
    at com.openbravo.pos.reports.JPanelReport.init(JPanelReport.java:82)
    at com.openbravo.pos.reports.PanelReportBean.init(PanelReportBean.java:59)
    at com.openbravo.pos.forms.BeanFactoryScript.init(BeanFactoryScript.java:56)
    at com.openbravo.pos.forms.JRootApp.getBean(JRootApp.java:344)
    at com.openbravo.pos.forms.JPrincipalApp.showTask(JPrincipalApp.java:356)
    at com.openbravo.pos.forms.MenuPanelAction.actionPerformed(MenuPanelAction.java:46)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    at java.awt.Component.processMouseEvent(Component.java:6504)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
    at java.awt.Component.processEvent(Component.java:6269)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4860)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4686)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2713)
    at java.awt.Component.dispatchEvent(Component.java:4686)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
    at java.awt.EventQueue.access$000(EventQueue.java:101)
    at java.awt.EventQueue$3.run(EventQueue.java:666)
    at java.awt.EventQueue$3.run(EventQueue.java:664)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:680)
    at java.awt.EventQueue$4.run(EventQueue.java:678)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

     
  • benny adrianto

    benny adrianto - 2011-12-20

    Hello Mr. Jack Gerrard.

    This is me again..benny from indonesia…i was try to customize your source code using netbeans and i've run the program..but when i try to open one report it cannot opened at all…is this cause i using locale for indonesia or…i posted the error codes here :
    run:
    20 Des 11 15:32:42 com.openbravo.pos.forms.AppConfig init
    INFO: Reading configuration file: F:\Documents and Settings\User\unicentaopos.properties
    20 Des 11 15:32:44 com.openbravo.data.loader.PreparedSentence openExec
    INFO: Executing prepared SQL: SELECT VERSION FROM APPLICATIONS WHERE ID = ?
    20 Des 11 15:32:44 com.openbravo.data.loader.PreparedSentence openExec
    INFO: Executing prepared SQL: SELECT CONTENT FROM RESOURCES WHERE NAME = ?
    20 Des 11 15:32:44 com.openbravo.data.loader.StaticSentence openExec
    INFO: Executing static SQL: SELECT HOST, HOSTSEQUENCE, DATESTART, DATEEND FROM CLOSEDCASH WHERE MONEY = '415e8e45-9617-4222-83d0-c51183c60f5c'
    20 Des 11 15:32:44 com.openbravo.data.loader.PreparedSentence openExec
    INFO: Executing prepared SQL: UPDATE RESOURCES SET NAME = ?, RESTYPE = ?, CONTENT = ? WHERE NAME = ?
    20 Des 11 15:32:44 com.openbravo.data.loader.PreparedSentence openExec
    INFO: Executing prepared SQL: SELECT CONTENT FROM RESOURCES WHERE NAME = ?
    20 Des 11 15:32:44 com.openbravo.data.loader.StaticSentence openExec
    INFO: Executing static SQL: SELECT NAME FROM LOCATIONS WHERE ID = '0'
    20 Des 11 15:32:44 com.openbravo.data.loader.StaticSentence openExec
    INFO: Executing static SQL: SELECT ID, NAME, APPPASSWORD, CARD, ROLE, IMAGE FROM PEOPLE WHERE VISIBLE = 1
    20 Des 11 15:32:44 com.openbravo.data.loader.PreparedSentence openExec
    INFO: Executing prepared SQL: SELECT CONTENT FROM RESOURCES WHERE NAME = ?
    20 Des 11 15:32:46 com.openbravo.data.loader.PreparedSentence openExec
    INFO: Executing prepared SQL: SELECT PERMISSIONS FROM ROLES WHERE ID = ?
    20 Des 11 15:32:46 com.openbravo.data.loader.PreparedSentence openExec
    INFO: Executing prepared SQL: SELECT CONTENT FROM RESOURCES WHERE NAME = ?
    20 Des 11 15:32:46 com.openbravo.data.loader.PreparedSentence openExec
    INFO: Executing prepared SQL: SELECT CONTENT FROM RESOURCES WHERE NAME = ?
    20 Des 11 15:32:46 com.openbravo.data.loader.PreparedSentence openExec
    INFO: Executing prepared SQL: SELECT CONTENT FROM RESOURCES WHERE NAME = ?
    20 Des 11 15:32:46 com.openbravo.data.loader.PreparedSentence openExec
    INFO: Executing prepared SQL: SELECT CONTENT FROM RESOURCES WHERE NAME = ?
    20 Des 11 15:32:46 com.openbravo.data.loader.PreparedSentence openExec
    INFO: Executing prepared SQL: SELECT CONTENT FROM RESOURCES WHERE NAME = ?
    20 Des 11 15:32:46 com.openbravo.data.loader.PreparedSentence openExec
    INFO: Executing prepared SQL: SELECT CONTENT FROM RESOURCES WHERE NAME = ?
    20 Des 11 15:32:46 com.openbravo.data.loader.PreparedSentence openExec
    INFO: Executing prepared SQL: SELECT CONTENT FROM RESOURCES WHERE NAME = ?
    20 Des 11 15:32:46 com.openbravo.data.loader.StaticSentence openExec
    INFO: Executing static SQL: SELECT ID, NAME, CATEGORY, CUSTCATEGORY, PARENTID, RATE, RATECASCADE, RATEORDER FROM TAXES ORDER BY NAME
    20 Des 11 15:32:46 com.openbravo.data.loader.StaticSentence openExec
    INFO: Executing static SQL: SELECT ID, NAME FROM TAXCATEGORIES ORDER BY NAME
    20 Des 11 15:32:46 com.openbravo.data.loader.StaticSentence openExec
    INFO: Executing static SQL: SELECT ID, NAME, CONTENT FROM SHAREDTICKETS ORDER BY ID
    20 Des 11 15:32:46 com.openbravo.data.loader.StaticSentence openExec
    INFO: Executing static SQL: SELECT CONTENT FROM SHAREDTICKETS WHERE ID = '89d84e65-8737-4fa1-89e7-61321b58e392'
    20 Des 11 15:32:46 com.openbravo.data.loader.StaticSentence openExec
    INFO: Executing static SQL: DELETE FROM SHAREDTICKETS WHERE ID = '89d84e65-8737-4fa1-89e7-61321b58e392'
    20 Des 11 15:32:46 com.openbravo.data.loader.StaticSentence openExec
    INFO: Executing static SQL: SELECT ID, NAME, CATEGORY, CUSTCATEGORY, PARENTID, RATE, RATECASCADE, RATEORDER FROM TAXES ORDER BY NAME
    20 Des 11 15:32:46 com.openbravo.data.loader.PreparedSentence openExec
    INFO: Executing prepared SQL: SELECT ID, NAME, IMAGE FROM CATEGORIES WHERE PARENTID IS NULL ORDER BY NAME
    20 Des 11 15:32:46 com.openbravo.data.loader.PreparedSentence openExec
    INFO: Executing prepared SQL: SELECT ID, NAME, IMAGE FROM CATEGORIES WHERE PARENTID = ? ORDER BY NAME
    20 Des 11 15:32:46 com.openbravo.data.loader.PreparedSentence openExec
    INFO: Executing prepared SQL: SELECT P.ID, P.REFERENCE, P.CODE, P.NAME, P.ISCOM, P.ISSCALE, P.PRICEBUY, P.PRICESELL, P.TAXCAT, P.CATEGORY, P.ATTRIBUTESET_ID, P.IMAGE, P.ATTRIBUTES, P.ISKITCHEN, P.ISSERVICE FROM PRODUCTS P, PRODUCTS_CAT O WHERE P.ID = O.PRODUCT AND P.CATEGORY = ? ORDER BY O.CATORDER, P.NAME
    20 Des 11 15:32:48 com.openbravo.data.loader.PreparedSentence openExec
    INFO: Executing prepared SQL: INSERT INTO SHAREDTICKETS (ID, NAME,CONTENT) VALUES (?, ?, ?)
    Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: net.sf.jasperreports.engine.component.DefaultComponentManager.setDesignConverter(Lnet/sf/jasperreports/engine/component/ComponentDesignConverter;)V
            at net.sf.jasperreports.components.ComponentsExtensionsRegistryFactory.<clinit>(ComponentsExtensionsRegistryFactory.java:98)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:247)
            at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:161)
            at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:119)
            at net.sf.jasperreports.engine.util.ClassUtils.instantiateClass(ClassUtils.java:57)
            at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.instantiateRegistry(DefaultExtensionsRegistry.java:211)
            at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:188)
            at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:141)
            at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getRegistries(DefaultExtensionsRegistry.java:127)
            at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:104)
            at net.sf.jasperreports.engine.component.ComponentsEnvironment.findComponentBundles(ComponentsEnvironment.java:94)
            at net.sf.jasperreports.engine.component.ComponentsEnvironment.getCachedComponentBundles(ComponentsEnvironment.java:82)
            at net.sf.jasperreports.engine.component.ComponentsEnvironment.getComponentBundles(ComponentsEnvironment.java:70)
            at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.getSchemaLocations(JRReportSaxParserFactory.java:162)
            at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.configureParser(JRReportSaxParserFactory.java:143)
            at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.createParser(JRReportSaxParserFactory.java:108)
            at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createParser(JRXmlDigesterFactory.java:1138)
            at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createDigester(JRXmlDigesterFactory.java:1113)
            at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:203)
            at com.openbravo.pos.reports.JPanelReport.init(JPanelReport.java:82)
            at com.openbravo.pos.reports.PanelReportBean.init(PanelReportBean.java:59)
            at com.openbravo.pos.forms.BeanFactoryScript.init(BeanFactoryScript.java:56)
            at com.openbravo.pos.forms.JRootApp.getBean(JRootApp.java:348)
            at com.openbravo.pos.forms.JPrincipalApp.showTask(JPrincipalApp.java:356)
            at com.openbravo.pos.forms.MenuPanelAction.actionPerformed(MenuPanelAction.java:46)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
            at java.awt.Component.processMouseEvent(Component.java:6289)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
            at java.awt.Component.processEvent(Component.java:6054)
            at java.awt.Container.processEvent(Container.java:2041)
            at java.awt.Component.dispatchEventImpl(Component.java:4652)
            at java.awt.Container.dispatchEventImpl(Container.java:2099)
            at java.awt.Component.dispatchEvent(Component.java:4482)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
            at java.awt.Container.dispatchEventImpl(Container.java:2085)
            at java.awt.Window.dispatchEventImpl(Window.java:2478)
            at java.awt.Component.dispatchEvent(Component.java:4482)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
            at java.awt.EventQueue.access$000(EventQueue.java:85)
            at java.awt.EventQueue$1.run(EventQueue.java:603)
            at java.awt.EventQueue$1.run(EventQueue.java:601)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
            at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
            at java.awt.EventQueue$2.run(EventQueue.java:617)
            at java.awt.EventQueue$2.run(EventQueue.java:615)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    20 Des 11 15:33:05 com.openbravo.data.loader.StaticSentence openExec
    INFO: Executing static SQL: SELECT ID, NAME, APPPASSWORD, CARD, ROLE, IMAGE FROM PEOPLE WHERE VISIBLE = 1
    BUILD SUCCESSFUL (total time: 25 seconds)

    Please tell me the step by step how to fix this errors..i dunno how to edit jasper report in netbeans…thanks a lot

    Benny

     

Log in to post a comment.