• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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: 21745
102
Chrome Eclipse IDE Java Spring Ubuntu VI Editor Windows
  • Mark post as helpful
  • send pies
  • 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.
     
    I wish to win the lottery. I wish for a lovely piece of pie. And I wish for a tiny ad:
    how do I do my own kindle-like thing - without amazon
    https://coderanch.com/t/711421/engineering/kindle-amazon
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!