Michaela
Michaela

Reputation: 493

RESTEasy on JBoss 5 - jars needed

We are running JBoss 5.1.0 and I'm trying to get just a simple test app up and running with RESTEasy. However, I cannot figure out what I need in order to do this. Apparently new versions of JBoss have everything included, but that doesn't help me. From what I understand, I need to modify the web.xml of my app to include the bootstrap and some other things. And then I need to include some jars in the WEB-INF/lib. This is where I'm stuck.

Upvotes: 3

Views: 3370

Answers (2)

Andre Nel
Andre Nel

Reputation: 442

To add to Prasobh.K's answer - if using the pom.xml in a maven project setup - then you can just add the following inside the dependencies tags:

    <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>jaxrs-api</artifactId>
        <version>2.3.4.Final</version>
    </dependency>
    <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jaxrs</artifactId>
        <version>2.3.4.Final</version>
    </dependency>
    <dependency>
        <groupId>org.scannotation</groupId>
        <artifactId>scannotation</artifactId>
        <version>1.0.3</version>
    </dependency>
    <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jaxb-provider</artifactId>
        <version>2.3.4.Final</version>
    </dependency>
    <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jackson-provider</artifactId>
        <version>2.3.4.Final</version>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-jaxrs</artifactId>
        <version>1.8.5</version>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-mapper-asl</artifactId>
        <version>1.8.5</version>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-core-asl</artifactId>
        <version>1.8.5</version>
    </dependency>

(instead of copying the jars into the lib folder)

It may also help some doing a port from Wildfly to JBoss 5.1 that the ...\WEB-INF\web.xml should be changed to:

<?xml version="1.0" encoding="UTF-8"?>

from the wildfly version which is:

<!DOCTYPE web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd" >

Upvotes: 1

Prasobh.Kollattu
Prasobh.Kollattu

Reputation: 1691

Resteasy libraries are not bundled with JBOSS.5.1.0. You should include following libraries in your WEB-INF/lib

enter image description here

Upvotes: 6

Related Questions