4 Replies Latest reply on Feb 9, 2012 6:19 AM by nickcave

    Restful Web Services in jboss 7

    nickcave

      Hi...

       

      I would like to know how to enable restful service in jboss 7.

      I Created a simple service, based on example from docs of rest.. but, dont work

      My project was Created from seamforge and use jboss 7.0.2-final

       

      To acess services in browser, i used "http://localhost:8080/project/services/restname"

        • 2. Re: Restful Web Services in jboss 7
          nickcave

          Hi.....I recreated my project, and configurated this project with rest setup.

          But.. I get this error now...

           

          13:41:36,841 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-6) Context [/brutal2] startup failed due to previous errors: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name javax.ws.rs.core.Application

              at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:2231) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

              at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:2210) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

              at org.jboss.as.web.deployment.JBossContextConfig.processWebMetaData(JBossContextConfig.java:482) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.as.web.deployment.JBossContextConfig.applicationWebConfig(JBossContextConfig.java:167) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

              at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:417) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

              at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:182) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

              at org.jboss.as.web.deployment.JBossContextConfig.lifecycleEvent(JBossContextConfig.java:160) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

              at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:3766) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

              at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

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

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

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

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_30]

           

          In other machine(vista 32bit) this work..

          In window 7 (64bit) I get this error..

          • 3. Re: Restful Web Services in jboss 7
            ozizka

            Could you pls create a test case, push to your github, and post a link here?

            See https://docs.jboss.org/author/display/AS71/How+to+Add+a+Test+Case .

            • 4. Re: Restful Web Services in jboss 7
              nickcave

              Hi Ondrej....

               

              I solved that problem... Correcting my rest class in my project....

               

              In example,,, I deleted the line with @Path.

               

               

              What I did not know.

              If I configure the resteasy in the project

               

              rest setup

               

              I have a class with @Path, mandatory.

              If I have not,  the project not up.

               

              With that I was up losing focus. Thinking it was architecture error.

              Big mistake.