6 Replies Latest reply on Jun 27, 2009 12:52 AM by Marcelo Magno

    integrate a new jar library

    abdel ame Newbie

      Hi,
      I'm trying to add an exeternal jar library to my seam Project and have a question:
      How can I add it?





      My development Environement:
      Eclipse ganymede, seam 2.0, JBoss 4.2

        • 1. Re: integrate a new jar library
          Yasser Hawari Newbie

          firstly place your jars in your project's lib directory. This directory acts as a project jar repository. however, this will not bundle those jars with ur war or ear.


          to bundle them, u should add the name of the jars to:
          deployed-jars-ear.list   OR
          deployed-jars-war.list



          • 2. Re: integrate a new jar library
            abdel ame Newbie

            Thanks for your replay,
            I added the jar library as follows:
            right click of the project name,Properties,Java Build Path,libraries,Add JARs


            And then I writed the name of my jar library into deployed-jars-war.list.


            I get then the folowing error when publishing the server:


            20:13:41,315 ERROR [[/dynWebProject2]] Error loading org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader@1371a57 org.primefaces.ui.resource.ResourceServlet
            java.lang.ClassNotFoundException: org.primefaces.ui.resource.ResourceServlet




            I verified manually and I found that the added jar library contains the in the error mentioned org.primefaces.ui.resource.ResourceServlet class.


            What can I do for resolving this error?


            Regards
            Aha


            • 3. Re: integrate a new jar library
              Yasser Hawari Newbie

              did u manually copy the jar files (not via Eclipse build path) and paste them in /urProject/lib directory.


              also note that if u r using EAR, deployed-jars-war.list jars cannot be used by ur seam components, u should try deployed-jars-ear.list instead.


              hope it helps

              • 4. Re: integrate a new jar library
                abdel ame Newbie

                Hi yasser,
                I copied manually the jar file and paste it in /myProject/WebContent/WEB-INF/lib directory.


                Now I get this error when I start the JBoss AS server:


                18:26:58,670 ERROR [StandardContext] Error listenerStart
                18:26:58,670 ERROR [StandardContext] Context [/dynWebProject2] startup failed due to previous errors
                18:26:58,671 INFO  [SessionFactoryImpl] closing
                18:26:58,677 WARN  [ServiceController] Problem starting service jboss.web.deployment:war=dynWebProject2.war,id=-363795798
                org.jboss.deployment.DeploymentException: URL file:/D:/JAVA/workspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_4.2_Runtime_and_Portal_2.7.1_1_Server/deploy/dynWebProject2.war/ deployment failed
                     at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:379)
                     at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
                     at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
                     at org.jboss.web.WebModule.startModule(WebModule.java:83)
                     at org.jboss.web.WebModule.startService(WebModule.java:61)
                     at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                     at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                     at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                     at java.lang.reflect.Method.invoke(Unknown Source)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                     at $Proxy0.start(Unknown Source)
                     at org.jboss.system.ServiceController.start(ServiceController.java:417)
                     at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                     at java.lang.reflect.Method.invoke(Unknown Source)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                     at $Proxy44.start(Unknown Source)
                     at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                     at java.lang.reflect.Method.invoke(Unknown Source)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                     at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
                     at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                     at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
                     at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                     at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                     at $Proxy45.start(Unknown Source)
                     at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                     at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                     at java.lang.reflect.Method.invoke(Unknown Source)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                     at $Proxy9.deploy(Unknown Source)
                     at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                     at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
                     at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                     at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
                     at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
                18:26:58,677 ERROR [MainDeployer] Could not start deployment: file:/D:/JAVA/workspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_4.2_Runtime_and_Portal_2.7.1_1_Server/deploy/dynWebProject2.war/
                org.jboss.deployment.DeploymentException: URL file:/D:/JAVA/workspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_4.2_Runtime_and_Portal_2.7.1_1_Server/deploy/dynWebProject2.war/ deployment failed
                     at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:379)
                     at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
                     at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
                     at org.jboss.web.WebModule.startModule(WebModule.java:83)
                     at org.jboss.web.WebModule.startService(WebModule.java:61)
                     at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                     at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                     at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                     at java.lang.reflect.Method.invoke(Unknown Source)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                     at $Proxy0.start(Unknown Source)
                     at org.jboss.system.ServiceController.start(ServiceController.java:417)
                     at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                     at java.lang.reflect.Method.invoke(Unknown Source)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                     at $Proxy44.start(Unknown Source)
                     at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                     at java.lang.reflect.Method.invoke(Unknown Source)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                     at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
                     at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                     at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
                     at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                     at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                     at $Proxy45.start(Unknown Source)
                     at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                     at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                     at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                     at java.lang.reflect.Method.invoke(Unknown Source)
                     at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                     at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                     at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                     at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                     at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                     at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                     at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                     at $Proxy9.deploy(Unknown Source)
                     at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                     at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
                     at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                     at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
                     at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)



                I use war deployment and I writed the name of the jar file in the deployed-jars-war.list



                Regards






                also note that if u r using EAR, deployed-jars-war.list jars cannot be used by ur seam components, u should try deployed-jars-ear.list instead.


                hope it helps








                • 5. Re: integrate a new jar library
                  abdel ame Newbie

                  Hi,
                  I'm still waiting for a solution:
                  How can I add the prime Faces Library to my seam Project?


                  Thanks in advance for every help

                  • 6. Re: integrate a new jar library
                    Marcelo Magno Newbie

                    Hi...


                    I managed to workarround this onde.


                    in web-inf let primefaces mappings be the last one.


                    Alson need to deploy


                    slf4j-api-1.5.6.jar
                    slf4j-simple-1.5.6.jar


                    in lib folder. Then add they're  names to deployed-jars.list


                    jars can be fount herer http://www.slf4j.org/


                    I used version 1.5.8 instead