Page 1 of 2 12 LastLast
Results 1 to 20 of 22
  1. #1
    Apprentice123 is offline Member
    Join Date
    Jul 2012
    Posts
    20
    Rep Power
    0

    Default RESTEasy with JBOSS

    I'm starting with RESTEasy.
    I developed the following class to test:

    Java Code:
    package com.practice.rest.resources;
    import java.util.Calendar;
    import java.util.Date;
    import javax.ws.rs.GET;
    import javax.ws.rs.Path;
    import javax.ws.rs.Produces;
    import javax.ws.rs.core.MediaType;
    import javax.ws.rs.core.Response;
    @Path("dateservice")
    public class DateService {
        @GET
        @Path("getdate")
        @Produces(MediaType.TEXT_HTML)
        public Response getDate() {
            String date = null;
            Date currentDate = Calendar.getInstance().getTime();
            date = currentDate.toString();
            return Response.status(200).entity(date).build();
        }
    }
    My web.xml is:
    Java Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
        id="WebApp_ID" version="2.5">
      <display-name>resteasy</display-name>
     
      <listener>
      <listener-class>
          org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
      </listener-class>
      </listener>
     
      <servlet>
      <servlet-name>Resteasy</servlet-name>
      <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
      </servlet>
     
      <servlet-mapping>
      <servlet-name>Resteasy</servlet-name>
      <url-pattern>/*</url-pattern>
      </servlet-mapping>
     
      <context-param>
        <param-name>resteasy.servlet.mapping.prefix</param-name>
        <param-value>/*</param-value>
    </context-param>
    </web-app>
    But when I compile the following error appears:
    Java Code:
    404 server could not find the specified resource
    Why?

  2. #2
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

    Default Re: RESTEasy with JBOSS

    Don't you think you need to annotate your service class with @WebService?

  3. #3
    Apprentice123 is offline Member
    Join Date
    Jul 2012
    Posts
    20
    Rep Power
    0

    Default Re: RESTEasy with JBOSS

    I do not know well. Why do I need to annotate with @WebService?

  4. #4
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

    Default Re: RESTEasy with JBOSS

    Because the @WebService annotation marks your Java class that it is implementing a Web Service.

  5. #5
    Apprentice123 is offline Member
    Join Date
    Jul 2012
    Posts
    20
    Rep Power
    0

    Default Re: RESTEasy with JBOSS

    Quote Originally Posted by Apprentice123 View Post
    I do not know well. Why do I need to annotate with @WebService?
    Quote Originally Posted by wsaryada View Post
    Because the @WebService annotation marks your Java class that it is implementing a Web Service.
    But if I execute the URL: http://localhost:8080/RestEasyServic...ervice/getdate should not work? I define the path:
    Java Code:
    @Path("dateservice")
    ...
    @Path("getdate")
    I'm trying to return HTML but in future I'll need to return JSON.
    Last edited by Apprentice123; 12-01-2012 at 04:18 AM.

  6. #6
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

    Default Re: RESTEasy with JBOSS

    I think it is due to your web.xml configuration. Please check the following tutorial: RESTEasy hello world example

  7. #7
    Apprentice123 is offline Member
    Join Date
    Jul 2012
    Posts
    20
    Rep Power
    0

    Default Re: RESTEasy with JBOSS

    Quote Originally Posted by wsaryada View Post
    I think it is due to your web.xml configuration. Please check the following tutorial: RESTEasy hello world example

    OK. In my project does not work. I did not find any problem in my web.xml
    web.xml:
    Java Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns="http://java.sun.com/xml/ns/javaee"
            xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
            xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
            id="WebApp_ID" version="2.5">
      <display-name>resteasy</display-name>
      
      <context-param>
      	<param-name>resteasy.scan</param-name>
      	<param-value>true</param-value>
      </context-param>
      <context-param>
            <param-name>resteasy.servlet.mapping.prefix</param-name>
            <param-value>/rest</param-value>
      </context-param>
     
      <listener>
      	<listener-class>
              org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
      	</listener-class>
      </listener>
     
      <servlet>
      	<servlet-name>Resteasy</servlet-name>
      	<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
      </servlet>
     
      <servlet-mapping>
      	<servlet-name>Resteasy</servlet-name>
      	<url-pattern>/rest/*</url-pattern>
      </servlet-mapping>
    </web-app>

  8. #8
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

    Default Re: RESTEasy with JBOSS

    Did you have this section in your original web.xml file:

    Java Code:
        <context-param>
            <param-name>resteasy.scan</param-name>
            <param-value>true</param-value>
        </context-param>
    Beside 404 error in the browser do you have any error logs produced by your application server. I've tried your web service and it works just fine. It print out the current date in my browser.

  9. #9
    Apprentice123 is offline Member
    Join Date
    Jul 2012
    Posts
    20
    Rep Power
    0

    Default Re: RESTEasy with JBOSS

    Quote Originally Posted by wsaryada View Post
    Did you have this section in your original web.xml file:

    Java Code:
        <context-param>
            <param-name>resteasy.scan</param-name>
            <param-value>true</param-value>
        </context-param>
    Beside 404 error in the browser do you have any error logs produced by your application server. I've tried your web service and it works just fine. It print out the current date in my browser.
    Strange, does not work here.
    My class DateService
    Java Code:
    package com.practice.rest.resources;
    
    import java.util.Calendar;
    import java.util.Date;
    import javax.ws.rs.GET;
    import javax.ws.rs.Path;
    import javax.ws.rs.Produces;
    import javax.ws.rs.core.MediaType;
    import javax.ws.rs.core.Response;
    
    @Path("dateservice")
    public class DateService {
    	@GET
        @Path("getdate")
        @Produces(MediaType.TEXT_HTML)
    	public Response getDate() {
            String date = null;
            Date currentDate = Calendar.getInstance().getTime();
            date = currentDate.toString();
            return Response.status(200).entity(date).build();
    	}
    }
    My web.xml
    Java Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns="http://java.sun.com/xml/ns/javaee"
            xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
            xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
            id="WebApp_ID" version="2.5">
      <display-name>resteasy</display-name>
      
      <context-param>
      	<param-name>resteasy.scan</param-name>
      	<param-value>true</param-value>
      </context-param>
      <context-param>
            <param-name>resteasy.servlet.mapping.prefix</param-name>
            <param-value>/rest</param-value>
      </context-param>
     
      <listener>
      	<listener-class>
              org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
      	</listener-class>
      </listener>
     
      <servlet>
      	<servlet-name>Resteasy</servlet-name>
      	<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
      </servlet>
     
      <servlet-mapping>
      	<servlet-name>Resteasy</servlet-name>
      	<url-pattern>/rest/*</url-pattern>
      </servlet-mapping>
    </web-app>
    I use JBoss 5.0 and jdk 1.5
    I run url: http://localhost:8080/RestEasyServic...ervice/getdate

    The error is:
    Java Code:
    HTTP Status 404 - /RestEasyServices/resources/dateservice/getdate
    type Status report
    message /RestEasyServices/resources/dateservice/getdate
    description The requested resource (/RestEasyServices/resources/dateservice/getdate) is not available.
    JBoss Web/2.1.2.GA

  10. #10
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

    Default Re: RESTEasy with JBOSS

    If your context path is RestEasyServices don't you think you should access it using:

    Plain Code:
    http://localhost:8080/RestEasyServices/rest/dateservice/getdate
    Last edited by wsaryada; 12-01-2012 at 03:20 PM.

  11. #11
    Apprentice123 is offline Member
    Join Date
    Jul 2012
    Posts
    20
    Rep Power
    0

    Default Re: RESTEasy with JBOSS

    Quote Originally Posted by wsaryada View Post
    If your context path is RestEasyServices don't you think you should access it using:

    Plain Code:
    http://localhost:8080/RestEasyServices/rest/dateservice/getdate
    Does not work with this url http://localhost:8080/RestEasyServic...ervice/getdate
    It's the same error. Very strange

  12. #12
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

    Default Re: RESTEasy with JBOSS

    Have you check whether any error occurred in your application? You should check the logs file. And one more think are the required libraries available in your deployment. Maybe there are some jars missing so that the web application can not load properly.

  13. #13
    Apprentice123 is offline Member
    Join Date
    Jul 2012
    Posts
    20
    Rep Power
    0

    Default Re: RESTEasy with JBOSS

    Quote Originally Posted by wsaryada View Post
    Have you check whether any error occurred in your application? You should check the logs file. And one more think are the required libraries available in your deployment. Maybe there are some jars missing so that the web application can not load properly.
    I use the libraries from resteasy-jaxrs-2.3.5.Final

    My log
    Java Code:
    12:53:03,685 ERROR [[/RestEasyServices]] Error configuring application listener of class org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
    java.lang.ClassNotFoundException: org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    	at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:256)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3859)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
    	at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:312)
    	at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:144)
    	at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
    	at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
    	at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:585)
    	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
    	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
    	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
    	at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
    	at $Proxy36.start(Unknown Source)
    	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
    	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
    	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
    	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
    	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
    	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    	at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
    	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
    	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
    	at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
    	at org.jboss.system.ServiceController.start(ServiceController.java:460)
    	at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
    	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
    	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
    	at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
    	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
    	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
    	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
    	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
    	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
    	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
    	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
    	at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
    	at org.jboss.Main.boot(Main.java:209)
    	at org.jboss.Main$1.run(Main.java:547)
    	at java.lang.Thread.run(Thread.java:595)
    12:53:03,687 ERROR [[/RestEasyServices]] Skipped installing application listeners due to previous error(s)
    12:53:03,687 ERROR [StandardContext] Error listenerStart
    12:53:03,687 ERROR [StandardContext] Context [/RestEasyServices] startup failed due to previous errors
    12:53:03,690 ERROR [AbstractKernelController] Error installing to Start: name=jboss.web.deployment:war=/RestEasyServices state=Create mode=Manual requiredState=Installed
    org.jboss.deployers.spi.DeploymentException: URL file:/E:/web/jboss-5.0.1.GA/server/default/tmp/5c4o12-9ashx7-ha6v1aka-1-ha6v28bl-9m/RestEasyServices.war/ deployment failed
    	at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:333)
    	at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:144)
    	at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
    	at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
    	at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:585)
    	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
    	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
    	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
    	at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
    	at $Proxy36.start(Unknown Source)
    	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
    	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
    	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
    	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
    	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
    	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    	at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
    	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
    	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
    	at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
    	at org.jboss.system.ServiceController.start(ServiceController.java:460)
    	at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
    	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
    	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
    	at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
    	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
    	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
    	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
    	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
    	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
    	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
    	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
    	at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
    	at org.jboss.Main.boot(Main.java:209)
    	at org.jboss.Main$1.run(Main.java:547)
    	at java.lang.Thread.run(Thread.java:595)
    12:53:03,700 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/E:/web/jboss-5.0.1.GA/server/default/deploy/RestEasyServices.war/ state=PreReal mode=Manual requiredState=Real
    org.jboss.deployers.spi.DeploymentException: URL file:/E:/web/jboss-5.0.1.GA/server/default/tmp/5c4o12-9ashx7-ha6v1aka-1-ha6v28bl-9m/RestEasyServices.war/ deployment failed
    	at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:333)
    	at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:144)
    	at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
    	at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
    	at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:585)
    	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
    	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
    	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
    	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
    	at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
    	at $Proxy36.start(Unknown Source)
    	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
    	at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
    	at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
    	at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
    	at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
    	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    	at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
    	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
    	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
    	at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
    	at org.jboss.system.ServiceController.start(ServiceController.java:460)
    	at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
    	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
    	at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
    	at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
    	at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
    	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
    	at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
    	at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
    	at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
    	at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
    	at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
    	at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
    	at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
    	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
    	at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
    	at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
    	at org.jboss.Main.boot(Main.java:209)
    	at org.jboss.Main$1.run(Main.java:547)
    	at java.lang.Thread.run(Thread.java:595)
    12:53:03,847 INFO  [TomcatDeployment] deploy, ctxPath=/jmx-console
    12:53:03,914 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
    
    DEPLOYMENTS IN ERROR:
      Deployment "vfszip:/E:/web/jboss-5.0.1.GA/server/default/deploy/RestEasyServices.war/" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException: URL file:/E:/web/jboss-5.0.1.GA/server/default/tmp/5c4o12-9ashx7-ha6v1aka-1-ha6v28bl-9m/RestEasyServices.war/ deployment failed
    
    12:53:03,924 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
    12:53:03,952 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
    12:53:04,568 INFO  [ServerImpl] JBoss (Microcontainer) [5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902231221)] Started in 46s:946ms
    I think the deployment is not working. But I did not find the problem

  14. #14
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

    Default Re: RESTEasy with JBOSS

    This error:


    java.lang.ClassNotFoundException: org.jboss.resteasy.plugins.server.servlet.Resteasy Bootstrap


    means that you don't have the resteasy-jaxrs jar in your application. Here I am using the resteasy-jaxrs-2.2.1.GA.jar.

  15. #15
    Apprentice123 is offline Member
    Join Date
    Jul 2012
    Posts
    20
    Rep Power
    0

    Default Re: RESTEasy with JBOSS

    Quote Originally Posted by wsaryada View Post
    This error:


    java.lang.ClassNotFoundException: org.jboss.resteasy.plugins.server.servlet.Resteasy Bootstrap


    means that you don't have the resteasy-jaxrs jar in your application. Here I am using the resteasy-jaxrs-2.2.1.GA.jar.
    I use resteasy-jaxrs-2.3.5.Final and not work. I tried with resteasy-jaxrs-2.2.1.GA and also did not work.

  16. #16
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

    Default Re: RESTEasy with JBOSS

    If you check your WAR file, does this jar included under WEB-INF/lib folder?

  17. #17
    Apprentice123 is offline Member
    Join Date
    Jul 2012
    Posts
    20
    Rep Power
    0

    Default Re: RESTEasy with JBOSS

    Quote Originally Posted by wsaryada View Post
    If you check your WAR file, does this jar included under WEB-INF/lib folder?
    Yes I have all the jars of the file resteasy-jaxrs-2.2.1.GA in WEB-INF/lib folder

  18. #18
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

    Default Re: RESTEasy with JBOSS

    Well, I have no guesses at the moment. Beside JBoss do you have other application server? Maybe you can try using Apache Tomcat?

  19. #19
    Apprentice123 is offline Member
    Join Date
    Jul 2012
    Posts
    20
    Rep Power
    0

    Default Re: RESTEasy with JBOSS

    Quote Originally Posted by wsaryada View Post
    Well, I have no guesses at the moment. Beside JBoss do you have other application server? Maybe you can try using Apache Tomcat?
    I need to run with JBoss. I'll try to start all over again. Do you have any tutorial with step by step?
    I tried this tutorial http://www.mkyong.com/webservices/ja...world-example/ did not work
    Thanks
    Last edited by Apprentice123; 12-02-2012 at 04:48 PM.

  20. #20
    Apprentice123 is offline Member
    Join Date
    Jul 2012
    Posts
    20
    Rep Power
    0

    Default Re: RESTEasy with JBOSS

    Quote Originally Posted by Apprentice123 View Post
    I need to run with JBoss. I'll try to start all over again. Do you have any tutorial with step by step?
    I tried this tutorial RESTEasy hello world example did not work
    Thanks
    My problem is that I need run in jdk 1.5

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 04-21-2012, 10:05 AM
  2. JMS work in JBOSS 5??
    By kkc85 in forum Enterprise JavaBeans (EJB)
    Replies: 3
    Last Post: 01-20-2010, 08:22 PM
  3. JBoss and JBoss Profiler
    By 82rathi.angara in forum Networking
    Replies: 0
    Last Post: 06-18-2008, 01:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •