1 2 Previous Next 18 Replies Latest reply on Jul 13, 2011 11:47 AM by robwms63

    Deploying Seam 2.2 app in AS7 Fails w/RESTEasy Error

    robwms63

      I have an app that uses Seam and RestEASY. I don't have it configured in web.xml because I am using annotations, but apparently the annotation JBAS7 wants to see is the newer one (@ApplicationPath). How can this be resolved?

       

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: No Servlet mappings found for JAX-RS application: org.jboss.seam.resteasy.Application either annotate i

      t with @ApplicationPath or add a servlet-mapping in web.xml

                at org.jboss.as.jaxrs.deployment.JaxrsIntegrationProcessor.deploy(JaxrsIntegrationProcessor.java:193)

                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)

                ... 5 more

       

      Thanks.

        • 1. Re: Deploying Seam 2.2 app in AS7 Fails w/RESTEasy Error
          swd847

          How are you trying to configure it at the moment?

          • 2. Re: Deploying Seam 2.2 app in AS7 Fails w/RESTEasy Error
            robwms63

            This is a working Seam 2.2 app that we have had deployed for a year. There is no servlet mapping in the web.xml, so I was doing what's described in the docs here. See section 24.4.1: no web.xml config, scans looking for @Path annotations. Just works.

            • 3. Re: Deploying Seam 2.2 app in AS7 Fails w/RESTEasy Error
              swd847

              I have just commited a fix for this upstream.

              1 of 1 people found this helpful
              • 4. Re: Deploying Seam 2.2 app in AS7 Fails w/RESTEasy Error
                robwms63

                Awesome. Look forward to it. Thanks.

                • 5. Re: Deploying Seam 2.2 app in AS7 Fails w/RESTEasy Error
                  robwms63

                  Just installed 7 final and got the same error.

                  • 6. Re: Deploying Seam 2.2 app in AS7 Fails w/RESTEasy Error
                    jaikiran

                    Can you please post the (new) entire exception stacktrace and also a bit more details on what the .war contains (like the jars packaged)? Maybe you could post the output of:

                     

                    jar -tf yourwar.war

                    • 7. Re: Deploying Seam 2.2 app in AS7 Fails w/RESTEasy Error
                      robwms63

                      08:07:25,564 INFO  [org.jboss.jpa] (MSC service thread 1-12) read persistence.xml for onto-tests

                      08:07:26,204 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-12) JNDI bindings for session bean named EjbSynchronizatio

                      ns in deployment unit deployment "opportunity-miner.war" are as follows:

                       

                                java:global/opportunity-miner/EjbSynchronizations!org.jboss.seam.transaction.LocalEjbSynchronizations

                                java:app/opportunity-miner/EjbSynchronizations!org.jboss.seam.transaction.LocalEjbSynchronizations

                                java:module/EjbSynchronizations!org.jboss.seam.transaction.LocalEjbSynchronizations

                                java:global/opportunity-miner/EjbSynchronizations

                                java:app/opportunity-miner/EjbSynchronizations

                                java:module/EjbSynchronizations

                       

                      08:07:26,204 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-12) JNDI bindings for session bean named TimerServiceDispa

                      tcher in deployment unit deployment "opportunity-miner.war" are as follows:

                       

                                java:global/opportunity-miner/TimerServiceDispatcher!org.jboss.seam.async.LocalTimerServiceDispatcher

                                java:app/opportunity-miner/TimerServiceDispatcher!org.jboss.seam.async.LocalTimerServiceDispatcher

                                java:module/TimerServiceDispatcher!org.jboss.seam.async.LocalTimerServiceDispatcher

                                java:global/opportunity-miner/TimerServiceDispatcher

                                java:app/opportunity-miner/TimerServiceDispatcher

                                java:module/TimerServiceDispatcher

                       

                      08:07:27,412 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."opportunity-miner.war".INSTALL: org.jboss.msc.serv

                      ice.StartException in service jboss.deployment.unit."opportunity-miner.war".INSTALL: Failed to process phase INSTALL of deployment "opportunity-miner.war"

                                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)

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

                                at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

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

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

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

                      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: No Servlet mappings found for JAX-RS application: org.jboss.seam.resteasy.Application either annotate i

                      t with @ApplicationPath or add a servlet-mapping in web.xml

                                at org.jboss.as.jaxrs.deployment.JaxrsIntegrationProcessor.deploy(JaxrsIntegrationProcessor.java:193)

                                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)

                                ... 5 more

                       

                      Here is the list of jars:

                       

                      WEB-INF/lib/activation-1.1.jar

                      WEB-INF/lib/anet-java-sdk-1.4.2.jar

                      WEB-INF/lib/antlr-2.7.6.jar

                      WEB-INF/lib/apache-httpclient-commons-httpclient-3.1.jar

                      WEB-INF/lib/apache-mime4j-0.6.jar

                      WEB-INF/lib/asm-3.1.jar

                      WEB-INF/lib/aspectjrt-1.6.8.jar

                      WEB-INF/lib/aspectjweaver-1.6.8.jar

                      WEB-INF/lib/base64-2.3.8.jar

                      WEB-INF/lib/bcmail-jdk15-1.45.jar

                      WEB-INF/lib/bcprov-jdk15-1.45.jar

                      WEB-INF/lib/boilerpipe-1.1.0.jar

                      WEB-INF/lib/cbr2-0.0.1-20110510.180346-86.jar

                      WEB-INF/lib/cglib-2.2.jar

                      WEB-INF/lib/charting-0.0.1-SNAPSHOT.jar

                      WEB-INF/lib/charts-0.0.2-SNAPSHOT.jar

                      WEB-INF/lib/ci-bayes-1.0.9.jar

                      WEB-INF/lib/commerce-0.0.1-SNAPSHOT.jar

                      WEB-INF/lib/commons-beanutils-1.8.0.jar

                      WEB-INF/lib/commons-beanutils-core-1.8.0.jar

                      WEB-INF/lib/commons-codec-1.2.jar

                      WEB-INF/lib/commons-collections-3.1.jar

                      WEB-INF/lib/commons-compress-1.0.jar

                      WEB-INF/lib/commons-configuration-1.6.jar

                      WEB-INF/lib/commons-digester-1.8.1.jar

                      WEB-INF/lib/commons-httpclient-commons-httpclient-3.1.jar

                      WEB-INF/lib/commons-io-1.4.jar

                      WEB-INF/lib/commons-jxpath-1.3.jar

                      WEB-INF/lib/commons-lang-2.5.jar

                      WEB-INF/lib/commons-logging-1.0.4.jar

                      WEB-INF/lib/commons-math-1.2.jar

                      WEB-INF/lib/commons-net-2.0.jar

                      WEB-INF/lib/commons-validator-1.4-SNAPSHOT.jar

                      WEB-INF/lib/dbunit-2.1.jar

                      WEB-INF/lib/dom4j-1.6.1.jar

                      WEB-INF/lib/domain-commons-1.0-SNAPSHOT.jar

                      WEB-INF/lib/ehcache-1.6.1.jar

                      WEB-INF/lib/ehcache-core-2.4.2.jar

                      WEB-INF/lib/ehcache-terracotta-2.4.2.jar

                      WEB-INF/lib/ezmorph-1.0.6.jar

                      WEB-INF/lib/fontbox-1.4.0.jar

                      WEB-INF/lib/forms-0.0.2-20110525.022757-5.jar

                      WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar

                      WEB-INF/lib/hibernate-annotations-3.5.3-Final.jar

                      WEB-INF/lib/hibernate-commons-annotations-3.2.0.Final.jar

                      WEB-INF/lib/hibernate-core-3.5.3-Final.jar

                      WEB-INF/lib/hibernate-entitymanager-3.5.3-Final.jar

                      WEB-INF/lib/hibernate-jpa-2.0-api-1.0.0.Final.jar

                      WEB-INF/lib/hibernate-search-3.1.0.GA.jar

                      WEB-INF/lib/hibernate-validator-3.1.0.GA.jar

                      WEB-INF/lib/hsqldb-1.8.0.7.jar

                      WEB-INF/lib/htmlparser-1.6.jar

                      WEB-INF/lib/htmlunit-1.11.jar

                      WEB-INF/lib/HTTPClient-0.3-3.jar

                      WEB-INF/lib/httpclient-4.0.jar

                      WEB-INF/lib/httpcore-4.0.1.jar

                      WEB-INF/lib/icu4j-2.6.1.jar

                      WEB-INF/lib/itext-2.1.2.jar

                      WEB-INF/lib/itext-rtf-2.1.2.jar

                      WEB-INF/lib/janino-2.5.10.jar

                      WEB-INF/lib/java-utils-1.2-SNAPSHOT.jar

                      WEB-INF/lib/javassist-3.8.0.GA.jar

                      WEB-INF/lib/javolution-5.2.6.jar

                      WEB-INF/lib/jaxb-api-2.1.jar

                      WEB-INF/lib/jaxb-impl-2.1.10.jar

                      WEB-INF/lib/jaxen-1.1.1.jar

                      WEB-INF/lib/jaxrs-api-1.2.GA.jar

                      WEB-INF/lib/jboss-el-1.0_02.CR5.jar

                      WEB-INF/lib/jboss-seam-2.2.1.Final.jar

                      WEB-INF/lib/jboss-seam-mail-2.2.1.Final.jar

                      WEB-INF/lib/jboss-seam-pdf-2.2.1.Final.jar

                      WEB-INF/lib/jboss-seam-resteasy-2.2.1.Final.jar

                      WEB-INF/lib/jboss-seam-ui-2.2.1.Final.jar

                      WEB-INF/lib/jcip-annotations-1.0.jar

                      WEB-INF/lib/jdom-1.0.jar

                      WEB-INF/lib/jempbox-1.4.0.jar

                      WEB-INF/lib/jericho-html-3.2.jar

                      WEB-INF/lib/jets3t-0.7.1.jar

                      WEB-INF/lib/jettison-1.2.jar

                      WEB-INF/lib/joda-time-1.5.2.jar

                      WEB-INF/lib/js-1.6R5.jar

                      WEB-INF/lib/jsf-api-2.0.2.jar

                      WEB-INF/lib/jsf-facelets-1.1.15.jar

                      WEB-INF/lib/jsf-impl-2.0.2.jar

                      WEB-INF/lib/json-lib-2.3-jdk15.jar

                      WEB-INF/lib/jsoup-1.5.2.jar

                      WEB-INF/lib/jsr250-api-1.0.jar

                      WEB-INF/lib/jstl-1.1.2.jar

                      WEB-INF/lib/jta-1.1.jar

                      WEB-INF/lib/junit-4.8.1.jar

                      WEB-INF/lib/location-services-0.1-20110525.023300-45.jar

                      WEB-INF/lib/logback-classic-0.9.20.jar

                      WEB-INF/lib/logback-core-0.9.20.jar

                      WEB-INF/lib/logger-utils-1.0.1.jar

                      WEB-INF/lib/lucene-analyzers-2.3.2.jar

                      WEB-INF/lib/lucene-core-2.4.0.jar

                      WEB-INF/lib/lucene-snowball-2.3.2.jar

                      WEB-INF/lib/mail-1.4.2.jar

                      WEB-INF/lib/maps-0.0.1-20110525.023342-69.jar

                      WEB-INF/lib/metadata-extractor-2.4.0-beta-1.jar

                      WEB-INF/lib/mysql-connector-java-5.1.6.jar

                      WEB-INF/lib/nekohtml-0.9.5.jar

                      WEB-INF/lib/nekohtml-1.9.14.jar

                      WEB-INF/lib/netcdf-4.2-min.jar

                      WEB-INF/lib/oauth-core-0.0.1-SNAPSHOT.jar

                      WEB-INF/lib/onto-cache-0.0.1-SNAPSHOT.jar

                      WEB-INF/lib/onto-tests-0.0.1-SNAPSHOT.jar

                      WEB-INF/lib/opencsv-2.0.jar

                      WEB-INF/lib/opportunities-0.0.1-SNAPSHOT.jar

                      WEB-INF/lib/opportunities-sites-0.0.1-20110511.233854-383.jar

                      WEB-INF/lib/pdfbox-1.4.0.jar

                      WEB-INF/lib/poi-3.7.jar

                      WEB-INF/lib/poi-ooxml-3.7.jar

                      WEB-INF/lib/poi-ooxml-schemas-3.7.jar

                      WEB-INF/lib/poi-scratchpad-3.7.jar

                      WEB-INF/lib/quartz-1.6.0.jar

                      WEB-INF/lib/repository-core-0.5-SNAPSHOT.jar

                      WEB-INF/lib/resteasy-atom-provider-1.2.GA.jar

                      WEB-INF/lib/resteasy-jaxb-provider-1.2.GA.jar

                      WEB-INF/lib/resteasy-jaxrs-1.2.GA.jar

                      WEB-INF/lib/resteasy-jettison-provider-2.0-beta-2.jar

                      WEB-INF/lib/richfaces-api-3.3.3.Final.jar

                      WEB-INF/lib/richfaces-impl-jsf2-3.3.3.Final.jar

                      WEB-INF/lib/richfaces-ui-3.3.3.Final.jar

                      WEB-INF/lib/rome-0.9.jar

                      WEB-INF/lib/scannotation-1.0.2.jar

                      WEB-INF/lib/scribe-0.6.6.jar

                      WEB-INF/lib/sjsxp-1.0.1.jar

                      WEB-INF/lib/slf4j-api-1.5.8.jar

                      WEB-INF/lib/spider-0.0.2-20110605.033712-1.jar

                      WEB-INF/lib/spring-2.5.6.jar

                      WEB-INF/lib/stax-api-1.0.1.jar

                      WEB-INF/lib/stax-api-1.0.jar

                      WEB-INF/lib/tagsoup-1.2.jar

                      WEB-INF/lib/tika-core-0.9.jar

                      WEB-INF/lib/tika-parsers-0.9.jar

                      WEB-INF/lib/trees-0.0.1-SNAPSHOT.jar

                      WEB-INF/lib/users-0.0.2-20110525.023354-10.jar

                      WEB-INF/lib/wizard-0.0.1-20110321.005554-9.jar

                      WEB-INF/lib/xalan-2.6.0.jar

                      WEB-INF/lib/xercesImpl-2.9.1.jar

                      WEB-INF/lib/xml-apis-1.3.04.jar

                      WEB-INF/lib/xmlbeans-2.3.0.jar

                      WEB-INF/lib/xmlParserAPIs-2.6.2.jar

                      WEB-INF/lib/xom-1.0.jar

                      WEB-INF/lib/xpp3_min-1.1.3.4.O.jar

                      WEB-INF/lib/xstream-1.3.1.jar

                      • 8. Re: Deploying Seam 2.2 app in AS7 Fails w/RESTEasy Error
                        jaikiran

                        Like I suspected, you are packaging the JaxRS API jar within your application:

                         

                        WEB-INF/lib/jaxrs-api-1.2.GA.jar

                        Remove that and other similar API jars from within the application packaging.

                        1 of 1 people found this helpful
                        • 9. Re: Deploying Seam 2.2 app in AS7 Fails w/RESTEasy Error
                          robwms63

                          It was being pulled in from the RESTEasy jar. When I exclude it, I get compile errors. Guess I'll try adding it explicitly in the pom with a provided scope?

                          • 10. Re: Deploying Seam 2.2 app in AS7 Fails w/RESTEasy Error
                            jaikiran

                            It should get packaged in the application being deployed. You can still refer them during compile time. So yes, add them in "provide" scope.

                            • 11. Re: Deploying Seam 2.2 app in AS7 Fails w/RESTEasy Error
                              robwms63

                              Wow, what a hassle. I am trying to do this in eclipse. It's really difficult to tell why it's still not working, but I've wasted WAY TOO MUCH TIME on this. As a sanity check, I dropped to the command line, built with maven then dumped the contents of the war again and went in with vi and did a search for jaxrs-api and it is not there. But restarting inside eclipse, after all the usual shenanigans of restarting, clean, clean server, remove/add, it still spits up the same error.

                              • 12. Re: Deploying Seam 2.2 app in AS7 Fails w/RESTEasy Error
                                jason.greene

                                Rob Williams wrote:

                                 

                                Wow, what a hassle. I am trying to do this in eclipse. It's really difficult to tell why it's still not working, but I've wasted WAY TOO MUCH TIME on this. As a sanity check, I dropped to the command line, built with maven then dumped the contents of the war again and went in with vi and did a search for jaxrs-api and it is not there. But restarting inside eclipse, after all the usual shenanigans of restarting, clean, clean server, remove/add, it still spits up the same error.

                                Sorry this is taking so long to get to the bottom of, well get it fixed. Are you sure you are getting the exact same stack trace? The new code doesn't throw that exception anymore (just logs a warning, and the line numbers don't match). If so any chance you could somehow be running with a CR1 jar still?

                                • 13. Re: Deploying Seam 2.2 app in AS7 Fails w/RESTEasy Error
                                  robwms63

                                  Hey Jason: dude, no apologies necessary, I am in awe of 7, and already have it working on my 6 project, was not even thinking there was a chance it would deploy this 5 (Seam 2.2) project. So we are doing great. My exasperation before was with eclipse.

                                   

                                  I went back to it tonight and found the new 'Explore' option on the app, which is really great! Not the least reason being that I drilled into it and down into WEB-INF/lib and found the jars all lined up there (in alphabetical order!) and there is no jaxrs-api.jar, so whatever is left is something with deploy because yes I am getting the same trace:

                                   

                                  12:45:16,178 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-10) MSC00001: Failed to start service jboss.deployment.unit."opportunity-miner.war".INSTALL: org.jboss.msc.ser

                                  vice.StartException in service jboss.deployment.unit."opportunity-miner.war".INSTALL: Failed to process phase INSTALL of deployment "opportunity-miner.war"

                                            at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)

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

                                            at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

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

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

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

                                  Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: No Servlet mappings found for JAX-RS application: org.jboss.seam.resteasy.Application either annotate i

                                  t with @ApplicationPath or add a servlet-mapping in web.xml

                                            at org.jboss.as.jaxrs.deployment.JaxrsIntegrationProcessor.deploy(JaxrsIntegrationProcessor.java:193)

                                            at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)

                                            ... 5 more

                                   

                                  I went to read through the docs this afternoon and refresh my memory on how to do the command line deploy with Maven (was doing that when I first started fiddling with Weld a year ago), but the doc site was down (Confluence error). I have the JBoss Tools installed in Indigo, btw, if that helps.

                                   

                                  As time was ticking away I was thinking 'I'd rather be porting this code to 6 right now.....' 

                                  • 14. Re: Deploying Seam 2.2 app in AS7 Fails w/RESTEasy Error
                                    jaikiran

                                    Is this app something that you attach to this thread or maybe share privately? How big is it?

                                    1 2 Previous Next