Finally got it working. I reinstalled JBoss 7 without installing the 
recommended 
RestEasy patches and its working. According to the documentation at 
http://docs.jboss.org/resteasy/docs/2.3.4.Final/userguide/html/Installation_Configuration.html#d0e231
 

its recommended to install RestEasy 
patch resteasy-jboss-modules-2.3.4.Final.zip. Skipping that step seems to have 
solved the problem.

My first clue that it was working is that when I accidently used the wrong URL 
in a browser I got a "Could not find resources for" web error rather than the 
standard 404.


-Robert

________________________________
From: Bill Burke <bbu...@redhat.com>
To: Robert M. Gary <robert_g...@sbcglobal.net>
Cc: resteasy-users@lists.sourceforge.net
Sent: Tue, July 10, 2012 11:29:31 PM
Subject: Re: [Resteasy-users] Resteasy not deploying in JBoss 7.1.1.Final

Might be because its a 2.5 web.xml.

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee";;
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";;
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";;
       version="3.0">
</web-app>


On 7/10/12 7:59 PM, Robert M. Gary wrote:
> Bill,
>
> Thanks for your reply. I was testing some different ideas and
> temporarily adding Application to the Library class. I've now removed
> that but still am not seeing the RestEasy services using the URL you
> mentioned. I'm including my WAR including src. I'm just deploying as a
> standalone.
>
> -Robert
>
> ------------------------------------------------------------------------
> *From:* Bill Burke <bbu...@redhat.com>
> *To:* resteasy-users@lists.sourceforge.net
> *Sent:* Tue, July 10, 2012 4:49:51 PM
> *Subject:* Re: [Resteasy-users] Resteasy not deploying in JBoss 7.1.1.Final
>
> * Are you sure you are accessing the correct URL?  it would be
> http://localhost:8080/whatever-your-war-name-is/services/library/book
>
> * Maybe its because Library is extending Application?  Not sure why you
> are doing that...Scanner might be picking this class instead of HelloWorld.
>
> On 7/10/12 7:44 PM, Robert M. Gary wrote:
>  > When I deploy a RestEasy war in JBoss 7.1.1.Final the services never
>  > seems to be made available. I leave web.xml blank to allow for the
>  > auto-detect. After deployment no Restful services are available. Using a
>  > web browser I cannot access "books".
>  >
>  > web.xml
>  > <?xml version="1.0" encoding="UTF-8"?>
>>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";;
>>             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>>http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";;
>  >            version="2.5">
>  > </web-app>
>  >
>  >
>  > package com.robert;
>  >
>  > import javax.ws.rs.ApplicationPath;
>  > import javax.ws.rs.core.Application;
>  >
>  > @ApplicationPath("services")
>  >
>  > public class HelloWorld extends Application {
>  >      public HelloWorld() {
>  >          super();
>  >      }
>  > }
>  >
>  >
>  > package com.robert;
>  >
>  > import javax.ws.rs.*;
>  > import javax.ws.rs.core.Application;
>  >
>  > @Path("library")
>  > public class Library extends Application {
>  >
>  > @GET
>  >      @Path("/books")
>  >      public String getBooks() {
>  >          return "this is all your books";
>  >      }
>  >
>  >      @GET
>  > @Path("/book/{isbn}")
>  >      public String getBook(@PathParam("isbn") String id) {
>  >          // search my database and get a string representation and
> return it
>  >          return "Its a good book; I read it";
>  >      }
>  >
>  > @PUT
>  >      @Path("/book/{isbn}")
>  >      public void addBook(@PathParam("isbn") String id,
>  > @QueryParam("name") String name) {
>  >          System.out.println("Adding book "+name);
>  >      }
>  >
>  >      @DELETE
>  >      @Path("/book/{id}")
>  >      public void removeBook(@PathParam("id") String id ){
>  >          System.out.println("Removing book "+id);
>  >
>  >      }
>  >
>  >
>  > }
>  >
>  >
>  >
>  >
> ------------------------------------------------------------------------------
>  > Live Security Virtual Conference
>  > Exclusive live event will cover all the ways today's security and
>  > threat landscape has changed and how IT managers can respond. Discussions
>  > will include endpoint security, mobile security and the latest in malware
>> threats.http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>  >
>  >
>  >
>  > _______________________________________________
>  > Resteasy-users mailing list
>  > Resteasy-users@lists.sourceforge.net
> <mailto:Resteasy-users@lists.sourceforge.net>
>  > https://lists.sourceforge.net/lists/listinfo/resteasy-users
>  >
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Resteasy-users mailing list
> Resteasy-users@lists.sourceforge.net
> <mailto:Resteasy-users@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/resteasy-users

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to