4 Replies Latest reply on Oct 1, 2013 1:49 AM by Anish Antony

    Cannot deploy jsf pages in JBoss AS7

    Anish Antony Newbie

      Hi

      When i deploy my war (It is  JSF 1.2 application) file in deployment directory of JBoss AS7 server i got following exception and warnings

       

      12:57:12,530 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$App' for service type 'javax.ws.rs.ext.MessageBodyReader'

      12:57:12,531 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$General' for service type 'javax.ws.rs.ext.MessageBodyReader'

      12:57:12,532 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.json.impl.provider.entity.JSONArrayProvider$App' for service type 'javax.ws.rs.ext.MessageBodyReader'

      12:57:12,532 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.json.impl.provider.entity.JSONArrayProvider$General' for service type 'javax.ws.rs.ext.MessageBodyReader'

      12:57:12,533 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.json.impl.provider.entity.JSONObjectProvider$App' for service type 'javax.ws.rs.ext.MessageBodyReader'

      12:57:12,534 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.json.impl.provider.entity.JSONObjectProvider$General' for service type 'javax.ws.rs.ext.MessageBodyReader'

      12:57:12,535 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$TypeFromStringEnum' for service type 'com.sun.jersey.spi.StringReaderProvider'

      12:57:12,536 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$TypeValueOf' for service type 'com.sun.jersey.spi.StringReaderProvider'

      12:57:12,537 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$TypeFromString' for service type 'com.sun.jersey.spi.StringReaderProvider'

      12:57:12,538 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$StringConstructor' for service type 'com.sun.jersey.spi.StringReaderProvider'

      12:57:12,539 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.server.impl.model.parameter.multivalued.StringReaderProviders$DateProvider' for service type 'com.sun.jersey.spi.StringReaderProvider'

      12:57:12,540 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015893: Encountered invalid class name 'com.sun.jersey.server.impl.model.parameter.multivalued.JAXBStringReaderProviders$RootElementProvider' for service type 'com.sun.jersey.spi.StringReaderProvider'

      12:57:13,798 ERROR [org.jboss.web] (MSC service thread 1-5) JBAS018211: Could not load JSF managed bean class: com.myimpl.view.bean.AgObjectBean

      12:57:13,949 ERROR [org.jboss.web] (MSC service thread 1-5) JBAS018211: Could not load JSF managed bean class: com.myimpl.view.bean.EventCoGroupsBean

      12:57:14,053 ERROR [org.jboss.web] (MSC service thread 1-5) JBAS018211: Could not load JSF managed bean class: com.myimpl.view.bean.JMXInfoBean

      12:57:14,055 ERROR [org.jboss.web] (MSC service thread 1-5) JBAS018211: Could not load JSF managed bean class: com.myimpl.reports.view.bean.TrendBean

      12:57:14,056 ERROR [org.jboss.web] (MSC service thread 1-5) JBAS018211: Could not load JSF managed bean class: com.myimpl.view.bean.SnmpInfoBean

      12:57:14,072 ERROR [org.jboss.web] (MSC service thread 1-5) JBAS018211: Could not load JSF managed bean class: com.myimpl.view.bean.LinuxInfoBean

      12:57:14,534 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."myimpl.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myimpl.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "myimpl.war"

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

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

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

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

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011232: Only one JAX-RS Application Class allowed.  com.sun.jersey.api.core.WebAppResourceConfig com.sun.jersey.api.core.DefaultResourceConfig com.sun.jersey.api.core.ScanningResourceConfig com.sun.jersey.api.core.ClasspathResourceConfig com.sun.jersey.api.core.ApplicationAdapter com.sun.jersey.api.core.ClassNamesResourceConfig com.sun.jersey.api.core.ResourceConfig com.sun.jersey.api.core.PackagesResourceConfig com.sun.jersey.server.impl.application.DeferredResourceConfig

        at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.scan(JaxrsScanningProcessor.java:209)

        at org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.deploy(JaxrsScanningProcessor.java:105)

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

        ... 5 more

       

       

      12:57:14,544 INFO  [org.jboss.as] (MSC service thread 1-2) JBAS015951: Admin console listening on http://127.0.0.1:9990

      12:57:14,545 ERROR [org.jboss.as] (MSC service thread 1-2) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 121295ms - Started 1422 of 1572 services (3 services failed or missing dependencies, 138 services are passive or on-demand)

      12:57:14,551 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "myimpl.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"myimpl.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myimpl.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"myimpl.war\""}}

      12:57:14,552 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015871: Deploy of deployment "WfAPI.jar" was rolled back with no failure message

      12:57:14,580 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment WfAPI.jar in 27ms

      12:57:14,651 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment myimpl.war in 99ms

       

      But it working fine on JBoss 6.

        • 1. Re: Cannot deploy jsf pages in JBoss AS7
          Stephen Coy Master

          What is the output of:

          jar tf myimpl.war?

           

          What is the relationship between myimpl.war and WfAPI.jar?

           

          The classes and jars in myimpl.war will not be able to load classes from WfAPI.jar unless you have a correct manifest classpath entry or jboss-deployment-structure.xml file because AS7 and newer uses a spec compliant class-loading model.

          • 2. Re: Cannot deploy jsf pages in JBoss AS7
            Anish Antony Newbie

            There is no relation between myimpl.war and WfAPI.jar. You can find  the result of jar tf myimpl.war from this link

            • 3. Re: Re: Cannot deploy jsf pages in JBoss AS7
              Stephen Coy Master

              You should remove the following jars as they provide classes that JBossAS (and all other JavaEE server implementations) provides for you:

              WEB-INF/lib/cxf-2.4.8.jar

              WEB-INF/lib/persistence.jar     (only if this contains the javax.persistence classes)

              WEB-INF/lib/jboss-client.jar

              WEB-INF/lib/jbosssx-client.jar

              WEB-INF/lib/jboss-transaction-client.jar

              WEB-INF/lib/jnp-client.jar

              WEB-INF/lib/jgroups-all.jar

              WEB-INF/lib/jboss-common.jar

              WEB-INF/lib/concurrent.jar

              WEB-INF/lib/jbossmq.jar

              WEB-INF/lib/jboss-jmx.jar

              WEB-INF/lib/tomcat-coyote.jar

              WEB-INF/lib/tomcat-http.jar

              WEB-INF/lib/tomcat-util.jar

              WEB-INF/lib/jaxb-xjc.jar

              WEB-INF/lib/jaxb-api.jar

              WEB-INF/lib/jaxb-impl.jar

              WEB-INF/lib/activation.jar

              WEB-INF/lib/cglib.jar

              WEB-INF/lib/dom4j-1.5.2.jar

              WEB-INF/lib/hibernate3.jar

              WEB-INF/lib/jboss-j2ee.jar

              WEB-INF/lib/jta.jar

              WEB-INF/lib/mail.jar

              WEB-INF/lib/jsr173_1.0_api.jar

              WEB-INF/lib/jsr311-api-1.1.1.jar

              WEB-INF/lib/jboss-common-core.jar

              WEB-INF/lib/jboss-logging-spi.jar

              WEB-INF/lib/jboss-remoting-core.jar

              WEB-INF/lib/jboss-remoting-http.jar

              WEB-INF/lib/jboss-remoting-http-client.jar

              WEB-INF/lib/axis2-adb-1.6.0.jar

              WEB-INF/lib/axis2-kernel-1.6.0.jar

              WEB-INF/lib/axis2-transport-http-1.6.0.jar

              WEB-INF/lib/axis2-transport-local-1.6.0.jar

              WEB-INF/lib/wsdl4j-1.6.2.jar

              You should probably leave out all the unit test support jars as well.

               

              I recommend that you get a maven build of this product working because it will assist greatly with the construction of your web module in a way that is repeatable from machine to machine.

              • 4. Re: Re: Cannot deploy jsf pages in JBoss AS7
                Anish Antony Newbie

                thanks stephen

                I remove the jars, but there is no change in the exception

                 

                11:04:00,921 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015893: Encountered invalid class name 'com.sun.jersey.server.impl.model.parameter.multivalued.JAXBStringReaderProviders$RootElementProvider' for service type 'com.sun.jersey.spi.StringReaderProvider'

                11:04:01,760 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."myimpl.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myimpl.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "myimpl.war"

                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

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

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

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

                Caused by: java.lang.NoClassDefFoundError: org/hibernate/exception/ConstraintViolationException

                  at java.lang.Class.getDeclaredConstructors0(Native Method) [rt.jar:1.6.0_37]

                  at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) [rt.jar:1.6.0_37]

                  at java.lang.Class.getConstructor0(Class.java:2699) [rt.jar:1.6.0_37]

                  at java.lang.Class.getConstructor(Class.java:1657) [rt.jar:1.6.0_37]

                  at org.jboss.as.web.deployment.jsf.JsfManagedBeanProcessor.deploy(JsfManagedBeanProcessor.java:108)

                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                  ... 5 more

                Caused by: java.lang.ClassNotFoundException: org.hibernate.exception.ConstraintViolationException from [Module "deployment.myimpl.war:main" from Service Module Loader]

                  at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.1.GA]

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]

                  at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]

                  ... 11 more

                11:04:01,772 INFO  [org.jboss.as] (MSC service thread 1-7) JBAS015951: Admin console listening on http://127.0.0.1:9990

                11:04:01,772 ERROR [org.jboss.as] (MSC service thread 1-7) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 63949ms - Started 1402 of 1548 services (1 services failed or missing dependencies, 136 services are passive or on-demand)

                11:04:01,783 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "myimpl.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"myimpl.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myimpl.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"myimpl.war\""}}

                11:04:01,797 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

                JBAS014777:   Services which failed to start:      service jboss.deployment.unit."myimpl.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myimpl.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "myimpl.war"

                 

                 

                11:04:01,799 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"myimpl.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myimpl.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"myimpl.war\""}}}}

                11:04:01,898 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment myimpl.war in 77ms