• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

[org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.depl

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, guys!
I'm trying to run my REST service, but every now and then meet the same problem: Failed to process phase POST_MODULE of deployment "RestService.war"
My configuration: JDK 1.8.60, WildFly 9 (the same problem is with the 10th version), Jersey.servlet 2.22

Here are my resources:
web.xml

pom.xml



RestActivator class:


RestServices class:


The full text of error is below:


What is interesting, Tomcat 8.0 fails as well with this Rest and demonstrates the issue with invalid url pattern. However, it seems to me appropriately formed

Would be grateful for any help, since Rest services are not so REST for me any more.
 
Sheriff
Posts: 22784
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error is clear: class com.sun.jersey.spi.container.servlet.ServletContainer cannot be found. Either it's not in the dependency you're using, or it cannot be found for another reason.

Now some good news: this can be fixed really, really easy. Just remove all of the Jersey stuff. JBoss and WildFly come with their own REST implementation, RESTeasy. You don't even need to do anything to get it to work. Just have the @ApplicationPath class and your REST classes, and JBoss and WildFly will automatically pick them up.

Now, should you require some RESTeasy specifics, you can use the following dependencies (check out the actual versions for your JBoss/WildFly version):
  • org.jboss.resteasy:resteasy-jaxrs for the core
  • org.jboss.resteasy:resteasy-jackson-provider for a Jackson 1.x provider (for converting to and from JSON)
  • org.jboss.resteasy:resteasy-jackson2-provider for a Jackson 2.x provider
  • org.jboss.resteasy:resteasy-client for a RESTeasy client


  • You can find the versions and more libraries in your WildFly installation, sub folder modules/system/layers/base/org/jboss/resteasy.


    Very important: mark these dependencies as provided, otherwise they may conflict with the JBoss/WildFly internal classes.
    reply
      Bookmark Topic Watch Topic
    • New Topic