facebook

Developing REST Web Services Tutorial – not working

  1. MyEclipse Archived
  2.  > 
  3. Documentation
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #317388 Reply

    Ruchi
    Member

    I imported the project as listed on the tutorial page. I am using JEE 5 but still getting this error.

    Thanks,
    Ruchi

    Check the error I am getting;

    SEVERE: Servlet /restdemo threw load() exception
    com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
    at com.sun.jersey.server.impl.application.WebApplicationImpl.processRootResources(WebApplicationImpl.java:753)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:625)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:414)
    at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:377)
    at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:242)
    at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:449)
    at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:169)
    at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:281)
    at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:442)
    at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4042)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4348)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
    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:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

    #317392 Reply

    support-swapna
    Moderator

    ruchijains,

    I could not replicate this issue with MyEclipse 9.

    Can you please answer some more questions for me ?

    1) Share your build id from Help > About MyEclipse Enterprise Workbench > Build Id. Paste the Build Id here.

    2) Did you import the example from this link ?
    http://www.myeclipseide.com/documentation/quickstarts/webservices_rest/

    3) To which app server are you deploying the project to?

    4) Here are the steps I followed :

    a) Downloaded the restdemo.zip file from the tutorial page.
    b) File > Import > Existing Projects into Workspace > Select archive file. Upgrade the project when it prompts to be compatible for MyEclipse 9.
    c) Right click project > Run As > MyEclipse Server Configuration > MyEclipse Tomcat.
    d) Right click project > MyEclipse > Test with REST webservices explorer
    e) You can test it as explained in the Section 5 of the tutorial.

    Let me know how this works for you.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Developing REST Web Services Tutorial – not working

You must be logged in to post in the forum log in