Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6743983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:01:45+00:00 2026-05-26T12:01:45+00:00

I searched and tried for hours to solve this problem, unfortunately without success. I

  • 0

I searched and tried for hours to solve this problem, unfortunately without success.

I am using Java 1.6, RESTEasy 2.2.1.GA and a Jetty Embedded Server to setup a webservice.
Originally I copied an existing working project to set this one up. Somehow the original project works, my adjusted copy doesnt work.

After starting the Embedded Server I get the following exception:

Here is what the console says:

2011-10-27 09:22:51.113::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
2011-10-27 09:22:51.141::INFO:  jetty-6.0.2
2011-10-27 09:22:51.352::WARN:  failed Resteasy
javax.servlet.UnavailableException: org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
    at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:78)
    at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:229)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
    at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:574)
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:128)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1219)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:421)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:496)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:119)
    at org.mortbay.jetty.Server.doStart(Server.java:228)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
    at com.xtag.locationadapter.webui.EmbeddedServer.main(EmbeddedServer.java:41)
    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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
2011-10-27 09:22:51.398::WARN:  Failed startup of context org.mortbay.jetty.webapp.WebAppContext@1c5d9084{/admin,file:/Users/workspace/LocationAdapter/webui/target/classes/com/company/locationadapter/webui/webapp/}
javax.servlet.UnavailableException: org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
    at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:78)
    at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:229)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
    at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:574)
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:128)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1219)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:421)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:496)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:119)
    at org.mortbay.jetty.Server.doStart(Server.java:228)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
    at com.xtag.locationadapter.webui.EmbeddedServer.main(EmbeddedServer.java:41)
    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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
2011-10-27 09:22:51.400::INFO:  Started SocketConnector @ 0.0.0.0:8088

This is my project structure. Please ignore the fact that the name webui doesnt fit to the content of this folder.:

   LocationAdapter
    - .idea
    - .settings
    - bin
    - webui
    |- src
      |- main
        |- java
           |- com.company.locationadapter.communication.rest
             |- ResteasyApplication.java
           |- com.company.locationadapter.communication.restservices
             |- LocationResource.java
             |- LocationResourceImpl.java
           |- com.company.locationadapter.service
             |- LocationService.java
             |- LocationServiceImpl.java
           |- com.company.locationadapter.webui
             |- EmbeddedServer.java
        |- resources
           |- com.company.locationadapter.webui.webapp
             |- dummy.html
           |- com.company.locationadapter.webui.webapp.WEB-INF
             |- web.xml 

My ResteasyApplication Class:

public class ResteasyApplication extends Application {

    @Override
    public Set<Object> getSingletons() {
        Set<Object> set = new HashSet<Object>();
        set.add(new LocationResourceImpl());
        return set;
    }

    @Override
    public Set<Class<?>> getClasses() {
        return super.getClasses();
    }
}

My EmbeddedServer Class:

public class EmbeddedServer {

    private static final String WEBAPP = "com/company/locationadapter/webui/webapp";
    private static final String CONTEXT_PATH = "/admin";

    public static void main(String[] args) throws Exception {

        addSystemProperties();
        final Server server = new Server(8088);
        final URL warUrl = EmbeddedServer.class.getClassLoader().getResource(WEBAPP);
        final String warUrlString = warUrl.toExternalForm();
        server.setHandler(new WebAppContext(warUrlString, CONTEXT_PATH));
        server.start();
    }

    protected static void addSystemProperties() {
        try {
            Properties properties = new Properties(System.getProperties());
            String path = System.getProperty("user.properties");
            properties.load(new FileInputStream(new File(path)));
            System.setProperties(properties);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}

The web.xml for configuration of RESTEasy:

<web-app>

    <display-name>LocationAdapter</display-name>
    <description>Company</description>

    <context-param>
          <param-name>resteasy.servlet.mapping.prefix</param-name>
          <param-value>/locationadapter</param-value>
    </context-param>

     <servlet>
         <servlet-name>Resteasy</servlet-name>
         <servlet-class>
             org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
         </servlet-class>
         <init-param>
             <param-name>javax.ws.rs.Application</param-name>
             <param-value>com.company.locationadapter.communication.rest.ResteasyApplication</param-value>
         </init-param>
     </servlet>

    <servlet-mapping>
        <servlet-name>Resteasy</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>

    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>

</web-app>

I would really appreciate, if someone have an idea or solution for this exception.
If you need further information please let me know.

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:01:46+00:00Added an answer on May 26, 2026 at 12:01 pm

    Problem solved, the exception was caused by an entry in the POM.xml, where the scope of the artifact “resteasy-jaxb-provider” was set to provided

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Doxygen noob here. I've searched and tried to resolve this for several hours now
I have tried everything, searched the net for two hours or even more and
I tried Google this issue and was searched over an hour on Stackoverflow, but
This is quite a noobish question, I have searched for a few hours now
I searched this over internet for over 3 hours and none of the suggestions
I've been working on this problem for a few hours now and I have
I am stuck. Searched and tried for hours. EDIT: I still can't make it
I apologize if this is a duplicate, but I've searched for 3 hours already
I searched and tried a lot, but I can't accomplish it as I want..
I have searched and tried every example regarding singleton, public, and global variables in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.