11 Replies Latest reply on Oct 24, 2012 11:56 AM by davisonri_k12

    Seam Faces dependency on Prettyfaces

    fabriciolemos

      I upgraded Seam Faces from 3.0.0 to 3.0.1 and now I´m receiving java.lang.ClassNotFoundException: com.ocpsoft.pretty.faces.spi.ConfigurationProvider on application startup.


      I solved it by adding


           <dependency>
                <groupId>com.ocpsoft</groupId>
                <artifactId>prettyfaces-jsf2</artifactId>
                <version>3.2.1</version>
           </dependency>



      But shouldn´t it be dealt in Seam Faces pom.xml?


      I´m using glassfish 3.1

        • 1. Re: Seam Faces dependency on Prettyfaces
          lightguard

          It's provided and optional (because you could use Faces and the view config without URL rewriting). Which feature(s) are you using that required you to use PrettyFaces (my guess is the URL rewriting in the view config)?

          • 2. Re: Seam Faces dependency on Prettyfaces
            fabriciolemos

            I´m not using URL rewriting. Even without ViewConfig I have to import PrettyFaces. The same code works with Seam Faces 3.0.0.Final and no Prettyfaces import.

            • 3. Re: Seam Faces dependency on Prettyfaces
              lightguard

              Brian should be better able to answer this, I'll make sure to put this one on his radar.

              • 4. Re: Seam Faces dependency on Prettyfaces
                bleathem

                This is unfortunately a problem with the Weld 1.1 / Glassfish 3.1 integration.


                See:

                OverzealousClassScanner


                Have you tried upgrading the weld osgi bundle in glassfish 3.1?  See:

                UpgradingWeldInGlassFish31


                If upgrading the weld osgi bundle doesn't help, you'll just have to budle prettyfaces until the glassfish/weld integration issues are resolved in a future Glassfish release.

                • 5. Re: Seam Faces dependency on Prettyfaces
                  fabriciolemos

                  Brian Leathem wrote on May 09, 2011 22:35:


                  Have you tried upgrading the weld osgi bundle in glassfish 3.1?


                  Yes, I have. I´ll keep the dependency to Prettyfaces then. Thank you for the response.


                  • 6. Re: Seam Faces dependency on Prettyfaces
                    lexsoto

                    Also seen this problem with JBoss 7.0.2.Final as well as:





                    WARN  [org.jboss.modules] (MSC service thread 1-16) Failed to define class org.jboss.seam.international.datetimezone.ForwardingDateTimeZone in Module "deployment.jsf-demo.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/jboss/seam/international/datetimezone/ForwardingDateTimeZone (Module "deployment.jsf-demo.war:main" from Service Module Loader)

                    ....

                    java.lang.NoClassDefFoundError: org/joda/time/DateTimeZone



                    Why isn't Seam including these dependencies?

                    • 7. Re: Seam Faces dependency on Prettyfaces
                      lightguard

                      Alex Soto wrote on Oct 12, 2011 15:02:


                      Also seen this problem with JBoss 7.0.2.Final as well as:



                      WARN  [org.jboss.modules] (MSC service thread 1-16) Failed to define class org.jboss.seam.international.datetimezone.ForwardingDateTimeZone in Module "deployment.jsf-demo.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/jboss/seam/international/datetimezone/ForwardingDateTimeZone (Module "deployment.jsf-demo.war:main" from Service Module Loader)

                      ....

                      java.lang.NoClassDefFoundError: org/joda/time/DateTimeZone



                      Why isn't Seam including these dependencies?


                      They're supposed to be optional portions of Seam International. I haven't had the time to verify if this is a bug in AS7 or just something weird with Seam.

                      • 8. Re: Seam Faces dependency on Prettyfaces
                        kwutzke

                        I'm also getting this dependency error on JBoss AS 7.1.1.Final + Seam 3.1.0.Final:

                        {code}

                        11:09:02,140 WARN  [org.jboss.modules] (MSC service thread 1-4) Failed to define class org.jboss.seam.faces.rewrite.RewriteConfiguration in Module "deployment.pqgenerator2.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/jboss/seam/faces/rewrite/RewriteConfiguration (Module "deployment.pqgenerator2.war:main" from Service Module Loader)

                            at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396)

                            at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)

                            at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)

                            at org.jboss.modules.Module.loadModuleClass(Module.java:517)

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

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

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

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

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

                            at org.jboss.as.weld.WeldModuleResourceLoader.classForName(WeldModuleResourceLoader.java:68) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

                            at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:77) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                            at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:115) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                            at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:171) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                            at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:336) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                            at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

                            at org.jboss.as.weld.services.WeldService.start(WeldService.java:76) [jboss-as-weld-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.runWorker(Unknown Source) [rt.jar:1.7.0_02]

                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_02]

                            at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_02]

                        Caused by: java.lang.NoClassDefFoundError: com/ocpsoft/pretty/faces/spi/ConfigurationProvider

                            at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_02]

                            at java.lang.ClassLoader.defineClass(Unknown Source) [rt.jar:1.7.0_02]

                            at java.security.SecureClassLoader.defineClass(Unknown Source) [rt.jar:1.7.0_02]

                            at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)

                            at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)

                            ... 20 more

                        Caused by: java.lang.ClassNotFoundException: com.ocpsoft.pretty.faces.spi.ConfigurationProvider from [Module "deployment.pqgenerator2.war:main" from Service Module Loader]

                            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.performLoadClass(ConcurrentClassLoader.java:398)

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

                            ... 25 more{code}

                        It's probably time to reopen this one:

                         

                        https://issues.jboss.org/browse/SEAMFACES-187

                         

                        ?

                         

                        Or are we waiting for this one now?:

                         

                        https://issues.jboss.org/browse/SEAMFACES-221

                         

                        In the meantime most people should get by with:

                        {code}

                        <dependency>

                          <groupId>com.ocpsoft</groupId>

                          <artifactId>prettyfaces-jsf2</artifactId>

                        </dependency>

                        {code}

                         

                        Karsten

                        • 9. Re: Seam Faces dependency on Prettyfaces
                          tscheky

                          Do you know if this is already fixed? Which AS version? Which seam-faces jar should be used?

                           

                          What do you mean with theses dependencies - which xml configuration is this?

                           

                          Thank you, Gerhard

                          • 10. Re: Seam Faces dependency on Prettyfaces
                            lightguard

                            They're optional dependencies, Weld is throwing the warning because it can't find the classes that are referenced in the extensions during application load. I know the logs are annoying / disturbing but in this instance they're harmless.

                            • 11. Re: Seam Faces dependency on Prettyfaces
                              davisonri_k12

                              this might be a question for a different discussion. But is that a way i can filter out these specific java.lang.NoClassDefFoundError errors from the logs. adding a Filter pattern match in the jboss configuration file for the log handler does not seem to filter out these exceptions from the log during app deployment.