1 2 Previous Next 17 Replies Latest reply: Jan 17, 2013 11:26 AM by maher gharbi RSS

    can you use tools birt integration with normal JSF 2?

    u j Novice

      Can you use the JBoss tools birt integration for a normal JSF 2 application without Seam?

       

      Does the b:birt tag work in that case?

       

      Thanks

        • 1. Re: can you use tools birt integration with normal JSF 2?
          Snjezana Peco Expert

          The JBoss BIRT Integration works with a JSF 1.2 application without Seam.

          You have to add jboss-birt-servlet.jar from org.jboss.tools.birt.oda to your classpath (WEB-INF/lib).

          I haven't tested any JSF 2 application, but you can try it. I suppose it will work.

          • 2. Re: can you use tools birt integration with normal JSF 2?
            u j Novice

            Ok thanks, got it to work.

             

            A couple of questions:

             

            1. Are the jars jboss-birt-servlet.jar and jboss-seam-birt.jar in a Maven repository?

             

            2. When I do in Eclipse ctrl+space inside a b: tag, no attributes are suggested. Can that be fixed?

             

            Thanks

            • 3. Re: can you use tools birt integration with normal JSF 2?
              u j Novice

              Another question: I try to install the Birt runtime as JBoss module in AS 7 to avoid a 50Mb war file.

              I defined a module, put all the jars in it and had to define some dependencies, one on the xml DocumentBuilderFactory. I defined a module javax/xml/parsers with xml-apis.2.0.jar.

               

              But now I get:

               

              Failed to install plugin from jar:file:C:%5Cjava%5Cjboss%5Cjboss-as-7.0.1.Final%5Cmodules%5Corg%5Ceclipse%5Cbirt%5Cmain%5Corg.eclipse.birt.runtime_3.7.1.v20110913-1734.jar!/: java.lang.ClassCastException: __redirected.__DocumentBuilderFactory cannot be cast to javax.xml.parsers.DocumentBuilderFactory

               

              at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source) [:1.6.0_24]

              at org.eclipse.birt.core.framework.jar.BundleLoader.loadExtensions(BundleLoader.java:147) [org.eclipse.birt.runtime_3.7.1.v20110913-1734.jar:]

              at org.eclipse.birt.core.framework.jar.BundleLoader.load(BundleLoader.java:63) [org.eclipse.birt.runtime_3.7.1.v20110913-1734.jar:]

              at org.eclipse.birt.core.framework.jar.ServicePlatform.installBundle(ServicePlatform.java:57) [org.eclipse.birt.runtime_3.7.1.v20110913-1734.jar:]

              at org.eclipse.birt.core.framework.jar.ServiceLauncher.startup(ServiceLauncher.java:71) [org.eclipse.birt.runtime_3.7.1.v20110913-1734.jar:]

              at org.eclipse.birt.core.framework.Platform.startup(Platform.java:75) [org.eclipse.birt.runtime_3.7.1.v20110913-1734.jar:]

              at org.jboss.tools.birt.servlet.BirtEngine.getBirtEngine(BirtEngine.java:56) [jboss-birt-servlet.jar:]

               

              Any idea of how to solve this? I guess I need to change the dependency, but I can't find a module or jar with __redirected.__DocumentBuilderFactory.

               

              Thanks

              • 4. Re: can you use tools birt integration with normal JSF 2?
                Snjezana Peco Expert

                > 1. Are the jars jboss-birt-servlet.jar and jboss-seam-birt.jar in a Maven repository?

                 

                No, they aren't.

                 

                > 2. When I do in Eclipse ctrl+space inside a b: tag, no attributes are suggested. Can that be fixed?

                 

                Yes, it can be fixed.

                Could you please create a jira for that issue on https://issues.jboss.org/browse/JBIDE?

                • 5. Re: can you use tools birt integration with normal JSF 2?
                  Snjezana Peco Expert

                  u j wrote:

                   

                  Another question: I try to install the Birt runtime as JBoss module in AS 7 to avoid a 50Mb war file.

                  I defined a module, put all the jars in it and had to define some dependencies, one on the xml DocumentBuilderFactory. I defined a module javax/xml/parsers with xml-apis.2.0.jar.

                   

                  But now I get:

                   

                  Failed to install plugin from jar:file:C:%5Cjava%5Cjboss%5Cjboss-as-7.0.1.Final%5Cmodules%5Corg%5Ceclipse%5Cbirt%5Cmain%5Corg.eclipse.birt.runtime_3.7.1.v20110913-1734.jar!/: java.lang.ClassCastException: __redirected.__DocumentBuilderFactory cannot be cast to javax.xml.parsers.DocumentBuilderFactory

                   

                  at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source) [:1.6.0_24]

                  at org.eclipse.birt.core.framework.jar.BundleLoader.loadExtensions(BundleLoader.java:147) [org.eclipse.birt.runtime_3.7.1.v20110913-1734.jar:]

                  at org.eclipse.birt.core.framework.jar.BundleLoader.load(BundleLoader.java:63) [org.eclipse.birt.runtime_3.7.1.v20110913-1734.jar:]

                  at org.eclipse.birt.core.framework.jar.ServicePlatform.installBundle(ServicePlatform.java:57) [org.eclipse.birt.runtime_3.7.1.v20110913-1734.jar:]

                  at org.eclipse.birt.core.framework.jar.ServiceLauncher.startup(ServiceLauncher.java:71) [org.eclipse.birt.runtime_3.7.1.v20110913-1734.jar:]

                  at org.eclipse.birt.core.framework.Platform.startup(Platform.java:75) [org.eclipse.birt.runtime_3.7.1.v20110913-1734.jar:]

                  at org.jboss.tools.birt.servlet.BirtEngine.getBirtEngine(BirtEngine.java:56) [jboss-birt-servlet.jar:]

                   

                  Any idea of how to solve this? I guess I need to change the dependency, but I can't find a module or jar with __redirected.__DocumentBuilderFactory.

                   

                  Thanks

                   

                  Adding the BIRT runtime as a JBoss AS 7 module is a good idea.

                  I think you don't need to define the javax/xml/parsers module because JDK already contains XML API.

                  • 6. Re: can you use tools birt integration with normal JSF 2?
                    u j Novice

                    Without it I get a ClassNotFoundException on DocumentBuilderFactory, so I added it.

                     

                    I created the issue about ctrl+space in Eclipse:

                    https://issues.jboss.org/browse/JBIDE-9948

                     

                    Thanks

                    • 7. Re: can you use tools birt integration with normal JSF 2?
                      samy omar Newbie

                      u j

                      Ok thanks, got it to work.

                      Do you mean that you made it work with JSF 2  ???

                       

                      Could you please help me by showing any example Or give me a link for working with Birt using Jboss tools and JSF 2 ???

                      • 8. Re: can you use tools birt integration with normal JSF 2?
                        u j Novice

                        Yes, I got it to work with RichFaces 4 and no Seam.

                        However, I could not manage to install Birt as jboss module.

                        So all Birt runtime libs and the two jboss birt libs mentioned above are in WEB-INF/lib.

                        As my project is "mavenized", I keep these libs in a separate folder and in the maven build they are copied to WEB-INF/lib.

                         

                        In the jsf page I have e.g.:

                        <b:birt embeddable="true"
                        designName="WEB-INF/birt/sub_match.rptdesign" designType="embed"
                        locale="#{loginBean.language}">
                        <b:param name="estabId" value="#{bean.reportEstabId}" />
                        <b:param name="weekdayId" value="1" />
                        </b:birt>

                         

                        Hope this helps.

                        • 9. Re: can you use tools birt integration with normal JSF 2?
                          samy omar Newbie

                          Thanks for your reply and help,

                           

                          Can I achieve this without using seam ? Only JSF2 and RichFaces and Birt liberaries ?

                          • 11. Re: can you use tools birt integration with normal JSF 2?
                            samy omar Newbie

                            I have another question please,

                             

                            How did your report connec to the the DB ?? Do you give it a connection object ?? or it use the application default datasource ?

                             

                            I have developed a report which connect to DB using JDBC datasource, it worked fine

                            But when I added it to the JSF page and run the application I got thisexception

                            org.eclipse.datatools.connectivity] (http--0.0.0.0-7070-4) Unable to determine the default workspace loc

                            I think its connectivity issue.

                             

                            I font know how to make my report connect to DB in my richfaces/JSF web application (deployed to Jboss AS7.1)

                            • 12. Re: can you use tools birt integration with normal JSF 2?
                              u j Novice

                              I don't know this error, but the report has a JNDI URL like this:

                               

                              java:jboss/datasources/myDS

                               

                              which you must also define in Jboss of course.

                               

                              Hope this helps.

                              • 13. Re: can you use tools birt integration with normal JSF 2?
                                Markus Wuestemann Newbie

                                u j schrieb:

                                 

                                Another question: I try to install the Birt runtime as JBoss module in AS 7 to avoid a 50Mb war file.

                                I defined a module, put all the jars in it and had to define some dependencies, one on the xml DocumentBuilderFactory. I defined a module javax/xml/parsers with xml-apis.2.0.jar.

                                 

                                But now I get:

                                 

                                Failed to install plugin from jar:file:C:%5Cjava%5Cjboss%5Cjboss-as-7.0.1.Final%5Cmodules%5Corg%5Ceclipse%5Cbirt%5Cmain%5Corg.eclipse.birt.runtime_3.7.1.v20110913-1734.jar!/: java.lang.ClassCastException: __redirected.__DocumentBuilderFactory cannot be cast to javax.xml.parsers.DocumentBuilderFactory

                                 

                                at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source) [:1.6.0_24]

                                at org.eclipse.birt.core.framework.jar.BundleLoader.loadExtensions(BundleLoader.java:147) [org.eclipse.birt.runtime_3.7.1.v20110913-1734.jar:]

                                at org.eclipse.birt.core.framework.jar.BundleLoader.load(BundleLoader.java:63) [org.eclipse.birt.runtime_3.7.1.v20110913-1734.jar:]

                                at org.eclipse.birt.core.framework.jar.ServicePlatform.installBundle(ServicePlatform.java:57) [org.eclipse.birt.runtime_3.7.1.v20110913-1734.jar:]

                                at org.eclipse.birt.core.framework.jar.ServiceLauncher.startup(ServiceLauncher.java:71) [org.eclipse.birt.runtime_3.7.1.v20110913-1734.jar:]

                                at org.eclipse.birt.core.framework.Platform.startup(Platform.java:75) [org.eclipse.birt.runtime_3.7.1.v20110913-1734.jar:]

                                at org.jboss.tools.birt.servlet.BirtEngine.getBirtEngine(BirtEngine.java:56) [jboss-birt-servlet.jar:]

                                 

                                Any idea of how to solve this? I guess I need to change the dependency, but I can't find a module or jar with __redirected.__DocumentBuilderFactory.

                                 

                                Thanks

                                I have the same Problem. Have you already solved it?

                                I'm using Birt 3.7.2 and Jboss 7.1.1.

                                I also tried to create a Jboss module to avoid such a big ear-file but always get the following Exception at factory.createReportEngine( c );


                                ERROR [org.jboss.ws.common.invocation.InvocationHandlerJAXWS] (http--0.0.0.0-8080-1) Method invocation failed with exception: null: java.lang.reflect.InvocationTargetException

                                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_31]

                                          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_31]

                                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_31]

                                          at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_31]

                                          at org.jboss.ws.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:111)

                                          at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:181)

                                          at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:127)

                                          at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)

                                          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [rt.jar:1.6.0_31]

                                          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_31]

                                          at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_31]

                                          at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)

                                          at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)

                                          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)

                                          at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

                                          at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)

                                          at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91)

                                          at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:169)

                                          at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)

                                          at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)

                                          at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)

                                          at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                                          at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)

                                          at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi-2.0.3.GA.jar:2.0.3.GA]

                                          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]

                                          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

                                          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

                                          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

                                          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

                                          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397) [jbossweb-7.0.13.Final.jar:]

                                          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                                          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

                                          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

                                          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

                                          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

                                          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

                                          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

                                          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

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

                                Caused by: java.lang.NoClassDefFoundError: javax/xml/parsers/DocumentBuilderFactory

                                          at org.eclipse.birt.core.framework.jar.BundleLoader.loadExtensions(BundleLoader.java:147) [org.eclipse.birt.runtime_3.7.2.v20120214-1408.jar:]

                                          at org.eclipse.birt.core.framework.jar.BundleLoader.load(BundleLoader.java:63) [org.eclipse.birt.runtime_3.7.2.v20120214-1408.jar:]

                                          at org.eclipse.birt.core.framework.jar.ServicePlatform.installBundle(ServicePlatform.java:57) [org.eclipse.birt.runtime_3.7.2.v20120214-1408.jar:]

                                          at org.eclipse.birt.core.framework.jar.ServiceLauncher.startup(ServiceLauncher.java:71) [org.eclipse.birt.runtime_3.7.2.v20120214-1408.jar:]

                                          at org.eclipse.birt.core.framework.Platform.startup(Platform.java:75) [org.eclipse.birt.runtime_3.7.2.v20120214-1408.jar:]

                                          at com.gelita.webservice.HtmlGenerate.aeuGetReportAsHtml(HtmlGenerate.java:68) [classes:]

                                          ... 39 more

                                Caused by: java.lang.ClassNotFoundException: javax.xml.parsers.DocumentBuilderFactory from [Module "org.birt:main" from local module loader @51052d (roots: C:\jboss-as-7.1.1.Final\modules)]

                                          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

                                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

                                          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                                          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                                          ... 45 more

                                 

                                 

                                Hope someone can help me.

                                Thanks

                                • 14. Re: can you use tools birt integration with normal JSF 2?
                                  u j Novice

                                  I still put all the Birt libs into the war file.

                                  The jboss tools team could provide or explain how to make a jboss birt module.

                                  Maybe you could generate a Jira entry for that.

                                   

                                  Regards

                                  1 2 Previous Next