14 Replies Latest reply on Dec 5, 2011 4:13 PM by anand.awasthi

    birt report data not showing up in jbpm console - can't load jdbc jar ?

    anand.awasthi

      Hi Everyone,

       

      I am trying to generate the reports using birt run time 3.7.1 in jbpm console 5.1 which is deployed on WebSphere 7.  I have configured birt runitme location in WAS admin console  pointing to  -Dorg.jbpm.report.engine.dir=D:\birt-runtime\birt. Everything looks ok and I can pull up the reporting templates in JBPM Console also but i am not seeing the data , instead i get error shown below. the relevant stack trace is :

       

      - Can not load the report query: 122. Errors occurred when generating the report document for the report element with ID 122. (Element ID:122)

      Error.ReportQueryLoadingError2 ( 1 time(s) )  detail : org.eclipse.birt.report.engine.api.EngineException: Can not load the report query: 
      122. Errors occurred when generating the report document for the report element with ID 122. (Element ID:122) 
      at org.eclipse.birt.report.engine.data.dte.DataPresentationEngine.doExecuteQuery(DataPresentationEngine.java:160) 
      at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:267) 
      at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1905) 

       

      While digging at the forums, I found that for Birt runtime 3.7.1 , I need to copy jdbc jar, (in this case db2jcc.jar) in BirtHome/WEB-INF/lib.

       

      So I deployed birt.war on WAS 7 with db2jcc.jar  in WEB-INF/lib and it still didnt work. I also copied the db2jcc.jar in D:\birt-runtime\birt\ReportEngine\lib and that didnt work either. What am I missing ?

       

      BTW, I can pull the data in Eclipse - when i open the template in Designer View. All I had to do was add the jar using Jar Management Wizard and conifgure the data source. But the same thing is not working when I try to open the reports in Server enviornment.

       

      Any pointers will be greatly appreciated.

       

      Regards,

      Anand

        • 1. Re: birt report data not showing up in jbpm console - can't load jdbc jar ?
          swiderski.maciej

          I recall that there was a special place where to put jdbc drivers for birt (it was for previous versions but maybe it still applies). It was BIRT_HOME/ReportEngine/plugins/org.eclipse.birt.report.data.oda.jdbc_{version_number}/drivers

           

          HTH

          • 2. Re: birt report data not showing up in jbpm console - can't load jdbc jar ?
            anand.awasthi

            thanks for response.

             

            for birt 3.7.1 we need to copy the jdbc jar in web-inf/lib. It works for me for Birt Web Viewer. I can pull the reports with Viewer on WAS. Everything good.

            so same thing I did for Console War and copied jdbc jars in console-server-war/web-inf/lib. but it does not work thru console and get the errors mentioned above:

             

            Error.ReportQueryLoadingError2 ( 1 time(s) )
            detail : org.eclipse.birt.report.engine.api.EngineException: Can not load the report query: 122. Errors occurred when generating the report document for the report element with ID 122. (Element ID:122)
            at org.eclipse.birt.report.engine.data.dte.DataPresentationEngine.doExecuteQuery(DataPresentationEngine.java:160)
            at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:267)

             

            I could be wrong but now since i have it working thru viewer, i dont think above error is due to jdbc jar not being loaded. If i dont put jar and do not configure data sources in report design file then i get different error. could it be that issues are somewhere else.

             

            • 3. Re: birt report data not showing up in jbpm console - can't load jdbc jar ?
              bpmn2user

              As Maciej mentioned, here is what you need to do.

               

              Find the directory for jdbc drivers in plugins directory (following is an example from http://community.jboss.org/people/bpmn2user/blog/2011/02/26/orcale-integration-with-jbpm5). So copying the driver to WEB-INF/lib is not enough, you need to copy to this directory so that BIRT runtime would pick it up.

               

              BIRTHOME\ReportEngine\plugins\org.eclipse.birt.report.data.oda.jdbc_xxxx\drivers

              • 4. Re: birt report data not showing up in jbpm console - can't load jdbc jar ?
                anand.awasthi

                Thanks Guys, but the solution that you are suggesting works with verison prior to birt 3.7.1. With 3.7.1 release of birt runtime, there is no plugin folder anymore. Its has been simiplified whole lot and  we have now is ReportEngine/lib. All the jars for runtime are in ths folder now and that's where any  jdbc jars need to be copied. I have copied the jdbc jar in there. And infact I am able to genereate report by running the genReport.bat file that comes packaged with ReportEngine. so direct calls to report engine work fine.  the only scenario where above error is coming when console comes in picutre. so it seems like that JBPM Console - Report Engine wiring is not working.

                • 5. Re: birt report data not showing up in jbpm console - can't load jdbc jar ?
                  tsurdilovic

                  For Birt 3.7 the jars just have to be on the classpath.

                  • 6. Re: birt report data not showing up in jbpm console - can't load jdbc jar ?
                    tsurdilovic

                    Which report is this error being generated against? Have you tried the overall report? You should try to download the Birt 3.7 "all" download that ships with eclipse, open the report in eclipse and save it (so it saves it against the 3.7 runtime) then try again.

                    • 7. Re: birt report data not showing up in jbpm console - can't load jdbc jar ?
                      anand.awasthi

                      Thanks I will try that download. BTW, Yes I am trying to run both overall report and process summary report. 

                       

                      I have been able to run these  2 reports with following cases:

                       

                      1) deploy Birt.war on WAS 7. Able to generate reports thru this - OK (addeded jdbc jar in classpath of viewer)

                       

                      2) open these reports in Eclipse - Designer - able to see data ok- (added jdbc jar in classpath)

                       

                      3) Installed Report Engine API in D:/xxxx - added jar in ReportEngine/lib - works OK

                       

                      Error Case:

                       

                      Deployed Console on WAS 7 - Birt Service is pointing to Report Engine installed in D:/xxxxx. Service initalized OK, Both Report Templates show up in Console - Reporting Section along with the Error mentioned in the original post.

                      (In this cases copied all jars from ReportEngine/lib to Console-server-war/WEB-INF/lib along with jdbc Jar, so they are in class path of Console).

                      I dont see any other errors in WAS server and ffdc logs. BTW, I also configured the jndi datasource in report template.

                      • 8. Re: birt report data not showing up in jbpm console - can't load jdbc jar ?
                        tsurdilovic

                        With 3.7 there is nothing you need outiside of copying jars of ReportEngine/lib to your classpath (web-inf/lib). What you are running into most likely is that you are still using the 1.3 report-server code which is not compatible with Birt 3.7. We are fixing this now as part of the jbpm-installer AS7 upgrade. Will update here when its changed in (remind me too if you don't hear anything in the next couple of days).

                        • 9. Re: birt report data not showing up in jbpm console - can't load jdbc jar ?
                          anand.awasthi

                          thanks,

                           

                          that makes sense as jbpm console 5.1 is using report-core-1.3 but then what version of birt runtime is compatible with 1.3, I initially tried using birt 2.6.2 and that was giving me broblem such as below:

                           

                           

                          [11/23/11 15:17:31:901 EST] 00000012 SystemErr     R Exception in thread "BirtService-Init" java.lang.NoSuchMethodError: org/eclipse/birt/report/engine/api/EngineConfig.getLogRollingSize()I

                          [11/23/11 15:17:31:902 EST] 00000012 SystemErr     R        at org.eclipse.birt.report.engine.api.impl.ReportEngine.intializeLogger(ReportEngine.java:217)

                          [11/23/11 15:17:31:902 EST] 00000012 SystemErr     R        at org.eclipse.birt.report.engine.api.impl.ReportEngine.<init>(ReportEngine.java:133)

                          [11/23/11 15:17:31:902 EST] 00000012 SystemErr     R        at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$1.run(ReportEngineFactory.java:18)

                          [11/23/11 15:17:31:902 EST] 00000012 SystemErr     R        at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$1.run(ReportEngineFactory.java:1)

                          [11/23/11 15:17:31:902 EST] 00000012 SystemErr     R        at java.security.AccessController.doPrivileged(AccessController.java:202)

                          [11/23/11 15:17:31:902 EST] 00000012 SystemErr     R        at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory.createReportEngine(ReportEngineFactory.java:14)

                          [11/23/11 15:17:31:902 EST] 00000012 SystemErr     R        at org.jboss.bpm.report.BirtEngineFactory.newInstance(BirtEngineFactory.java:48)

                          [11/23/11 15:17:31:903 EST] 00000012 SystemErr     R        at org.jboss.bpm.report.BirtService.create(BirtService.java:80)

                          [11/23/11 15:17:31:903 EST] 00000012 SystemErr     R        at org.jboss.bpm.report.BirtService$2.run(BirtService.java:213)

                          [11/23/11 15:17:31:903 EST] 00000012 SystemErr     R        at java.lang.Thread.run(Thread.java:736)

                           

                          so I upgraded to 3.7.1 , above problem went away but then i started seeing the current jdbc related issues.

                           

                          does it mean that there is no version of birt that we can currently plugin with jbpm console 5.1 ?

                           

                          thanks

                          Anand

                           

                           

                          • 10. Re: birt report data not showing up in jbpm console - can't load jdbc jar ?
                            tsurdilovic

                            You cannot use 2.6 either because report-server (1.3.0) used to put in it's own Birt client jars. As far as what version to use, look at the jBPM 5.1 installer build.xml..that will tell you. (https://github.com/droolsjbpm/jbpm/blob/master/jbpm-installer/build.xml -

                            <property name="birt.download.url" value="http://www.eclipse.org/downloads/download.php?file=/birt/downloads/drops/R-R1-2_3_2_2-200906011507/birt-runtime-2_3_2_2.zip&url=http://download.eclipse.org/birt/downloads/drops/R-R1-2_3_2_2-200906011507/birt-runtime-2_3_2_2.zip&mirror_id=1"/>)

                            • 11. Re: birt report data not showing up in jbpm console - can't load jdbc jar ?
                              tsurdilovic

                              In jBPM 5.2 the installer will default to AS7 with Birt 3.7.0.

                              • 12. Re: birt report data not showing up in jbpm console - can't load jdbc jar ?
                                anand.awasthi

                                Ok, So I downloaded 2.3.2.2 runtime and deployed the report engine in

                                 

                                -Dorg.jbpm.report.engine.dir=D:\birt-runtime-2_3_2 (set this via JVM settings in Websphere 7 admin console).

                                 

                                I have copied the db2jcc.jar in D:\birt-runtime-2_3_2\ReportEngine\plugins\org.eclipse.birt.report.data.oda.jdbc_2.3.2.r232_v20090212\drivers

                                 

                                but i am still getting "can not load Report Query".

                                 

                                Now I have seen that as part of jbpm 5.1 installer, Report Engine needs to be installed in

                                 

                                ${jboss.server.data.dir}/birt.

                                How about location for Websphere 7 ? Since I am installing Reprot Engine in D:\birt-runtime-2_3_2 (which is out side of Webpshere Location) that could be causing this issue of not being able to load the Report queries ?

                                • 13. Re: birt report data not showing up in jbpm console - can't load jdbc jar ?
                                  tsurdilovic

                                  The report server 1.3.0 code looks at a property variable called "org.jbpm.report.engine.dir" .. you should set it w/ -Dorg.jbpm.report.engine.dir=XYZ where XYZ is the location of where you install the Birt runtime.

                                  • 14. Re: birt report data not showing up in jbpm console - can't load jdbc jar ?
                                    anand.awasthi

                                    Ok..finally some good news...

                                     

                                    Got it working with 2.3.2.... Thanks a bunch Tihomir.

                                     

                                    Yep, the location of report run time does not matter,,it can be set to where one wants as long as server can find it...