1 2 3 Previous Next 31 Replies Latest reply on Apr 17, 2012 5:11 AM by sunls

    Running Seam 2 archives on Jboss 7

    matt.drees

      Hi all,

       

      My app is a Seam 2 war.  I've found I can deploy it to AS7 successfully as an exploded directory, but not as a war archive.  When I try to deploy as an archive, I get a stacktrace like this:

       

       

      15:31:21,837 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/ccp]] (MSC service thread 1-3) Exception sending context
      initialized event to listener instance of class org.jboss.seam.servlet.SeamListener: java.lang.RuntimeException: Error handling file /content/ccp.war/WEB-INF/lib/jboss-seam-ui-2.2.2.Final.seam2jsf2.jar
          at org.jboss.seam.deployment.URLScanner.handleArchiveByFile(URLScanner.java:134) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:]
          at org.jboss.seam.deployment.URLScanner.handle(URLScanner.java:107) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:]
          at org.jboss.seam.deployment.URLScanner.scanResources(URLScanner.java:90) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:]
          at org.jboss.seam.deployment.StandardDeploymentStrategy.scan(StandardDeploymentStrategy.java:119) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:]
          at org.jboss.seam.init.Initialization.create(Initialization.java:130) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:]
          at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:]
          at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.0.CR1.jar:7.0.0.Beta4-SNAPSHOT]
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3817) [jbossweb-7.0.0.CR1.jar:7.0.0.Beta4-SNAPSHOT]
          at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.0.Beta4-SNAPSHOT.jar:7.0.0.Beta4-SNAPSHOT]
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1675)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
          at java.lang.Thread.run(Thread.java:680) [:1.6.0_24]
      Caused by: java.util.zip.ZipException: error in opening zip file
          at java.util.zip.ZipFile.open(Native Method) [:1.6.0_24]
          at java.util.zip.ZipFile.<init>(ZipFile.java:127) [:1.6.0_24]
          at java.util.zip.ZipFile.<init>(ZipFile.java:144) [:1.6.0_24]
          at org.jboss.seam.deployment.URLScanner.handleArchiveByFile(URLScanner.java:123) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:]
          ... 12 more
      

       

       

      The stacktrace doesn't show it, but the URLScanner is trying to handle this URL:

       

      vfs:/content/ccp.war/WEB-INF/lib/jboss-seam-ui-2.2.2.Final.seam2jsf2.jar/META-INF/components.xml
      

       

      URLScanner is trying to treat this as if it's a file url, and of course ZipFile.open() can't find this file on the real filesystem.

       

      I believe Jboss AS 5 and 6 had a special Scanner implementation to enable Seam to read archive deployments. 

       

      Is a similar scanner planned for AS 7?

       

      Thanks!

      -Matt

        • 1. Re: Running Seam 2 archives on Jboss 7
          matt.drees

          It looks like the same issue as AS7-941

          • 2. Re: Running Seam 2 archives on Jboss 7
            alesj

            Can you try my branch, which has the latest fix?

            * https://github.com/alesj/jboss-as/tree/vfs-rl-941

             

            It worked for me, wrt resource scanning,

            but my test app is quite old so it failed to find some HibValidator class.

            • 3. Re: Running Seam 2 archives on Jboss 7
              matt.drees

              Yeah, I will give that a shot.

              • 4. Re: Running Seam 2 archives on Jboss 7
                matt.drees

                Hi Ales,

                 

                Sorry, it doesn't seem to work.  This is what I get when deploying my app to your AS7 version  (after working around another unrelated problem):

                 

                 

                15:21:15,168 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/ccp]] (MSC service thread 1-4) Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener: java.lang.IllegalArgumentException: Null path
                    at org.jboss.vfs.VFS.getChild(VFS.java:207) [jboss-vfs-3.0.0.GA.jar:3.0.0.GA]
                    at org.jboss.vfs.VFS.getChild(VFS.java:193) [jboss-vfs-3.0.0.GA.jar:3.0.0.GA]
                    at org.jboss.vfs.VFS.getChild(VFS.java:174) [jboss-vfs-3.0.0.GA.jar:3.0.0.GA]
                    at org.jboss.seam.integration.jbossas.vfs.VFSScanner.getRoot(VFSScanner.java:64) [jboss-seam-int.jar:6.0.0.GA]
                    at org.jboss.seam.integration.jbossas.vfs.VFSScanner.scanResources(VFSScanner.java:151) [jboss-seam-int.jar:6.0.0.GA]
                    at org.jboss.seam.deployment.StandardDeploymentStrategy.scan(StandardDeploymentStrategy.java:119) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:6.0.0.GA]
                    at org.jboss.seam.init.Initialization.create(Initialization.java:130) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:6.0.0.GA]
                    at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:6.0.0.GA]
                    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.0.CR2.jar:7.0.0.Beta4-SNAPSHOT]
                    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3817) [jbossweb-7.0.0.CR2.jar:7.0.0.Beta4-SNAPSHOT]
                    at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.0.Beta4-SNAPSHOT.jar:7.0.0.Beta4-SNAPSHOT]
                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1675)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
                    at java.lang.Thread.run(Thread.java:680) [:1.6.0_24]
                

                 

                 

                The URL that VFS is choking on is

                 

                jar:file:/Users/mattdrees/Scratch/as7-seam-fix/modules/org/jboss/integration/ext-content/main/bundled/jboss-seam-int.jar!/seam.properties
                

                 

                This java.net.URL, when converted to a java.net.URI, returns null for getPath().

                 

                This seems strange, because the URL object's 'path' field is clearly non-null (as I can see in the debugger).  However the URI returned by URL.toURI() has a null 'path' field.

                 

                So I can't tell if this is a VFS bug or a jboss-seam-int-jbossas bug.  If it's not a VFS bug, at the very least I think the error message could be nicer.

                 

                 

                Also, it may be helpful to know that the jboss-seam-int jar is the only "jar:file:" url; the other urls returned by the classloader in scanResources() are "vfs:" urls.

                • 5. Re: Running Seam 2 archives on Jboss 7
                  matt.drees

                  Ales Justin wrote:

                   

                  but my test app is quite old so it failed to find some HibValidator class.

                   

                  To get my app running I had to bundle org.hibernate:hibernate-validator-legacy:4.0.2.GA with my app.  It was provided on AS6, I think, but it's not available on AS7, apparently.

                   

                  This might fix your problem.

                  • 6. Re: Running Seam 2 archives on Jboss 7
                    alesj

                    Sorry, it doesn't seem to work.  This is what I get when deploying my app to your AS7 version  (after working around another unrelated problem):

                     

                     

                    15:21:15,168 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/ccp]] (MSC service thread 1-4) Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener: java.lang.IllegalArgumentException: Null path
                        at org.jboss.vfs.VFS.getChild(VFS.java:207) [jboss-vfs-3.0.0.GA.jar:3.0.0.GA]
                        at org.jboss.vfs.VFS.getChild(VFS.java:193) [jboss-vfs-3.0.0.GA.jar:3.0.0.GA]
                        at org.jboss.vfs.VFS.getChild(VFS.java:174) [jboss-vfs-3.0.0.GA.jar:3.0.0.GA]
                        at org.jboss.seam.integration.jbossas.vfs.VFSScanner.getRoot(VFSScanner.java:64) [jboss-seam-int.jar:6.0.0.GA]
                        at org.jboss.seam.integration.jbossas.vfs.VFSScanner.scanResources(VFSScanner.java:151) [jboss-seam-int.jar:6.0.0.GA]
                        at org.jboss.seam.deployment.StandardDeploymentStrategy.scan(StandardDeploymentStrategy.java:119) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:6.0.0.GA]
                    

                    Are you sure you have all commits from my "https://github.com/alesj/jboss-as/commits/vfs-rl-941" branch?

                    Specially the last two:

                    * https://github.com/alesj/jboss-as/commit/2e118ee78070be94da3adf1d539fe19473373a7e

                    * https://github.com/alesj/jboss-as/commit/04745e3575fd124414930be0691965dd48141b99

                     

                    As this is what I used to get as well, before changing to VFS ResourceLoader.

                    And this is what's still in the main (and hence my) master.

                    • 7. Re: Running Seam 2 archives on Jboss 7
                      alesj

                      but my test app is quite old so it failed to find some HibValidator class.

                       

                      To get my app running I had to bundle org.hibernate:hibernate-validator-legacy:4.0.2.GA with my app.  It was provided on AS6, I think, but it's not available on AS7, apparently.

                       

                      This might fix your problem.

                      So you managed to get it running?

                       

                      I'm testing my stuff with jboss-seam-jpa.war example.

                      Let me try and bundle this legacy validator jar.

                      • 8. Re: Running Seam 2 archives on Jboss 7
                        jaikiran

                        Matt Drees wrote:

                         

                        Ales Justin wrote:

                         

                        but my test app is quite old so it failed to find some HibValidator class.

                         

                        To get my app running I had to bundle org.hibernate:hibernate-validator-legacy:4.0.2.GA with my app.  It was provided on AS6, I think, but it's not available on AS7, apparently.

                         

                         

                        The way classloading works in AS7 is different from what was in previous versions. Here's a quick intro:

                         

                        https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7

                        https://docs.jboss.org/author/display/AS7/Implicit+module+dependencies+for+deployments (work in progress article)

                         

                        To briefly summarize the behaviour, I'll just copy/paste a message that I sent out in some other discussion:

                         

                        Classloading has changed drastically in AS7. In earlier versions of JBoss AS, if an application did not package a jar for some dependent code (like logging) then the classloading system would delegate loading of that class to the "parent" classloader which would pick it up from the server level jars which we ship (example: log4j jars). More details about the classloading in previous versions can be found here http://community.jboss.org/wiki/JBossClassLoadingUseCases.

                         

                        Now in AS7, the classloading system is based on module classloaders. Each application will have a module classloader associated with it and the "module" specifies it's "dependencies" on other module. Each module is a collection of classes and resources. In the early stages of deployment processing, a deployment in AS7 by default doesn't have any module dependencies, unless explicitly specified (see later part of the mail on how to do it). The deployment processing implementation code implicitly adds some module dependencies based on what kind of a application is being processed. For example, if the deployment has EJBs, then the deployment processing code explicitly adds a dependency on Java EE module. So effectively, all the Java EE API classes are now "visible" to this deployment and can be loaded by the classloader associated with this deployment. Furthermore, all the jar contained in the .war/WEB-INF/lib or .ear/lib are added to the module dependencies. If an application depends on some other library which isn't part of this set, then it has to be explicitly specified as a module dependency by the application developer. This can be done via the MANIFEST.MF file which should contain a "Dependencies" attribute as follows:

                         

                        Dependencies: org.hibernate.validator

                         

                        In this example, the application is specifying a dependency on the "org.hibernate.validator" module (note that the module name and the package name need not always match. Module name can be arbitrary and is defined in the module.xml of the module. See JBOSS_HOME/modules folder and subfolders for examples).

                         

                        Similarly, in your example, you'll have to setup an explicit dependency on the Hibernate validator module. If you don't want to add this dependency explicitly, then packaging those jar files within the .war/WEB-INF/lib (or .ear/lib) should get you past these issues (like it did in your case)

                        • 9. Re: Running Seam 2 archives on Jboss 7
                          alesj

                          To get my app running I had to bundle org.hibernate:hibernate-validator-legacy:4.0.2.GA with my app.  It was provided on AS6, I think, but it's not available on AS7, apparently.

                           

                          This might fix your problem.

                          It looks like I'm missing some really old class:

                           

                          Caused by: java.lang.NoClassDefFoundError: org/hibernate/validator/InvalidValue

                              at java.lang.Class.getDeclaredMethods0(Native Method) [:1.6.0_24]

                           

                          --

                           

                          Skywalker:lib alesj$ jar -tf hibernate-validator-4.0.2.GA.jar

                          META-INF/

                          META-INF/MANIFEST.MF

                          META-INF/services/

                          META-INF/services/javax.validation.spi.ValidationProvider

                          META-INF/validation-configuration-1.0.xsd

                          META-INF/validation-mapping-1.0.xsd

                          org/

                          org/hibernate/

                          org/hibernate/validator/

                          org/hibernate/validator/constraints/

                          org/hibernate/validator/constraints/Email.class

                          org/hibernate/validator/constraints/impl/

                          org/hibernate/validator/constraints/impl/AssertFalseValidator.class

                          org/hibernate/validator/constraints/impl/AssertTrueValidator.class

                          org/hibernate/validator/constraints/impl/DecimalMaxValidatorForNumber.class

                          org/hibernate/validator/constraints/impl/DecimalMaxValidatorForString.class

                          org/hibernate/validator/constraints/impl/DecimalMinValidatorForNumber.class

                          org/hibernate/validator/constraints/impl/DecimalMinValidatorForString.class

                          org/hibernate/validator/constraints/impl/DigitsValidatorForNumber.class

                          org/hibernate/validator/constraints/impl/DigitsValidatorForString.class

                          org/hibernate/validator/constraints/impl/EmailValidator.class

                          org/hibernate/validator/constraints/impl/FutureValidatorForCalendar.class

                          org/hibernate/validator/constraints/impl/FutureValidatorForDate.class

                          org/hibernate/validator/constraints/impl/LengthValidator.class

                          org/hibernate/validator/constraints/impl/MaxValidatorForNumber.class

                          org/hibernate/validator/constraints/impl/MaxValidatorForString.class

                          org/hibernate/validator/constraints/impl/MinValidatorForNumber.class

                          org/hibernate/validator/constraints/impl/MinValidatorForString.class

                          org/hibernate/validator/constraints/impl/NotNullValidator.class

                          org/hibernate/validator/constraints/impl/NullValidator.class

                          org/hibernate/validator/constraints/impl/PastValidatorForCalendar.class

                          org/hibernate/validator/constraints/impl/PastValidatorForDate.class

                          org/hibernate/validator/constraints/impl/PatternValidator.class

                          org/hibernate/validator/constraints/impl/SizeValidatorForArray.class

                          org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfBoolean.class

                          org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfByte.class

                          org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfChar.class

                          org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfDouble.class

                          org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfFloat.class

                          org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfInt.class

                          org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfLong.class

                          org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfPrimitives.class

                          org/hibernate/validator/constraints/impl/SizeValidatorForArraysOfShort.class

                          org/hibernate/validator/constraints/impl/SizeValidatorForCollection.class

                          org/hibernate/validator/constraints/impl/SizeValidatorForMap.class

                          org/hibernate/validator/constraints/impl/SizeValidatorForString.class

                          org/hibernate/validator/constraints/Length.class

                          org/hibernate/validator/constraints/NotEmpty.class

                          org/hibernate/validator/constraints/Range.class

                          org/hibernate/validator/engine/

                          org/hibernate/validator/engine/ConfigurationImpl.class

                          org/hibernate/validator/engine/ConstraintTree$1.class

                          org/hibernate/validator/engine/ConstraintTree$ValidatorCacheKey.class

                          org/hibernate/validator/engine/ConstraintTree.class

                          org/hibernate/validator/engine/ConstraintValidatorContextImpl$ErrorBuilderImpl.class

                          org/hibernate/validator/engine/ConstraintValidatorContextImpl$InIterableNodeBuilderImpl.class

                          org/hibernate/validator/engine/ConstraintValidatorContextImpl$InIterablePropertiesBuilderImpl.class

                          org/hibernate/validator/engine/ConstraintValidatorContextImpl$NodeBuilderImpl.class

                          org/hibernate/validator/engine/ConstraintValidatorContextImpl.class

                          org/hibernate/validator/engine/ConstraintValidatorFactoryImpl.class

                          org/hibernate/validator/engine/ConstraintViolationImpl.class

                          org/hibernate/validator/engine/GlobalExecutionContext.class

                          org/hibernate/validator/engine/groups/

                          org/hibernate/validator/engine/groups/Group.class

                          org/hibernate/validator/engine/groups/GroupChain.class

                          org/hibernate/validator/engine/groups/GroupChainGenerator.class

                          org/hibernate/validator/engine/LocalExecutionContext.class

                          org/hibernate/validator/engine/MessageAndPath.class

                          org/hibernate/validator/engine/MessageInterpolatorContext.class

                          org/hibernate/validator/engine/NodeImpl.class

                          org/hibernate/validator/engine/PathImpl.class

                          org/hibernate/validator/engine/resolver/

                          org/hibernate/validator/engine/resolver/DefaultTraversableResolver.class

                          org/hibernate/validator/engine/resolver/JPATraversableResolver.class

                          org/hibernate/validator/engine/resolver/SingleThreadCachedTraversableResolver$1.class

                          org/hibernate/validator/engine/resolver/SingleThreadCachedTraversableResolver$TraversableHolder.class

                          org/hibernate/validator/engine/resolver/SingleThreadCachedTraversableResolver.class

                          org/hibernate/validator/engine/ResourceBundleMessageInterpolator$LocalisedMessage.class

                          org/hibernate/validator/engine/ResourceBundleMessageInterpolator.class

                          org/hibernate/validator/engine/ValidatorContextImpl.class

                          org/hibernate/validator/engine/ValidatorFactoryImpl.class

                          org/hibernate/validator/engine/ValidatorImpl.class

                          org/hibernate/validator/HibernateValidator.class

                          org/hibernate/validator/HibernateValidatorConfiguration.class

                          org/hibernate/validator/metadata/

                          org/hibernate/validator/metadata/AnnotationIgnores.class

                          org/hibernate/validator/metadata/BeanDescriptorImpl.class

                          org/hibernate/validator/metadata/BeanMetaData.class

                          org/hibernate/validator/metadata/BeanMetaDataCache.class

                          org/hibernate/validator/metadata/BeanMetaDataImpl.class

                          org/hibernate/validator/metadata/ConstraintDescriptorImpl$ClassIndexWrapper.class

                          org/hibernate/validator/metadata/ConstraintDescriptorImpl.class

                          org/hibernate/validator/metadata/ConstraintHelper.class

                          org/hibernate/validator/metadata/ConstraintOrigin.class

                          org/hibernate/validator/metadata/ElementDescriptorImpl$ConstraintFinderImpl.class

                          org/hibernate/validator/metadata/ElementDescriptorImpl.class

                          org/hibernate/validator/metadata/MetaConstraint$1.class

                          org/hibernate/validator/metadata/MetaConstraint.class

                          org/hibernate/validator/metadata/PropertyDescriptorImpl.class

                          org/hibernate/validator/util/

                          org/hibernate/validator/util/annotationfactory/

                          org/hibernate/validator/util/annotationfactory/AnnotationDescriptor.class

                          org/hibernate/validator/util/annotationfactory/AnnotationFactory.class

                          org/hibernate/validator/util/annotationfactory/AnnotationProxy$1.class

                          org/hibernate/validator/util/annotationfactory/AnnotationProxy.class

                          org/hibernate/validator/util/ContainsField.class

                          org/hibernate/validator/util/ContainsMethod.class

                          org/hibernate/validator/util/GetAnnotationParameter.class

                          org/hibernate/validator/util/GetClassLoader.class

                          org/hibernate/validator/util/GetConstructor.class

                          org/hibernate/validator/util/GetDeclaredField.class

                          org/hibernate/validator/util/GetDeclaredFields.class

                          org/hibernate/validator/util/GetDeclaredMethods.class

                          org/hibernate/validator/util/GetMethod.class

                          org/hibernate/validator/util/GetMethodFromPropertyName.class

                          org/hibernate/validator/util/GetMethods.class

                          org/hibernate/validator/util/IdentitySet.class

                          org/hibernate/validator/util/LazyValidatorFactory.class

                          org/hibernate/validator/util/LoadClass.class

                          org/hibernate/validator/util/LoggerFactory.class

                          org/hibernate/validator/util/NewInstance.class

                          org/hibernate/validator/util/ReflectionHelper.class

                          org/hibernate/validator/util/SetAccessibility.class

                          org/hibernate/validator/util/ValidatorTypeHelper.class

                          org/hibernate/validator/util/Version.class

                          org/hibernate/validator/ValidationMessages.properties

                          org/hibernate/validator/ValidationMessages_de.properties

                          org/hibernate/validator/ValidationMessages_fr.properties

                          org/hibernate/validator/xml/

                          org/hibernate/validator/xml/AnnotationType.class

                          org/hibernate/validator/xml/BeanType.class

                          org/hibernate/validator/xml/ClassType.class

                          org/hibernate/validator/xml/ConstraintDefinitionType.class

                          org/hibernate/validator/xml/ConstraintMappingsType.class

                          org/hibernate/validator/xml/ConstraintType.class

                          org/hibernate/validator/xml/ElementType.class

                          org/hibernate/validator/xml/FieldType.class

                          org/hibernate/validator/xml/GetterType.class

                          org/hibernate/validator/xml/GroupSequenceType.class

                          org/hibernate/validator/xml/GroupsType.class

                          org/hibernate/validator/xml/ObjectFactory.class

                          org/hibernate/validator/xml/package-info.class

                          org/hibernate/validator/xml/PayloadType.class

                          org/hibernate/validator/xml/PropertyType.class

                          org/hibernate/validator/xml/ValidatedByType.class

                          org/hibernate/validator/xml/ValidationBootstrapParameters.class

                          org/hibernate/validator/xml/ValidationConfigType.class

                          org/hibernate/validator/xml/ValidationXmlParser.class

                          org/hibernate/validator/xml/XmlMappingParser.class

                          META-INF/maven/

                          META-INF/maven/org.hibernate/

                          META-INF/maven/org.hibernate/hibernate-validator/

                          META-INF/maven/org.hibernate/hibernate-validator/pom.xml

                          META-INF/maven/org.hibernate/hibernate-validator/pom.properties

                          org/hibernate/validator/jtype/

                          org/hibernate/validator/jtype/ClassSerializer.class

                          org/hibernate/validator/jtype/ClassSerializers$1.class

                          org/hibernate/validator/jtype/ClassSerializers$2.class

                          org/hibernate/validator/jtype/ClassSerializers.class

                          org/hibernate/validator/jtype/ClassUtils.class

                          org/hibernate/validator/jtype/DefaultGenericArrayType.class

                          org/hibernate/validator/jtype/DefaultParameterizedType.class

                          org/hibernate/validator/jtype/DefaultTypeVariable.class

                          org/hibernate/validator/jtype/DefaultWildcardType.class

                          org/hibernate/validator/jtype/Generic$DefaultGeneric.class

                          org/hibernate/validator/jtype/Generic.class

                          org/hibernate/validator/jtype/Generics.class

                          org/hibernate/validator/jtype/Types.class

                          org/hibernate/validator/jtype/TypeUtils.class

                          org/hibernate/validator/jtype/Utils.class

                          META-INF/maven/com.googlecode.jtype/

                          META-INF/maven/com.googlecode.jtype/jtype/

                          META-INF/maven/com.googlecode.jtype/jtype/pom.xml

                          META-INF/maven/com.googlecode.jtype/jtype/pom.properties

                          • 10. Re: Running Seam 2 archives on Jboss 7
                            alesj
                            It looks like I'm missing some really old class:

                             

                            Caused by: java.lang.NoClassDefFoundError: org/hibernate/validator/InvalidValue

                                at java.lang.Class.getDeclaredMethods0(Native Method) [:1.6.0_24]

                            Found here:

                            * http://www.jarfinder.com/index.php/java/info/org.hibernate.validator.InvalidValue

                            • 11. Re: Running Seam 2 archives on Jboss 7
                              matt.drees

                              jaikiran pai wrote:

                               

                              Matt Drees wrote:

                               

                              Ales Justin wrote:

                               

                              but my test app is quite old so it failed to find some HibValidator class.

                               

                              To get my app running I had to bundle org.hibernate:hibernate-validator-legacy:4.0.2.GA with my app.  It was provided on AS6, I think, but it's not available on AS7, apparently.

                               

                               

                              The way classloading works in AS7 is different from what was in previous versions. Here's a quick intro:

                              ...

                              Hi Jaikiran,

                              Thanks for the helpful info, but in this case that's not enough to solve the problem.  The org.hibernate.validator module on AS7 only has org.hibernate:hibernate-validator:4.1.0.Final.  It does not have org.hibernate:hibernate-validator-legacy:4.0.2.GA, which contains the class we're looking for here (org.hibernate.validator.InvalidValue).

                               

                               

                              Would you guys be willing to make available an org.hibernate.validator.legacy module or something?

                              • 12. Re: Running Seam 2 archives on Jboss 7
                                matt.drees

                                Ales Justin wrote:

                                 

                                It looks like I'm missing some really old class:

                                 

                                Caused by: java.lang.NoClassDefFoundError: org/hibernate/validator/InvalidValue

                                    at java.lang.Class.getDeclaredMethods0(Native Method) [:1.6.0_24]

                                Found here:

                                * http://www.jarfinder.com/index.php/java/info/org.hibernate.validator.InvalidValue

                                That jar might work, but I think the "right" jar to use is hibernate-validator-legacy.

                                • 13. Re: Running Seam 2 archives on Jboss 7
                                  matt.drees

                                  Ales Justin wrote:

                                   

                                  Sorry, it doesn't seem to work.  This is what I get when deploying my app to your AS7 version  (after working around another unrelated problem):

                                   

                                   

                                  15:21:15,168 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/ccp]] (MSC service thread 1-4) Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener: java.lang.IllegalArgumentException: Null path
                                      at org.jboss.vfs.VFS.getChild(VFS.java:207) [jboss-vfs-3.0.0.GA.jar:3.0.0.GA]
                                      at org.jboss.vfs.VFS.getChild(VFS.java:193) [jboss-vfs-3.0.0.GA.jar:3.0.0.GA]
                                      at org.jboss.vfs.VFS.getChild(VFS.java:174) [jboss-vfs-3.0.0.GA.jar:3.0.0.GA]
                                      at org.jboss.seam.integration.jbossas.vfs.VFSScanner.getRoot(VFSScanner.java:64) [jboss-seam-int.jar:6.0.0.GA]
                                      at org.jboss.seam.integration.jbossas.vfs.VFSScanner.scanResources(VFSScanner.java:151) [jboss-seam-int.jar:6.0.0.GA]
                                      at org.jboss.seam.deployment.StandardDeploymentStrategy.scan(StandardDeploymentStrategy.java:119) [jboss-seam-2.2.2.Final.seam2jsf2-no-timer-service-dispatcher.jar:6.0.0.GA]
                                  

                                  Are you sure you have all commits from my "https://github.com/alesj/jboss-as/commits/vfs-rl-941" branch?

                                  Specially the last two:

                                  * https://github.com/alesj/jboss-as/commit/2e118ee78070be94da3adf1d539fe19473373a7e

                                  * https://github.com/alesj/jboss-as/commit/04745e3575fd124414930be0691965dd48141b99

                                   

                                  As this is what I used to get as well, before changing to VFS ResourceLoader.

                                  And this is what's still in the main (and hence my) master.

                                   

                                  Doh!  I was looking at your 'as7-941' branch.

                                  • 14. Re: Running Seam 2 archives on Jboss 7
                                    alesj

                                    That jar might work, but I think the "right" jar to use is hibernate-validator-legacy.

                                    I managed to get past the CNFE, but getting diff errors now:

                                     

                                    12:35:30,194 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (MSC service thread 1-3) HHH00231:Schema export unsuccessful: org.hibernate.tool.hbm2ddl.ImportScriptException: Error during import script execution at line 1

                                        at org.hibernate.tool.hbm2ddl.SchemaExport.importScript(SchemaExport.java:411) [hibernate-core-4.0.0.Alpha3.jar:4.0.0.Alpha3]

                                        at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:333) [hibernate-core-4.0.0.Alpha3.jar:4.0.0.Alpha3]

                                        at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:259) [hibernate-core-4.0.0.Alpha3.jar:4.0.0.Alpha3]

                                        at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:255) [hibernate-core-4.0.0.Alpha3.jar:4.0.0.Alpha3]

                                        at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:408) [hibernate-core-4.0.0.Alpha3.jar:4.0.0.Alpha3]

                                        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1720) [hibernate-core-4.0.0.Alpha3.jar:4.0.0.Alpha3]

                                        at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:77) [hibernate-entitymanager-4.0.0.Alpha3.jar:4.0.0.Alpha3]

                                        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:894) [hibernate-entitymanager-4.0.0.Alpha3.jar:4.0.0.Alpha3]

                                        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:879) [hibernate-entitymanager-4.0.0.Alpha3.jar:4.0.0.Alpha3]

                                        at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:56) [hibernate-entitymanager-4.0.0.Alpha3.jar:4.0.0.Alpha3]

                                        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:48) [hibernate-jpa-2.0-api-1.0.0.Final.jar:1.0.0.Final]

                                        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:32) [hibernate-jpa-2.0-api-1.0.0.Final.jar:1.0.0.Final]

                                        at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:81) [jboss-seam.jar:]

                                        at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50) [jboss-seam.jar:]

                                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_24]

                                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_24]

                                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]

                                        at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]

                                        at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam.jar:]

                                        at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:138) [jboss-seam.jar:]

                                        at org.jboss.seam.Component.callComponentMethod(Component.java:2179) [jboss-seam.jar:]

                                        at org.jboss.seam.Component.callCreateMethod(Component.java:2094) [jboss-seam.jar:]

                                        at org.jboss.seam.Component.newInstance(Component.java:2054) [jboss-seam.jar:]

                                        at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) [jboss-seam.jar:]

                                        at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) [jboss-seam.jar:]

                                        at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:112) [jboss-seam.jar:]

                                        at org.jboss.seam.init.Initialization.init(Initialization.java:727) [jboss-seam.jar:]

                                        at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34) [jboss-seam.jar:]

                                        at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.0.CR2.jar:7.0.0.Beta4-SNAPSHOT]

                                        at org.apache.catalina.core.StandardContext.start(StandardContext.java:3817) [jbossweb-7.0.0.CR2.jar:7.0.0.Beta4-SNAPSHOT]

                                        at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.0.Beta4-SNAPSHOT.jar:7.0.0.Beta4-SNAPSHOT]

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

                                        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]

                                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]

                                        at java.lang.Thread.run(Thread.java:680) [:1.6.0_24]

                                    Caused by: org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "PRIMARY_KEY_5 ON PUBLIC.CUSTOMER(USERNAME)"; SQL statement:

                                    insert into Customer (username, password, name) values ('gavin', 'foobar', 'Gavin King') [23001-145]

                                        at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)

                                        at org.h2.message.DbException.get(DbException.java:167)

                                        at org.h2.message.DbException.get(DbException.java:144)

                                        at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:158)

                                        at org.h2.index.TreeIndex.add(TreeIndex.java:56)

                                        at org.h2.table.RegularTable.addRow(RegularTable.java:125)

                                        at org.h2.command.dml.Insert.insertRows(Insert.java:126)

                                        at org.h2.command.dml.Insert.update(Insert.java:86)

                                        at org.h2.command.CommandContainer.update(CommandContainer.java:69)

                                        at org.h2.command.Command.executeUpdate(Command.java:201)

                                        at org.h2.jdbc.JdbcStatement.executeUpdateInternal(JdbcStatement.java:126)

                                        at org.h2.jdbc.JdbcStatement.executeUpdate(JdbcStatement.java:111)

                                        at org.jboss.jca.adapters.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:349)

                                        at org.hibernate.tool.hbm2ddl.DatabaseExporter.export(DatabaseExporter.java:64) [hibernate-core-4.0.0.Alpha3.jar:4.0.0.Alpha3]

                                        at org.hibernate.tool.hbm2ddl.SchemaExport.importScript(SchemaExport.java:406) [hibernate-core-4.0.0.Alpha3.jar:4.0.0.Alpha3]

                                        ... 34 more

                                     

                                    and after hitting UI

                                     

                                    java.lang.IllegalStateException: Illegal attempt to set ViewHandler after a response has been rendered.

                                        com.sun.faces.application.ApplicationImpl.setViewHandler(ApplicationImpl.java:563)

                                        org.jboss.seam.jsf.SeamApplication.setViewHandler(SeamApplication.java:376)

                                        org.ajax4jsf.event.InitPhaseListener.beforePhase(InitPhaseListener.java:87)

                                        com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)

                                        com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)

                                        com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:111)

                                        com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)

                                        javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)

                                        org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)

                                        org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)

                                        org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

                                        org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)

                                        org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

                                        org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)

                                        org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

                                        org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)

                                        org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

                                        org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)

                                        org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)

                                        org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)

                                        org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)

                                        org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)

                                        org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

                                        org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)

                                    1 2 3 Previous Next