8 Replies Latest reply on Nov 1, 2015 1:53 PM by jovica.zoric

    BIRT from Jboss 4.2.2.GA to Jboss 7

    jovica.zoric

      Hello everyone,

      I'm doing a migration from Jboss 4.2.2.GA to Jboss 7. It is a seam application (after migration it should be seam 2.3.1, jsf 2.1, richfaces 4). Currently I'm stuck with  BIRT engine. In web.xml we have a custom servlet which is responsible for initializing the BirtEngine.

       

      Here is the stack-trace:

      15:32:38,983 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/my-app]] (MSC service thread 1-2) Servlet /my-app threw load() exception: java.util.MissingResourceException: Could not find the bundle com/ibm/icu/impl/data/icudt34b/en_US

          at com.ibm.icu.impl.ResourceBundleWrapper.getBundleInstance(ResourceBundleWrapper.java:107) [com-ibm-icu-2.1.2.jar:]

          at com.ibm.icu.util.UResourceBundle.instantiateBundle(UResourceBundle.java:511) [com-ibm-icu-2.1.2.jar:]

          at com.ibm.icu.util.UResourceBundle.getBundleInstance(UResourceBundle.java:127) [com-ibm-icu-2.1.2.jar:]

          at com.ibm.icu.util.UResourceBundle.getBundleInstance(UResourceBundle.java:108) [com-ibm-icu-2.1.2.jar:]

          at com.ibm.icu.util.UResourceBundle.getBundleInstance(UResourceBundle.java:195) [com-ibm-icu-2.1.2.jar:]

          at com.ibm.icu.impl.CalendarData.<init>(CalendarData.java:29) [com-ibm-icu-2.1.2.jar:]

          at com.ibm.icu.text.DateFormatSymbols.initializeData(DateFormatSymbols.java:790) [com-ibm-icu-2.1.2.jar:]

          at com.ibm.icu.text.DateFormatSymbols.<init>(DateFormatSymbols.java:176) [com-ibm-icu-2.1.2.jar:]

          at com.ibm.icu.text.SimpleDateFormat.<init>(SimpleDateFormat.java:341) [com-ibm-icu-2.1.2.jar:]

          at com.ibm.icu.text.SimpleDateFormat.<init>(SimpleDateFormat.java:317) [com-ibm-icu-2.1.2.jar:]

          at org.eclipse.birt.report.engine.api.impl.EngineLogger.generateUniqueLogFileName(EngineLogger.java:116)

          at org.eclipse.birt.report.engine.api.impl.EngineLogger.startEngineLogging(EngineLogger.java:56)

          at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.setupLogging(ReportEngineHelper.java:338)

          at org.eclipse.birt.report.engine.api.impl.ReportEngine.setupLogging(ReportEngine.java:108)

          at org.eclipse.birt.report.engine.api.impl.ReportEngine.<init>(ReportEngine.java:89)

          at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory.createReportEngine(ReportEngineFactory.java:13)

         at com.mypackage.reporting.BirtEngine.initBirtEngine(BirtEngine.java:101) [ina-core.jar:]

          at com.mypackage.reporting.ReportServlet.init(ReportServlet.java:58) [ina-core.jar:]

          at javax.servlet.GenericServlet.init(GenericServlet.java:242) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873) [jbossweb-7.0.13.Final.jar:]

          at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]

          at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]

          .....

       

      I'm wondering is this the jboss 7 problem (because of the new class loader) or I'm missing something else.

       

      I have this com.ibm.icu library in my lib folder and we are using BIRT 2.6.2.

       

      Thank you.

        • 1. Re: BIRT from Jboss 4.2.2.GA to Jboss 7
          jovica.zoric

          Hello,

           

          I added the module with this com.ibm.icu jar and include it in my jboss-deployment-structure.xml

           

          <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">

            <deployment>

             <dependencies>

                    <module name="org.dom4j" export="true"/>

                    <module name="org.apache.commons.collections" export="true"/>

                 <module name="javax.faces.api" export="true"/>

                        <module name="com.ibm.icu" export="true"/>

               </dependencies>

            </deployment> 

          </jboss-deployment-structure>

           

          and Birt engine is loaded (taken from log):

          - org.eclipse.birt.report.engine.api.impl.ReportEngine@1baa56a2

          - org.eclipse.birt.report.engine.api.impl.ReportEngineFactory@1fa83e7e

           

          but now Seam can't find the resources (for example on login page there is "view.title.login", "view.button.login" as keys).

           

          Here is the servlet in web.xml after the org.jboss.seam.servlet.SeamResourceServlet and javax.faces.webapp.FacesServlet:

              <servlet>

                  <servlet-name>Reporting</servlet-name>

                  <servlet-class>

                      com.mypackage.reporting.ReportServlet

                  </servlet-class>

                  <load-on-startup>3</load-on-startup>

              </servlet>

           

           

              <servlet-mapping>

                  <servlet-name>Reporting</servlet-name>

                  <url-pattern>/report</url-pattern>

              </servlet-mapping>

           

          Is this realated to servlet order? How can I confirm this?

           

          Thanks.

          • 2. Re: BIRT from Jboss 4.2.2.GA to Jboss 7
            jovica.zoric

            Any ideas on this?

            • 3. Re: BIRT from Jboss 4.2.2.GA to Jboss 7
              ctomc

              Hard to tell what is going wrong when you have so many jars all over the place. some in deployment some in external modules.

               

              without knowing what your deployment looks like it is just hard to tell what is going wrong.

              If you post list of all jars in your deployment and where they are and how descriptors of your modules look it would definitly help.

               

              Also if you want to dig into it bit deeper, you can enable trace logging for org.jboss.modules which will show you where all classloader is trying to load classes and resources from.

               

              Btw, why still AS7? Why not go with WildFly 8+? there is also lots more activity on that forum this days

              • 4. Re: BIRT from Jboss 4.2.2.GA to Jboss 7
                snjeza

                Could you, please, send an example of your project?

                • 5. Re: BIRT from Jboss 4.2.2.GA to Jboss 7
                  jovica.zoric

                  ctomc In attachment there is a list of jars and config files. It is a ear package containing jboss-seam.jar, web.war and core.jar. In  ear lib folder there is a pro-model.jar which is empty and doesn't have any configuration. Also there is a pro-properties.jar which contains some property file but no jar and config files.

                   

                  snjeza Tomorrow I will upload the project structure, jboss 7 (with configuration) and BIRT libs. I need to remove the BIRT dependency from pom.xml because it's in the private artifactory but I will upload the used jars. You will be able to see the 3 classes that are involved in the BIRT initialization. I will also describe where do we put the birt jars Will this be OK?

                  • 6. Re: BIRT from Jboss 4.2.2.GA to Jboss 7
                    snjeza

                    I suppose it will be ok.

                    • 7. Re: BIRT from Jboss 4.2.2.GA to Jboss 7
                      jovica.zoric

                      Here is the example project with jboss, birt and lib jars. (https://dl.dropboxusercontent.com/u/17283850/dev_forum_example.tar.gz)

                      Birt engine is configured in jboss standalone.sh (search for birt.engine.home). Also, JAVA_HOME is in jboss standalone.conf.

                      lib  folder (ear/lib) added because I can't include the birt jars in the pom.xml

                      • 8. Re: BIRT from Jboss 4.2.2.GA to Jboss 7
                        jovica.zoric

                        Couldn't figure this out so I upgraded the BIRT to 4.5 and it works. Report are compatible with some minor changes.