Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-14113

[Fiware-tech-help] How to fetch historical data?

    Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:
      None
    • HD-Chapter:
      Apps
    • HD-Enabler:
      Wirecloud

      Description

      Hi Jose,

      Thanks for all your support so far.

      I have setup Cygnus with MySQL agent and now data is storing into MySQL.

      As a next step, we need to show reports of historical data (Saved in Cygnus_MySQL) in GUI. It may be based upon some filters like data for today, last week/month, area wise etc.
      My questions are

      1. Do we need to create our own APIs for fetching data from MySQL and returning to GUI application?

      2. Or is there any GUI component (WireCloud or any other) in which we can directly fetch Cygnus Data? Or we need to create our custom GUI ourselves?

      3. I found a component STH-Comet (https://github.com/telefonicaid/fiware-sth-comet), will it fit in our requirements for fetching Cygnus_MySQL data?

      4. Do let me know if Fiware have any other components matching with our requirement.

      Thanks & Regards,
      Krishan Babbar
      Technical Architect
      IES Internet of Things | Tech Mahindra
      Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA

      • Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996

      ============================================================================================================================
      Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
      ===========================================================================================================================

      ============================================================================================================================

      Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html <http://www.techmahindra.com/Disclaimer.html> externally http://tim.techmahindra.com/tim/disclaimer.html <http://tim.techmahindra.com/tim/disclaimer.html> internally within TechMahindra.

      ============================================================================================================================

      __________________________________________________________________________________________

      You can get more information about our cookies and privacy policies on the following links:

      Fiware-tech-help mailing list
      Fiware-tech-help@lists.fiware.org
      https://lists.fiware.org/listinfo/fiware-tech-help

      [Created via e-mail received from: Krishan Babbar <KB00449283@TechMahindra.com>]

      1. Foundation-31B.png
        245 kB
      2. image001.png
        3 kB
      3. image001.png
        3 kB
      4. image001.png
        28 kB
      5. image001.png
        28 kB
      6. image001.png
        10 kB
      7. image001.png
        28 kB
      8. image001.png
        10 kB
      9. image001.png
        10 kB
      10. image001.png
        19 kB
      11. image001.png
        19 kB
      12. image002.png
        28 kB
      13. image002.png
        28 kB
      14. image002.png
        3 kB
      15. image002.png
        3 kB
      16. image002.png
        3 kB
      17. image002.png
        3 kB
      18. image002.png
        3 kB
      19. image002.png
        3 kB
      20. image002.png
        3 kB
      21. image002.png
        3 kB
      22. image003.png
        38 kB
      23. image003.png
        38 kB
      24. image003.png
        38 kB
      25. image003.png
        38 kB
      26. image003.png
        19 kB
      27. image003.png
        38 kB
      28. image003.png
        19 kB
      29. image003.png
        19 kB
      30. image003.png
        19 kB
      31. image003.png
        19 kB
      32. image004.png
        10 kB
      33. image004.png
        10 kB
      34. image004.png
        10 kB
      35. image004.png
        10 kB
      36. image004.png
        10 kB
      37. image005.png
        19 kB
      38. image005.png
        19 kB
      39. image005.png
        19 kB
      40. image005.png
        19 kB
      41. image005.png
        19 kB
      42. image006.png
        245 kB
      43. image006.png
        245 kB
      44. Outlook-1513603850.png
        3 kB
      45. Outlook-1513603850.png
        3 kB
      46. Outlook-1513603850.png
        3 kB
      47. Outlook-1513603850.png
        3 kB
      48. Outlook-1513603850.png
        3 kB

        Activity

        Hide
        aportosa Alessandro Portosa added a comment -

        Please add ubuntucustomfiware to your /etc/hosts and try again

        https://stackoverflow.com/a/43570800

        Alessandro Portosa
        Technical Consultant

        [X][1513603850060_logotipo_knowage_150px.png]

        Knowage Labs
        Engineering Group
        Via G. Marconi, 10 - 40131 Bologna - Italy
        Tel. + 39 051 0435090
        Skype alessandro.portosa
        www.knowage-suite.com<http://www.knowage-suite.com/> - www.eng.it<http://www.eng.it/web/eng_en/home>

        The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

        Show
        aportosa Alessandro Portosa added a comment - Please add ubuntucustomfiware to your /etc/hosts and try again https://stackoverflow.com/a/43570800 Alessandro Portosa Technical Consultant [X] [1513603850060_logotipo_knowage_150px.png] Knowage Labs Engineering Group Via G. Marconi, 10 - 40131 Bologna - Italy Tel. + 39 051 0435090 Skype alessandro.portosa www.knowage-suite.com< http://www.knowage-suite.com/ > - www.eng.it< http://www.eng.it/web/eng_en/home > The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
        Hide
        fw.ext.user FW External User added a comment -

        Hi Alessandro,

        Thanks Again.

        After adding host and MySQL Datasource in conf/server.xml, when I started Knowage server it is giving memory error as shown below.

        INFO: Deploying web application archive /home/ubuntu/knowage/destination/Knowage-Server-CE/webapps/knowagewhatifengine.war
        May 17, 2018 12:51:02 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
        INFO: validateJarFile(/home/ubuntu/knowage/destination/Knowage-Server-CE/webapps/knowagewhatifengine/WEB-INF/lib/servlet-api-2.4.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
        Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000f5200000, 133169152, 0) failed; error='Cannot allocate memory' (errno=12)
        #

        1. There is insufficient memory for the Java Runtime Environment to continue.
        2. Native memory allocation (mmap) failed to map 133169152 bytes for committing reserved memory.
        3. An error report file with more information is saved as:
        4. /home/ubuntu/knowage/destination/Knowage-Server-CE/bin/hs_err_pid7651.log

        My Instance is having 4 GB of RAM. Is it not sufficient?
        [cid:image001.png@01D3EE12.B0EE0FD0]

        Below is the result of "top" command

        [cid:image003.png@01D3EE12.B0EE0FD0]

        Do let me know if I am missing any step?

        Thanks & Regards,
        Krishan Babbar
        Technical Architect
        IES Internet of Things | Tech Mahindra
        Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA

        • Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996

        ============================================================================================================================
        Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
        ===========================================================================================================================

        From: Portosa Alessandro <Alessandro.Portosa@eng.it>
        Sent: Thursday, May 17, 2018 3:34 PM
        To: Krishan Babbar <KB00449283@TechMahindra.com>; Juanjo Hierro <juanjose.hierro@fiware.org>; Jose Ignacio Carretero <joseignacio.carretero@fiware.org>; fiware-tech-help@lists.fiware.org; Fernando López Aguilar <fernando.lopez@fiware.org>
        Cc: Prashant Chauhan1 <PC00474884@TechMahindra.com>; Yugal Kishor Mullick <YM00106030@TechMahindra.com>; Álvaro Arranz <aarranz@ficodes.com>; Francisco de la Vega <fdelavega@ficodes.com>; Zerbetto Davide <davide.zerbetto@eng.it>
        Subject: Re: [Fiware-tech-help] How to fetch historical data?

        Please add ubuntucustomfiware to your /etc/hosts and try again

        https://stackoverflow.com/a/43570800

        Alessandro Portosa
        Technical Consultant

        [1513603850060_logotipo_knowage_150px.png]

        Knowage Labs
        Engineering Group
        Via G. Marconi, 10 - 40131 Bologna - Italy
        Tel. + 39 051 0435090
        Skype alessandro.portosa
        www.knowage-suite.com<http://www.knowage-suite.com/> - www.eng.it<http://www.eng.it/web/eng_en/home>

        The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

        Show
        fw.ext.user FW External User added a comment - Hi Alessandro, Thanks Again. After adding host and MySQL Datasource in conf/server.xml, when I started Knowage server it is giving memory error as shown below. INFO: Deploying web application archive /home/ubuntu/knowage/destination/Knowage-Server-CE/webapps/knowagewhatifengine.war May 17, 2018 12:51:02 PM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/home/ubuntu/knowage/destination/Knowage-Server-CE/webapps/knowagewhatifengine/WEB-INF/lib/servlet-api-2.4.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000f5200000, 133169152, 0) failed; error='Cannot allocate memory' (errno=12) # There is insufficient memory for the Java Runtime Environment to continue. Native memory allocation (mmap) failed to map 133169152 bytes for committing reserved memory. An error report file with more information is saved as: /home/ubuntu/knowage/destination/Knowage-Server-CE/bin/hs_err_pid7651.log My Instance is having 4 GB of RAM. Is it not sufficient? [cid:image001.png@01D3EE12.B0EE0FD0] Below is the result of "top" command [cid:image003.png@01D3EE12.B0EE0FD0] Do let me know if I am missing any step? Thanks & Regards, Krishan Babbar Technical Architect IES Internet of Things | Tech Mahindra Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996 ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra. =========================================================================================================================== From: Portosa Alessandro <Alessandro.Portosa@eng.it> Sent: Thursday, May 17, 2018 3:34 PM To: Krishan Babbar <KB00449283@TechMahindra.com>; Juanjo Hierro <juanjose.hierro@fiware.org>; Jose Ignacio Carretero <joseignacio.carretero@fiware.org>; fiware-tech-help@lists.fiware.org; Fernando López Aguilar <fernando.lopez@fiware.org> Cc: Prashant Chauhan1 <PC00474884@TechMahindra.com>; Yugal Kishor Mullick <YM00106030@TechMahindra.com>; Álvaro Arranz <aarranz@ficodes.com>; Francisco de la Vega <fdelavega@ficodes.com>; Zerbetto Davide <davide.zerbetto@eng.it> Subject: Re: [Fiware-tech-help] How to fetch historical data? Please add ubuntucustomfiware to your /etc/hosts and try again https://stackoverflow.com/a/43570800 Alessandro Portosa Technical Consultant [1513603850060_logotipo_knowage_150px.png] Knowage Labs Engineering Group Via G. Marconi, 10 - 40131 Bologna - Italy Tel. + 39 051 0435090 Skype alessandro.portosa www.knowage-suite.com< http://www.knowage-suite.com/ > - www.eng.it< http://www.eng.it/web/eng_en/home > The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
        Hide
        aportosa Alessandro Portosa added a comment -

        The error is pretty clear. Not enough memory. You didn't miss any step.

        By default Knowage wants to get 2Gb of memory. You can tune this configuration in bin/setenv.sh but be aware that it is not recommended to go below 2Gb.

        Alessandro Portosa
        Technical Consultant

        [X][1513603850060_logotipo_knowage_150px.png]

        Knowage Labs
        Engineering Group
        Via G. Marconi, 10 - 40131 Bologna - Italy
        Tel. + 39 051 0435090
        Skype alessandro.portosa
        www.knowage-suite.com<http://www.knowage-suite.com/> - www.eng.it<http://www.eng.it/web/eng_en/home>

        The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

        Show
        aportosa Alessandro Portosa added a comment - The error is pretty clear. Not enough memory. You didn't miss any step. By default Knowage wants to get 2Gb of memory. You can tune this configuration in bin/setenv.sh but be aware that it is not recommended to go below 2Gb. Alessandro Portosa Technical Consultant [X] [1513603850060_logotipo_knowage_150px.png] Knowage Labs Engineering Group Via G. Marconi, 10 - 40131 Bologna - Italy Tel. + 39 051 0435090 Skype alessandro.portosa www.knowage-suite.com< http://www.knowage-suite.com/ > - www.eng.it< http://www.eng.it/web/eng_en/home > The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
        Hide
        fw.ext.user FW External User added a comment -

        Thanks Jose and Alessandro,

        After fixing memory issues, I was getting following error of Table doesn’t exist.

        Caused by: java.sql.SQLSyntaxErrorException: Table 'knowage_ce.SBI_CONFIG' doesn't exist

        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:118)

        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:95)

        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)

        at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:960)

        at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1019)

        at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)

        at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)

        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)

        at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)

        at org.hibernate.loader.Loader.doQuery(Loader.java:802)

        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)

        at org.hibernate.loader.Loader.doList(Loader.java:2533)

        ... 39 more

        [localhost-startStop-1] 18 May 2018 09:51:00,853 ERROR it.eng.spagobi.commons.SingletonConfigCache.<init>:48 - Impossible to load configuration for report engine

        it.eng.spago.error.EMFUserError: severity [ERROR] description [100]

        at it.eng.spagobi.commons.dao.ConfigDAOHibImpl.loadAllConfigParameters(ConfigDAOHibImpl.java:82)

        at it.eng.spagobi.commons.SingletonConfigCache.<init>(SingletonConfigCache.java:40)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

        at java.lang.Class.newInstance(Class.java:442)

        at it.eng.spagobi.commons.SingletonConfig.<init>(SingletonConfig.java:53)

        at it.eng.spagobi.commons.SingletonConfig.getInstance(SingletonConfig.java:43)

        at it.eng.spago.dbaccess.Configurator.<init>(Configurator.java:104)

        at it.eng.spago.dbaccess.Configurator.getInstance(Configur

        Then, I added configuration “hibernate.hbm2ddl.auto=create” in hibernate.cfg.xml and now I am getting following errors.

        [localhost-startStop-1] 18 May 2018 09:58:54,259 ERROR it.eng.spagobi.commons.SingletonConfigCache.<init>:41 - The table sbi_config is EMPTY

        [localhost-startStop-1] 18 May 2018 09:58:57,443 ERROR it.eng.spagobi.commons.initializers.metadata.MetadataInitializer.init:87 - An unexpected error occured while initializing metadata

        it.eng.spagobi.utilities.exceptions.SpagoBIRuntimeException: Ab unexpected error occured while initializeng Engines

        at it.eng.spagobi.commons.initializers.metadata.EnginesInitializer.init(EnginesInitializer.java:66)

        at it.eng.spagobi.commons.initializers.metadata.MetadataInitializer.init(MetadataInitializer.java:82)

        at it.eng.spagobi.commons.initializers.metadata.SpagoBIInitializer.init(SpagoBIInitializer.java:91)

        at it.eng.spagobi.commons.initializers.metadata.MetadataInitializer.init(MetadataInitializer.java:66)

        at it.eng.spago.init.InitializerManager.init(InitializerManager.java:79)

        at it.eng.spago.configuration.ConfigServlet.init(ConfigServlet.java:115)

        at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)

        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)

        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)

        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5198)

        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5481)

        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)

        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)

        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634)

        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1074)

        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1858)

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

        at java.lang.Thread.run(Thread.java:748)

        Caused by: org.hibernate.exception.DataException: could not insert: [it.eng.spagobi.commons.metadata.SbiDomains]

        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:102)

        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)

        at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2454)

        at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2874)

        at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)

        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)

        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)

        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)

        at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)

        at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64)

        at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1185)

        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1261)

        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)

        at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:890)

        at it.eng.spagobi.commons.initializers.metadata.SpagoBIInitializer.findDomain(SpagoBIInitializer.java:146)

        at it.eng.spagobi.commons.initializers.metadata.EnginesInitializer.writeEngines(EnginesInitializer.java:157)

        at it.eng.spagobi.commons.initializers.metadata.EnginesInitializer.init(EnginesInitializer.java:60)

        ... 21 more

        Caused by: java.sql.BatchUpdateException: Data truncation: Data too long for column 'VALUE_CD' at row 1

        [localhost-startStop-1] 18 May 2018 09:58:57,497 ERROR it.eng.spagobi.commons.initializers.metadata.SpagoBIInitializer.init:99 - An unexpected error occured while initializing [SpagoBI Metadata Database]

        org.hibernate.exception.ConstraintViolationException: could not insert: [it.eng.spagobi.commons.metadata.SbiDomains]

        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)

        Caused by: java.sql.BatchUpdateException: Duplicate entry '15' for key 'PRIMARY'

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        [localhost-startStop-1] 18 May 2018 09:58:57,587 ERROR it.eng.spagobi.commons.utilities.SpagoBIUtilities.readJndiResource:319 - java.lang.NullPointerException

        [localhost-startStop-1] 18 May 2018 09:58:57,899 ERROR it.eng.spagobi.security.init.InternalSecurityInitializer.initRoles:339 - An unexpected error occurred while initializieng default roles

        java.lang.IllegalArgumentException: id to load is required for loading

        [localhost-startStop-1] 18 May 2018 09:58:58,236 ERROR it.eng.spagobi.profiling.dao.SbiUserDAOHibImpl.updateSbiUserRoles:263 - Could not execute JDBC batch update

        org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

        Caused by: java.sql.BatchUpdateException: Column 'EXT_ROLE_ID' cannot be null

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        [localhost-startStop-1] 18 May 2018 09:58:58,275 ERROR it.eng.spagobi.commons.initializers.metadata.SpagoBIInitializer.init:99 - An unexpected error occured while initializing [InternalSecurity]

        it.eng.spagobi.utilities.exceptions.SpagoBIRuntimeException: An unexpected error occurred during users' initialization

        Caused by: it.eng.spago.error.EMFUserError: severity [ERROR] description [Generic Error]

        at it.eng.spagobi.profiling.dao.SbiUserDAOHibImpl.updateSbiUserRoles(SbiUserDAOHibImpl.java:266)

        at it.eng.spagobi.security.init.InternalSecurityInitializer.init(InternalSecurityInitializer.java:147)

        ... 19 more

        [http-bio-8080-exec-1] 18 May 2018 10:10:14,000 ERROR it.eng.spagobi.commons.utilities.ChannelUtilities.isWebRunning:161 - SPAGOBI.SPAGOBI-MODE.mode IS NULL

        [http-bio-8080-exec-1] 18 May 2018 10:10:14,021 ERROR it.eng.spagobi.commons.utilities.SpagoBIUtilities.readJndiResource:319 - java.lang.NullPointerException

        [http-bio-8080-exec-1] 18 May 2018 10:10:14,021 ERROR it.eng.spagobi.services.common.SsoServiceFactory.createProxyService:55 - Error occurred

        java.lang.NullPointerException

        at java.lang.Class.forName0(Native Method)

        Please guide what am I doing wrong?

        Thanks & Regards,
        Krishan Babbar
        Technical Architect
        IES Internet of Things | Tech Mahindra
        Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA
        • Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996

        ============================================================================================================================
        Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
        ===========================================================================================================================

        From: José Ignacio Carretero <joseignacio.carretero@fiware.org>
        Sent: Thursday, May 17, 2018 7:27 PM
        To: Portosa Alessandro <Alessandro.Portosa@eng.it>; Krishan Babbar <KB00449283@TechMahindra.com>; Juanjo Hierro <juanjose.hierro@fiware.org>; fiware-tech-help@lists.fiware.org; Fernando López Aguilar <fernando.lopez@fiware.org>
        Cc: Prashant Chauhan1 <PC00474884@TechMahindra.com>; Yugal Kishor Mullick <YM00106030@TechMahindra.com>; Álvaro Arranz <aarranz@ficodes.com>; Francisco de la Vega <fdelavega@ficodes.com>; Zerbetto Davide <davide.zerbetto@eng.it>
        Subject: Re: [Fiware-tech-help] How to fetch historical data?

        However.... despite of creating bigger VMs, you also have the option to create some swap space on a file — As root user you can exec these four commands

        dd if=/dev/zero of=/swapfile bs=((1024*1024)) count=4096 ### This is slow. It has to write 4Gb of data

        chmod 600 /swapfile

        mkswap /swapfile

        swapon /swapfile

        This is the same approach windows uses for its swap memory. Swap memory most times improves OS Performance.

        Regards,
        José Ignacio

        El 17/05/18 a las 15:46, Portosa Alessandro escribió:

        The error is pretty clear. Not enough memory. You didn't miss any step.

        By default Knowage wants to get 2Gb of memory. You can tune this configuration in bin/setenv.sh but be aware that it is not recommended to go below 2Gb.

        Alessandro Portosa
        Technical Consultant

        [1513603850060_logotipo_knowage_150px.png]

        Knowage Labs
        Engineering Group
        Via G. Marconi, 10 - 40131 Bologna - Italy
        Tel. + 39 051 0435090
        Skype alessandro.portosa
        www.knowage-suite.com<http://www.knowage-suite.com/> - www.eng.it<http://www.eng.it/web/eng_en/home>

        The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

        Show
        fw.ext.user FW External User added a comment - Thanks Jose and Alessandro, After fixing memory issues, I was getting following error of Table doesn’t exist. Caused by: java.sql.SQLSyntaxErrorException: Table 'knowage_ce.SBI_CONFIG' doesn't exist at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:118) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:95) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:960) at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1019) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) at org.hibernate.loader.Loader.getResultSet(Loader.java:1953) at org.hibernate.loader.Loader.doQuery(Loader.java:802) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) at org.hibernate.loader.Loader.doList(Loader.java:2533) ... 39 more [localhost-startStop-1] 18 May 2018 09:51:00,853 ERROR it.eng.spagobi.commons.SingletonConfigCache.<init>:48 - Impossible to load configuration for report engine it.eng.spago.error.EMFUserError: severity [ERROR] description [100] at it.eng.spagobi.commons.dao.ConfigDAOHibImpl.loadAllConfigParameters(ConfigDAOHibImpl.java:82) at it.eng.spagobi.commons.SingletonConfigCache.<init>(SingletonConfigCache.java:40) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at it.eng.spagobi.commons.SingletonConfig.<init>(SingletonConfig.java:53) at it.eng.spagobi.commons.SingletonConfig.getInstance(SingletonConfig.java:43) at it.eng.spago.dbaccess.Configurator.<init>(Configurator.java:104) at it.eng.spago.dbaccess.Configurator.getInstance(Configur Then, I added configuration “hibernate.hbm2ddl.auto=create” in hibernate.cfg.xml and now I am getting following errors. [localhost-startStop-1] 18 May 2018 09:58:54,259 ERROR it.eng.spagobi.commons.SingletonConfigCache.<init>:41 - The table sbi_config is EMPTY [localhost-startStop-1] 18 May 2018 09:58:57,443 ERROR it.eng.spagobi.commons.initializers.metadata.MetadataInitializer.init:87 - An unexpected error occured while initializing metadata it.eng.spagobi.utilities.exceptions.SpagoBIRuntimeException: Ab unexpected error occured while initializeng Engines at it.eng.spagobi.commons.initializers.metadata.EnginesInitializer.init(EnginesInitializer.java:66) at it.eng.spagobi.commons.initializers.metadata.MetadataInitializer.init(MetadataInitializer.java:82) at it.eng.spagobi.commons.initializers.metadata.SpagoBIInitializer.init(SpagoBIInitializer.java:91) at it.eng.spagobi.commons.initializers.metadata.MetadataInitializer.init(MetadataInitializer.java:66) at it.eng.spago.init.InitializerManager.init(InitializerManager.java:79) at it.eng.spago.configuration.ConfigServlet.init(ConfigServlet.java:115) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5198) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5481) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1074) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1858) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.hibernate.exception.DataException: could not insert: [it.eng.spagobi.commons.metadata.SbiDomains] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:102) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2454) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2874) at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1185) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1261) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:890) at it.eng.spagobi.commons.initializers.metadata.SpagoBIInitializer.findDomain(SpagoBIInitializer.java:146) at it.eng.spagobi.commons.initializers.metadata.EnginesInitializer.writeEngines(EnginesInitializer.java:157) at it.eng.spagobi.commons.initializers.metadata.EnginesInitializer.init(EnginesInitializer.java:60) ... 21 more Caused by: java.sql.BatchUpdateException: Data truncation: Data too long for column 'VALUE_CD' at row 1 [localhost-startStop-1] 18 May 2018 09:58:57,497 ERROR it.eng.spagobi.commons.initializers.metadata.SpagoBIInitializer.init:99 - An unexpected error occured while initializing [SpagoBI Metadata Database] org.hibernate.exception.ConstraintViolationException: could not insert: [it.eng.spagobi.commons.metadata.SbiDomains] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96) Caused by: java.sql.BatchUpdateException: Duplicate entry '15' for key 'PRIMARY' at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [localhost-startStop-1] 18 May 2018 09:58:57,587 ERROR it.eng.spagobi.commons.utilities.SpagoBIUtilities.readJndiResource:319 - java.lang.NullPointerException [localhost-startStop-1] 18 May 2018 09:58:57,899 ERROR it.eng.spagobi.security.init.InternalSecurityInitializer.initRoles:339 - An unexpected error occurred while initializieng default roles java.lang.IllegalArgumentException: id to load is required for loading [localhost-startStop-1] 18 May 2018 09:58:58,236 ERROR it.eng.spagobi.profiling.dao.SbiUserDAOHibImpl.updateSbiUserRoles:263 - Could not execute JDBC batch update org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update Caused by: java.sql.BatchUpdateException: Column 'EXT_ROLE_ID' cannot be null at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [localhost-startStop-1] 18 May 2018 09:58:58,275 ERROR it.eng.spagobi.commons.initializers.metadata.SpagoBIInitializer.init:99 - An unexpected error occured while initializing [InternalSecurity] it.eng.spagobi.utilities.exceptions.SpagoBIRuntimeException: An unexpected error occurred during users' initialization Caused by: it.eng.spago.error.EMFUserError: severity [ERROR] description [Generic Error] at it.eng.spagobi.profiling.dao.SbiUserDAOHibImpl.updateSbiUserRoles(SbiUserDAOHibImpl.java:266) at it.eng.spagobi.security.init.InternalSecurityInitializer.init(InternalSecurityInitializer.java:147) ... 19 more [http-bio-8080-exec-1] 18 May 2018 10:10:14,000 ERROR it.eng.spagobi.commons.utilities.ChannelUtilities.isWebRunning:161 - SPAGOBI.SPAGOBI-MODE.mode IS NULL [http-bio-8080-exec-1] 18 May 2018 10:10:14,021 ERROR it.eng.spagobi.commons.utilities.SpagoBIUtilities.readJndiResource:319 - java.lang.NullPointerException [http-bio-8080-exec-1] 18 May 2018 10:10:14,021 ERROR it.eng.spagobi.services.common.SsoServiceFactory.createProxyService:55 - Error occurred java.lang.NullPointerException at java.lang.Class.forName0(Native Method) Please guide what am I doing wrong? Thanks & Regards, Krishan Babbar Technical Architect IES Internet of Things | Tech Mahindra Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA • Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996 ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra. =========================================================================================================================== From: José Ignacio Carretero <joseignacio.carretero@fiware.org> Sent: Thursday, May 17, 2018 7:27 PM To: Portosa Alessandro <Alessandro.Portosa@eng.it>; Krishan Babbar <KB00449283@TechMahindra.com>; Juanjo Hierro <juanjose.hierro@fiware.org>; fiware-tech-help@lists.fiware.org; Fernando López Aguilar <fernando.lopez@fiware.org> Cc: Prashant Chauhan1 <PC00474884@TechMahindra.com>; Yugal Kishor Mullick <YM00106030@TechMahindra.com>; Álvaro Arranz <aarranz@ficodes.com>; Francisco de la Vega <fdelavega@ficodes.com>; Zerbetto Davide <davide.zerbetto@eng.it> Subject: Re: [Fiware-tech-help] How to fetch historical data? However.... despite of creating bigger VMs, you also have the option to create some swap space on a file — As root user you can exec these four commands dd if=/dev/zero of=/swapfile bs=((1024*1024)) count=4096 ### This is slow. It has to write 4Gb of data chmod 600 /swapfile mkswap /swapfile swapon /swapfile This is the same approach windows uses for its swap memory. Swap memory most times improves OS Performance. Regards, José Ignacio El 17/05/18 a las 15:46, Portosa Alessandro escribió: The error is pretty clear. Not enough memory. You didn't miss any step. By default Knowage wants to get 2Gb of memory. You can tune this configuration in bin/setenv.sh but be aware that it is not recommended to go below 2Gb. Alessandro Portosa Technical Consultant [1513603850060_logotipo_knowage_150px.png] Knowage Labs Engineering Group Via G. Marconi, 10 - 40131 Bologna - Italy Tel. + 39 051 0435090 Skype alessandro.portosa www.knowage-suite.com< http://www.knowage-suite.com/ > - www.eng.it< http://www.eng.it/web/eng_en/home > The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
        Hide
        fw.ext.user FW External User added a comment -

        Hi All,

        Any input on below error?

        Do we need to run any SQL script manually before starting Knowage server?

        Thanks & Regards,
        Krishan Babbar
        Technical Architect
        IES Internet of Things | Tech Mahindra
        Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA
        • Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996

        ============================================================================================================================
        Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
        ===========================================================================================================================

        From: Krishan Babbar
        Sent: Friday, May 18, 2018 6:15 PM
        To: 'José Ignacio Carretero' <joseignacio.carretero@fiware.org>; Portosa Alessandro <Alessandro.Portosa@eng.it>; Juanjo Hierro <juanjose.hierro@fiware.org>; fiware-tech-help@lists.fiware.org; Fernando López Aguilar <fernando.lopez@fiware.org>
        Cc: Prashant Chauhan1 <PC00474884@TechMahindra.com>; Yugal Kishor Mullick <YM00106030@TechMahindra.com>; Álvaro Arranz <aarranz@ficodes.com>; Francisco de la Vega <fdelavega@ficodes.com>; Zerbetto Davide <davide.zerbetto@eng.it>
        Subject: RE: [Fiware-tech-help] How to fetch historical data?

        Thanks Jose and Alessandro,

        After fixing memory issues, I was getting following error of Table doesn’t exist.

        Caused by: java.sql.SQLSyntaxErrorException: Table 'knowage_ce.SBI_CONFIG' doesn't exist

        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:118)

        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:95)

        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)

        at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:960)

        at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1019)

        at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)

        at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)

        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)

        at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)

        at org.hibernate.loader.Loader.doQuery(Loader.java:802)

        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)

        at org.hibernate.loader.Loader.doList(Loader.java:2533)

        ... 39 more

        [localhost-startStop-1] 18 May 2018 09:51:00,853 ERROR it.eng.spagobi.commons.SingletonConfigCache.<init>:48 - Impossible to load configuration for report engine

        it.eng.spago.error.EMFUserError: severity [ERROR] description [100]

        at it.eng.spagobi.commons.dao.ConfigDAOHibImpl.loadAllConfigParameters(ConfigDAOHibImpl.java:82)

        at it.eng.spagobi.commons.SingletonConfigCache.<init>(SingletonConfigCache.java:40)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

        at java.lang.Class.newInstance(Class.java:442)

        at it.eng.spagobi.commons.SingletonConfig.<init>(SingletonConfig.java:53)

        at it.eng.spagobi.commons.SingletonConfig.getInstance(SingletonConfig.java:43)

        at it.eng.spago.dbaccess.Configurator.<init>(Configurator.java:104)

        at it.eng.spago.dbaccess.Configurator.getInstance(Configur

        Then, I added configuration “hibernate.hbm2ddl.auto=create” in hibernate.cfg.xml and now I am getting following errors.

        [localhost-startStop-1] 18 May 2018 09:58:54,259 ERROR it.eng.spagobi.commons.SingletonConfigCache.<init>:41 - The table sbi_config is EMPTY

        [localhost-startStop-1] 18 May 2018 09:58:57,443 ERROR it.eng.spagobi.commons.initializers.metadata.MetadataInitializer.init:87 - An unexpected error occured while initializing metadata

        it.eng.spagobi.utilities.exceptions.SpagoBIRuntimeException: Ab unexpected error occured while initializeng Engines

        at it.eng.spagobi.commons.initializers.metadata.EnginesInitializer.init(EnginesInitializer.java:66)

        at it.eng.spagobi.commons.initializers.metadata.MetadataInitializer.init(MetadataInitializer.java:82)

        at it.eng.spagobi.commons.initializers.metadata.SpagoBIInitializer.init(SpagoBIInitializer.java:91)

        at it.eng.spagobi.commons.initializers.metadata.MetadataInitializer.init(MetadataInitializer.java:66)

        at it.eng.spago.init.InitializerManager.init(InitializerManager.java:79)

        at it.eng.spago.configuration.ConfigServlet.init(ConfigServlet.java:115)

        at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)

        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)

        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)

        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5198)

        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5481)

        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)

        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)

        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634)

        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1074)

        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1858)

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

        at java.lang.Thread.run(Thread.java:748)

        Caused by: org.hibernate.exception.DataException: could not insert: [it.eng.spagobi.commons.metadata.SbiDomains]

        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:102)

        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)

        at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2454)

        at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2874)

        at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)

        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)

        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)

        at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)

        at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)

        at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64)

        at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1185)

        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1261)

        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)

        at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:890)

        at it.eng.spagobi.commons.initializers.metadata.SpagoBIInitializer.findDomain(SpagoBIInitializer.java:146)

        at it.eng.spagobi.commons.initializers.metadata.EnginesInitializer.writeEngines(EnginesInitializer.java:157)

        at it.eng.spagobi.commons.initializers.metadata.EnginesInitializer.init(EnginesInitializer.java:60)

        ... 21 more

        Caused by: java.sql.BatchUpdateException: Data truncation: Data too long for column 'VALUE_CD' at row 1

        [localhost-startStop-1] 18 May 2018 09:58:57,497 ERROR it.eng.spagobi.commons.initializers.metadata.SpagoBIInitializer.init:99 - An unexpected error occured while initializing [SpagoBI Metadata Database]

        org.hibernate.exception.ConstraintViolationException: could not insert: [it.eng.spagobi.commons.metadata.SbiDomains]

        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)

        Caused by: java.sql.BatchUpdateException: Duplicate entry '15' for key 'PRIMARY'

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        [localhost-startStop-1] 18 May 2018 09:58:57,587 ERROR it.eng.spagobi.commons.utilities.SpagoBIUtilities.readJndiResource:319 - java.lang.NullPointerException

        [localhost-startStop-1] 18 May 2018 09:58:57,899 ERROR it.eng.spagobi.security.init.InternalSecurityInitializer.initRoles:339 - An unexpected error occurred while initializieng default roles

        java.lang.IllegalArgumentException: id to load is required for loading

        [localhost-startStop-1] 18 May 2018 09:58:58,236 ERROR it.eng.spagobi.profiling.dao.SbiUserDAOHibImpl.updateSbiUserRoles:263 - Could not execute JDBC batch update

        org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update

        Caused by: java.sql.BatchUpdateException: Column 'EXT_ROLE_ID' cannot be null

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        [localhost-startStop-1] 18 May 2018 09:58:58,275 ERROR it.eng.spagobi.commons.initializers.metadata.SpagoBIInitializer.init:99 - An unexpected error occured while initializing [InternalSecurity]

        it.eng.spagobi.utilities.exceptions.SpagoBIRuntimeException: An unexpected error occurred during users' initialization

        Caused by: it.eng.spago.error.EMFUserError: severity [ERROR] description [Generic Error]

        at it.eng.spagobi.profiling.dao.SbiUserDAOHibImpl.updateSbiUserRoles(SbiUserDAOHibImpl.java:266)

        at it.eng.spagobi.security.init.InternalSecurityInitializer.init(InternalSecurityInitializer.java:147)

        ... 19 more

        [http-bio-8080-exec-1] 18 May 2018 10:10:14,000 ERROR it.eng.spagobi.commons.utilities.ChannelUtilities.isWebRunning:161 - SPAGOBI.SPAGOBI-MODE.mode IS NULL

        [http-bio-8080-exec-1] 18 May 2018 10:10:14,021 ERROR it.eng.spagobi.commons.utilities.SpagoBIUtilities.readJndiResource:319 - java.lang.NullPointerException

        [http-bio-8080-exec-1] 18 May 2018 10:10:14,021 ERROR it.eng.spagobi.services.common.SsoServiceFactory.createProxyService:55 - Error occurred

        java.lang.NullPointerException

        at java.lang.Class.forName0(Native Method)

        Please guide what am I doing wrong?

        Thanks & Regards,
        Krishan Babbar
        Technical Architect
        IES Internet of Things | Tech Mahindra
        Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA
        • Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996

        ============================================================================================================================
        Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
        ===========================================================================================================================

        From: José Ignacio Carretero <joseignacio.carretero@fiware.org<joseignacio.carretero@fiware.org>>
        Sent: Thursday, May 17, 2018 7:27 PM
        To: Portosa Alessandro <Alessandro.Portosa@eng.it<Alessandro.Portosa@eng.it>>; Krishan Babbar <KB00449283@TechMahindra.com<KB00449283@TechMahindra.com>>; Juanjo Hierro <juanjose.hierro@fiware.org<juanjose.hierro@fiware.org>>; fiware-tech-help@lists.fiware.org<fiware-tech-help@lists.fiware.org>; Fernando López Aguilar <fernando.lopez@fiware.org<fernando.lopez@fiware.org>>
        Cc: Prashant Chauhan1 <PC00474884@TechMahindra.com<PC00474884@TechMahindra.com>>; Yugal Kishor Mullick <YM00106030@TechMahindra.com<YM00106030@TechMahindra.com>>; Álvaro Arranz <aarranz@ficodes.com<aarranz@ficodes.com>>; Francisco de la Vega <fdelavega@ficodes.com<fdelavega@ficodes.com>>; Zerbetto Davide <davide.zerbetto@eng.it<davide.zerbetto@eng.it>>
        Subject: Re: [Fiware-tech-help] How to fetch historical data?

        However.... despite of creating bigger VMs, you also have the option to create some swap space on a file — As root user you can exec these four commands

        dd if=/dev/zero of=/swapfile bs=((1024*1024)) count=4096 ### This is slow. It has to write 4Gb of data

        chmod 600 /swapfile

        mkswap /swapfile

        swapon /swapfile

        This is the same approach windows uses for its swap memory. Swap memory most times improves OS Performance.

        Regards,
        José Ignacio

        El 17/05/18 a las 15:46, Portosa Alessandro escribió:

        The error is pretty clear. Not enough memory. You didn't miss any step.

        By default Knowage wants to get 2Gb of memory. You can tune this configuration in bin/setenv.sh but be aware that it is not recommended to go below 2Gb.

        Alessandro Portosa
        Technical Consultant

        [1513603850060_logotipo_knowage_150px.png]

        Knowage Labs
        Engineering Group
        Via G. Marconi, 10 - 40131 Bologna - Italy
        Tel. + 39 051 0435090
        Skype alessandro.portosa
        www.knowage-suite.com<http://www.knowage-suite.com/> - www.eng.it<http://www.eng.it/web/eng_en/home>

        The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

        Show
        fw.ext.user FW External User added a comment - Hi All, Any input on below error? Do we need to run any SQL script manually before starting Knowage server? Thanks & Regards, Krishan Babbar Technical Architect IES Internet of Things | Tech Mahindra Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA • Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996 ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra. =========================================================================================================================== From: Krishan Babbar Sent: Friday, May 18, 2018 6:15 PM To: 'José Ignacio Carretero' <joseignacio.carretero@fiware.org>; Portosa Alessandro <Alessandro.Portosa@eng.it>; Juanjo Hierro <juanjose.hierro@fiware.org>; fiware-tech-help@lists.fiware.org; Fernando López Aguilar <fernando.lopez@fiware.org> Cc: Prashant Chauhan1 <PC00474884@TechMahindra.com>; Yugal Kishor Mullick <YM00106030@TechMahindra.com>; Álvaro Arranz <aarranz@ficodes.com>; Francisco de la Vega <fdelavega@ficodes.com>; Zerbetto Davide <davide.zerbetto@eng.it> Subject: RE: [Fiware-tech-help] How to fetch historical data? Thanks Jose and Alessandro, After fixing memory issues, I was getting following error of Table doesn’t exist. Caused by: java.sql.SQLSyntaxErrorException: Table 'knowage_ce.SBI_CONFIG' doesn't exist at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:118) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:95) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:960) at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1019) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) at org.hibernate.loader.Loader.getResultSet(Loader.java:1953) at org.hibernate.loader.Loader.doQuery(Loader.java:802) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) at org.hibernate.loader.Loader.doList(Loader.java:2533) ... 39 more [localhost-startStop-1] 18 May 2018 09:51:00,853 ERROR it.eng.spagobi.commons.SingletonConfigCache.<init>:48 - Impossible to load configuration for report engine it.eng.spago.error.EMFUserError: severity [ERROR] description [100] at it.eng.spagobi.commons.dao.ConfigDAOHibImpl.loadAllConfigParameters(ConfigDAOHibImpl.java:82) at it.eng.spagobi.commons.SingletonConfigCache.<init>(SingletonConfigCache.java:40) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at it.eng.spagobi.commons.SingletonConfig.<init>(SingletonConfig.java:53) at it.eng.spagobi.commons.SingletonConfig.getInstance(SingletonConfig.java:43) at it.eng.spago.dbaccess.Configurator.<init>(Configurator.java:104) at it.eng.spago.dbaccess.Configurator.getInstance(Configur Then, I added configuration “hibernate.hbm2ddl.auto=create” in hibernate.cfg.xml and now I am getting following errors. [localhost-startStop-1] 18 May 2018 09:58:54,259 ERROR it.eng.spagobi.commons.SingletonConfigCache.<init>:41 - The table sbi_config is EMPTY [localhost-startStop-1] 18 May 2018 09:58:57,443 ERROR it.eng.spagobi.commons.initializers.metadata.MetadataInitializer.init:87 - An unexpected error occured while initializing metadata it.eng.spagobi.utilities.exceptions.SpagoBIRuntimeException: Ab unexpected error occured while initializeng Engines at it.eng.spagobi.commons.initializers.metadata.EnginesInitializer.init(EnginesInitializer.java:66) at it.eng.spagobi.commons.initializers.metadata.MetadataInitializer.init(MetadataInitializer.java:82) at it.eng.spagobi.commons.initializers.metadata.SpagoBIInitializer.init(SpagoBIInitializer.java:91) at it.eng.spagobi.commons.initializers.metadata.MetadataInitializer.init(MetadataInitializer.java:66) at it.eng.spago.init.InitializerManager.init(InitializerManager.java:79) at it.eng.spago.configuration.ConfigServlet.init(ConfigServlet.java:115) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5198) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5481) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:634) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1074) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1858) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.hibernate.exception.DataException: could not insert: [it.eng.spagobi.commons.metadata.SbiDomains] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:102) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2454) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2874) at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1185) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1261) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:890) at it.eng.spagobi.commons.initializers.metadata.SpagoBIInitializer.findDomain(SpagoBIInitializer.java:146) at it.eng.spagobi.commons.initializers.metadata.EnginesInitializer.writeEngines(EnginesInitializer.java:157) at it.eng.spagobi.commons.initializers.metadata.EnginesInitializer.init(EnginesInitializer.java:60) ... 21 more Caused by: java.sql.BatchUpdateException: Data truncation: Data too long for column 'VALUE_CD' at row 1 [localhost-startStop-1] 18 May 2018 09:58:57,497 ERROR it.eng.spagobi.commons.initializers.metadata.SpagoBIInitializer.init:99 - An unexpected error occured while initializing [SpagoBI Metadata Database] org.hibernate.exception.ConstraintViolationException: could not insert: [it.eng.spagobi.commons.metadata.SbiDomains] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96) Caused by: java.sql.BatchUpdateException: Duplicate entry '15' for key 'PRIMARY' at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [localhost-startStop-1] 18 May 2018 09:58:57,587 ERROR it.eng.spagobi.commons.utilities.SpagoBIUtilities.readJndiResource:319 - java.lang.NullPointerException [localhost-startStop-1] 18 May 2018 09:58:57,899 ERROR it.eng.spagobi.security.init.InternalSecurityInitializer.initRoles:339 - An unexpected error occurred while initializieng default roles java.lang.IllegalArgumentException: id to load is required for loading [localhost-startStop-1] 18 May 2018 09:58:58,236 ERROR it.eng.spagobi.profiling.dao.SbiUserDAOHibImpl.updateSbiUserRoles:263 - Could not execute JDBC batch update org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update Caused by: java.sql.BatchUpdateException: Column 'EXT_ROLE_ID' cannot be null at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [localhost-startStop-1] 18 May 2018 09:58:58,275 ERROR it.eng.spagobi.commons.initializers.metadata.SpagoBIInitializer.init:99 - An unexpected error occured while initializing [InternalSecurity] it.eng.spagobi.utilities.exceptions.SpagoBIRuntimeException: An unexpected error occurred during users' initialization Caused by: it.eng.spago.error.EMFUserError: severity [ERROR] description [Generic Error] at it.eng.spagobi.profiling.dao.SbiUserDAOHibImpl.updateSbiUserRoles(SbiUserDAOHibImpl.java:266) at it.eng.spagobi.security.init.InternalSecurityInitializer.init(InternalSecurityInitializer.java:147) ... 19 more [http-bio-8080-exec-1] 18 May 2018 10:10:14,000 ERROR it.eng.spagobi.commons.utilities.ChannelUtilities.isWebRunning:161 - SPAGOBI.SPAGOBI-MODE.mode IS NULL [http-bio-8080-exec-1] 18 May 2018 10:10:14,021 ERROR it.eng.spagobi.commons.utilities.SpagoBIUtilities.readJndiResource:319 - java.lang.NullPointerException [http-bio-8080-exec-1] 18 May 2018 10:10:14,021 ERROR it.eng.spagobi.services.common.SsoServiceFactory.createProxyService:55 - Error occurred java.lang.NullPointerException at java.lang.Class.forName0(Native Method) Please guide what am I doing wrong? Thanks & Regards, Krishan Babbar Technical Architect IES Internet of Things | Tech Mahindra Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA • Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996 ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra. =========================================================================================================================== From: José Ignacio Carretero <joseignacio.carretero@fiware.org< joseignacio.carretero@fiware.org >> Sent: Thursday, May 17, 2018 7:27 PM To: Portosa Alessandro <Alessandro.Portosa@eng.it< Alessandro.Portosa@eng.it >>; Krishan Babbar <KB00449283@TechMahindra.com< KB00449283@TechMahindra.com >>; Juanjo Hierro <juanjose.hierro@fiware.org< juanjose.hierro@fiware.org >>; fiware-tech-help@lists.fiware.org< fiware-tech-help@lists.fiware.org >; Fernando López Aguilar <fernando.lopez@fiware.org< fernando.lopez@fiware.org >> Cc: Prashant Chauhan1 <PC00474884@TechMahindra.com< PC00474884@TechMahindra.com >>; Yugal Kishor Mullick <YM00106030@TechMahindra.com< YM00106030@TechMahindra.com >>; Álvaro Arranz <aarranz@ficodes.com< aarranz@ficodes.com >>; Francisco de la Vega <fdelavega@ficodes.com< fdelavega@ficodes.com >>; Zerbetto Davide <davide.zerbetto@eng.it< davide.zerbetto@eng.it >> Subject: Re: [Fiware-tech-help] How to fetch historical data? However.... despite of creating bigger VMs, you also have the option to create some swap space on a file — As root user you can exec these four commands dd if=/dev/zero of=/swapfile bs=((1024*1024)) count=4096 ### This is slow. It has to write 4Gb of data chmod 600 /swapfile mkswap /swapfile swapon /swapfile This is the same approach windows uses for its swap memory. Swap memory most times improves OS Performance. Regards, José Ignacio El 17/05/18 a las 15:46, Portosa Alessandro escribió: The error is pretty clear. Not enough memory. You didn't miss any step. By default Knowage wants to get 2Gb of memory. You can tune this configuration in bin/setenv.sh but be aware that it is not recommended to go below 2Gb. Alessandro Portosa Technical Consultant [1513603850060_logotipo_knowage_150px.png] Knowage Labs Engineering Group Via G. Marconi, 10 - 40131 Bologna - Italy Tel. + 39 051 0435090 Skype alessandro.portosa www.knowage-suite.com< http://www.knowage-suite.com/ > - www.eng.it< http://www.eng.it/web/eng_en/home > The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

          People

          • Assignee:
            aarranz Álvaro Arranz
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: