You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
(16) |
Apr
(18) |
May
(13) |
Jun
(100) |
Jul
(165) |
Aug
(53) |
Sep
(41) |
Oct
(84) |
Nov
(113) |
Dec
(171) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(84) |
Feb
(30) |
Mar
(75) |
Apr
(113) |
May
(87) |
Jun
(96) |
Jul
(127) |
Aug
(106) |
Sep
(191) |
Oct
(142) |
Nov
(106) |
Dec
(83) |
| 2010 |
Jan
(62) |
Feb
(93) |
Mar
(92) |
Apr
(58) |
May
(52) |
Jun
(104) |
Jul
(109) |
Aug
(94) |
Sep
(75) |
Oct
(54) |
Nov
(65) |
Dec
(38) |
| 2011 |
Jan
(53) |
Feb
(84) |
Mar
(95) |
Apr
(24) |
May
(10) |
Jun
(49) |
Jul
(74) |
Aug
(23) |
Sep
(67) |
Oct
(21) |
Nov
(62) |
Dec
(50) |
| 2012 |
Jan
(26) |
Feb
(7) |
Mar
(9) |
Apr
(5) |
May
(13) |
Jun
(7) |
Jul
(18) |
Aug
(48) |
Sep
(58) |
Oct
(79) |
Nov
(19) |
Dec
(15) |
| 2013 |
Jan
(33) |
Feb
(21) |
Mar
(10) |
Apr
(22) |
May
(39) |
Jun
(31) |
Jul
(15) |
Aug
(6) |
Sep
(8) |
Oct
(1) |
Nov
(4) |
Dec
(3) |
| 2014 |
Jan
(17) |
Feb
(18) |
Mar
(15) |
Apr
(12) |
May
(11) |
Jun
(3) |
Jul
(10) |
Aug
(2) |
Sep
(3) |
Oct
(4) |
Nov
(4) |
Dec
(1) |
| 2015 |
Jan
|
Feb
(6) |
Mar
(5) |
Apr
(13) |
May
(2) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(6) |
Oct
(12) |
Nov
(12) |
Dec
(12) |
| 2016 |
Jan
(10) |
Feb
(3) |
Mar
(8) |
Apr
(4) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
| 2017 |
Jan
(6) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
|
From: Nicolas C. <ni...@nu...> - 2008-10-06 21:04:06
|
Hi Bill.
Yes, my class is a JAXB annotated class. I take your suggestions and both fail.
But changing the annotations to @Produces("application/json;charset=ISO-8859-1") it works!
I think I have somthing misconfigurated in my UTF-8 DB/Connection/App/Tomcat that prevents me to see the utf8 encoded data.
Thanks for your help!
Nicolás
http://nikofactory.blogspot.com
----- Original Message ----
From: Bill Burke <bb...@re...>
To: Nicolas Cornaglia <ni...@nu...>
Cc: res...@li...
Sent: Monday, October 6, 2008 5:06:20 PM
Subject: Re: [Resteasy-developers] i18n Content
What is Stream? Is it a JAXB annotated class?
The only thing I can think of is that chunked encoding is confusing your
javascript interpreter (or library?).
I suggest adding additional RESTEasy methods to test the theory
@GET
@Path("/stream/string")
@Produces("application/json;charset=UTF-8")
public String getString()
{
return "{"stream":{"activities":[{"id":9,"title":"A title with Ñ and
áéíóú"}]}}";
}
If that still screws things up, create a custom Response object and set
the Content-Language.
Nicolas Cornaglia wrote:
> Hi everyone,
>
> I need some advice on i18n issues.
>
> I have a JSON producer:
>
> @GET
> @Path("/stream")
> @Produces("application/json;charset=UTF-8")
> public Stream getMyStreamJson() {
> Stream stream = ...;
> return stream;
> }
>
> who's outcome is:
>
> {"stream":{"activities":[{"id":9,"title":"A title with Ñ and áéíóú"}]}}
>
> If I get the url directly in firefox (http://localhost/stream), the
> downloaded file is correct.
>
> But my client (ExtJS) see extraneous characters:
>
> {"stream":{"activities":[{"id":9,"title":"A title with � and �����"}]}}
>
> The header of the response are:
>
> Server Apache-Coyote/1.1
> Content-Type application/json;charset=UTF-8
> Transfer-Encoding chunked
> Date Mon, 06 Oct 2008 08:26:45 GMT
>
> If I develop a single JSP:
>
> <%@page contentType="application/json;charset=UTF-8" %>
> {"stream":{"activities":[{"id":9,"title":"A title with Ñ and áéíóú"}]}}
>
> All goes well, but the headers are:
>
> Server Apache-Coyote/1.1
> Content-Type application/json;charset=UTF-8
> Content-Language es
> Content-Length 2294
> Date Mon, 06 Oct 2008 08:25:30 GMT
>
> There are any special needs to work with internationalizated content or
> I am missing some configuration?
>
> Thanks in advance,
> Nicolás.
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com |
|
From: Bill B. <bb...@re...> - 2008-10-06 19:52:22
|
Pranav,
Sorry for the late response. You've probably already given up, but I
really didn't have an answer for you before.
If you are using ServletFilters at all that intercept any RESTEasy
request and do any query of the parameters of the servlet within that
Filter, RESTEasy will not be able to get the form data as the input
stream of the request will have already been eaten up. (See the javadoc
for ServletRequest and getParameter()).
I have fixed this problem in TRUNK and it will be out with Beta 9.
Pranav Parikh wrote:
> Hi,
>
> I'm a beginner in REST.I dont know if this is a right place to post this
> message but I could not find any other place so posting it here.
>
> I'm implementing RESTful Web services for my application. I'm facing a
> few problems when submitting the HTML form using the HTTP POST method.
> I'm not able to retrieve the form parameters I submit using the POST
> method. The "request" object is always null.
>
> My servlet code is as follows
>
> import javax.servlet.http.HttpServletRequest;
> import javax.ws.rs.POST;
> import javax.ws.rs.Path;
> import javax.ws.rs.ProduceMime;
> import javax.ws.rs.core.Context;
>
> @POST
> @Path("/submitform")
> @ProduceMime("text/plain")
> public String submitForm(@Context HttpServletRequest request){
>
> logger.info <http://logger.info>("In submitform"+request);
>
> if(request!=null){ // the control never goes inside if
>
> String name = request.getParameter("name");
> String surname = request.getParameter("surname");
>
> logger.info
> <http://logger.info>("Name::"+name+",Surname::"+surname);
> return "Name::"+name+",Surname::"+surname;
>
> }
> return "request is null"; // This gets returned always
>
> }
>
>
> My HTML looks like
>
> <html>
> <title>A Test Page
> </title>
>
> <form method="post" name="form1"
> action="https://localhost:8443/rest/submitform/">
> <table>
> <tr>
> <td>Name::
> </td>
>
> <td>
> <input type=text name="name" value="">
> </td>
> </tr>
>
> <tr>
> <td>Surname::
> </td>
>
> <td>
> <input type=text name="surname" value="">
> </td>
> </tr>
>
> <tr>
> <td align=center colspan=2>
> <input type=submit name="submit" value="submit">
> </td>
> </tr>
>
>
> </table>
> </form>
> </html>
>
> Any kind help will be appreciated.
>
> Thanks,
> Pranav Parikh
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: Bill B. <bb...@re...> - 2008-10-06 19:37:12
|
Excellent! Yeah, let's talk about it here on this list. I had plans to add interceptors to the client framework as I wanted to provide the option for browser-like caching facilities for the client. If you come up with something good I'll give you SVN access and you can add the capability yourself. Bill Solomon Duskis wrote: > Hi guys, > > My project needs to pass the same information across every single REST > call that gets handles by a filter. That functionality happens to be > sending date/time for temporal testing (a.k.a. time-machine > functionality). We have an existing ServletFilter that handles the > server-side aspects. Until now, we've accessed that ServletFilter > functionality from a browser by adding a couple of request parameters. > We're in the process of moving some of the existing site functionality > into a separate server which we'll access via REST. Ideally, we'd like > to use the RESTEasy client and "decorate" the HttpClient request before > the remote service is called. > > I have a pretty good idea how to modify ProxyFactory and ClientInvoker > to do what I need, but I'd rather not have my own non-sanctioned build. > What should I do from here to get this kind of functionality into the > RESTEasy client? Is this kind of functionality even desired as part of > the RESTEasy client? > > As an aside, a decoration approach can also theoretically be used for > client-side caching. > > -Solomon Duskis > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-developers -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Solomon D. <sd...@gm...> - 2008-10-06 19:16:56
|
Hi guys, My project needs to pass the same information across every single REST call that gets handles by a filter. That functionality happens to be sending date/time for temporal testing (a.k.a. time-machine functionality). We have an existing ServletFilter that handles the server-side aspects. Until now, we've accessed that ServletFilter functionality from a browser by adding a couple of request parameters. We're in the process of moving some of the existing site functionality into a separate server which we'll access via REST. Ideally, we'd like to use the RESTEasy client and "decorate" the HttpClient request before the remote service is called. I have a pretty good idea how to modify ProxyFactory and ClientInvoker to do what I need, but I'd rather not have my own non-sanctioned build. What should I do from here to get this kind of functionality into the RESTEasy client? Is this kind of functionality even desired as part of the RESTEasy client? As an aside, a decoration approach can also theoretically be used for client-side caching. -Solomon Duskis |
|
From: Bill B. <bb...@re...> - 2008-10-06 15:09:08
|
What is Stream? Is it a JAXB annotated class?
The only thing I can think of is that chunked encoding is confusing your
javascript interpreter (or library?).
I suggest adding additional RESTEasy methods to test the theory
@GET
@Path("/stream/string")
@Produces("application/json;charset=UTF-8")
public String getString()
{
return "{"stream":{"activities":[{"id":9,"title":"A title with Ñ and
áéíóú"}]}}";
}
If that still screws things up, create a custom Response object and set
the Content-Language.
Nicolas Cornaglia wrote:
> Hi everyone,
>
> I need some advice on i18n issues.
>
> I have a JSON producer:
>
> @GET
> @Path("/stream")
> @Produces("application/json;charset=UTF-8")
> public Stream getMyStreamJson() {
> Stream stream = ...;
> return stream;
> }
>
> who's outcome is:
>
> {"stream":{"activities":[{"id":9,"title":"A title with Ñ and áéíóú"}]}}
>
> If I get the url directly in firefox (http://localhost/stream), the
> downloaded file is correct.
>
> But my client (ExtJS) see extraneous characters:
>
> {"stream":{"activities":[{"id":9,"title":"A title with � and �����"}]}}
>
> The header of the response are:
>
> Server Apache-Coyote/1.1
> Content-Type application/json;charset=UTF-8
> Transfer-Encoding chunked
> Date Mon, 06 Oct 2008 08:26:45 GMT
>
> If I develop a single JSP:
>
> <%@page contentType="application/json;charset=UTF-8" %>
> {"stream":{"activities":[{"id":9,"title":"A title with Ñ and áéíóú"}]}}
>
> All goes well, but the headers are:
>
> Server Apache-Coyote/1.1
> Content-Type application/json;charset=UTF-8
> Content-Language es
> Content-Length 2294
> Date Mon, 06 Oct 2008 08:25:30 GMT
>
> There are any special needs to work with internationalizated content or
> I am missing some configuration?
>
> Thanks in advance,
> Nicolás.
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: Nicolas C. <ni...@nu...> - 2008-10-06 10:27:28
|
Hi everyone,
I need some advice on i18n issues.
I have a JSON producer:
@GET
@Path("/stream")
@Produces("application/json;charset=UTF-8")
public Stream getMyStreamJson() {
Stream stream = ...;
return stream;
}
who's outcome is:
{"stream":{"activities":[{"id":9,"title":"A title with Ñ and áéíóú"}]}}
If I get the url directly in firefox (http://localhost/stream), the downloaded file is correct.
But my client (ExtJS) see extraneous characters:
{"stream":{"activities":[{"id":9,"title":"A title with � and �����"}]}}
The header of the response are:
Server Apache-Coyote/1.1
Content-Type application/json;charset=UTF-8
Transfer-Encoding chunked
Date Mon, 06 Oct 2008 08:26:45 GMT
If I develop a single JSP:
<%@page contentType="application/json;charset=UTF-8" %>
{"stream":{"activities":[{"id":9,"title":"A title with Ñ and áéíóú"}]}}
All goes well, but the headers are:
Server Apache-Coyote/1.1
Content-Type application/json;charset=UTF-8
Content-Language es
Content-Length 2294
Date Mon, 06 Oct 2008 08:25:30 GMT
There are any special needs to work with internationalizated content or I am missing some configuration?
Thanks in advance,
Nicolás. |
|
From: Todd Y. <tod...@me...> - 2008-09-29 18:33:34
|
Just for followup in case anyone else has a similar question down the road, I found what I needed using the LocalBinding annotation. @LocalBinding(jndiBinding="myBinding") I realize now I was also confusing local vs remote with local vs global. Like I said, not really a RESTEasy issue at all, just something a beginner like myself might get stuck on. Bill Burke wrote: > Should be whatever JNDI you can reach the EJB at. That could be > java:comp/env/WhateverYouBoundTo, or the global JNDI name of the EJB. > > Really anything bound in JNDI will work. Doesn't have to be an EJB. > > Todd Yocum wrote: >> Ok, looking at the actual EJB example included in the source, I see >> it also includes the name of the EAR in the JNDI name, so it would >> look like its a documentation bug, is that right? >> >> Todd Yocum wrote: >>> Hello, >>> >>> I am working with beta-6 of RESTEasy, and have had an issue with the >>> JNDI lookup of an EJB resource. I've setup my EAR to match how the >>> RESTEasy documentation recommends, but am getting an error trying to >>> find the EJB unless I fully qualify the name with the name of the >>> EAR, which is not what the RESTEasy docs show. >>> >>> I'm guessing the problem isn't really specific to RESTEasy, but how >>> I have configured my EJB, since I'm relatively new to >>> EJB/JBoss/Java. I've stepped through the RESTEasy code in eclipse, >>> but couldn't spot anything. >>> >>> Anybody know what I'm doing wrong? >>> >>> Thanks! >>> >> >> >> ------------------------------------------------------------------------- >> >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win >> great prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Resteasy-developers mailing list >> Res...@li... >> https://lists.sourceforge.net/lists/listinfo/resteasy-developers > |
|
From: Bill B. <bb...@re...> - 2008-09-25 17:53:14
|
Hmmm... You'll have to create a testcase that I can use to recreate the problem. I had to make the changes specified so that @XmlSeeAlso would work (i.e. for unmarshalling class hierarchies). Todd Yocum wrote: > When updating from beta-6 to beta-8, my jaxb unmarshalling no longer works where it once did. > > I now get the following unmarshal exception > > javax.xml.bind.UnmarshalException: unexpected element (uri:"http://www.example.org/DataCollectionPackage", local:"DataCollectionPackage"). Expected elements are (none) > > Looking at the Subversion changes for AbstractJAXBProvider.java, I see the following comment > > rev 343: fix JAXB baseclase bugs and eating of errors > > And the code changed from > > JAXBElement<T> e = unmarshaller.unmarshal(new StreamSource(entityStream), type); > return e.getValue(); > > to > > return (T) unmarshaller.unmarshal(new StreamSource(entityStream)); > > So was there a problem with my JAXB class and it just wasn't being handled in beta-6, or did something else change in > beta-8 that I should be aware of, perhaps? I noticed the supporting libs were all the same, except that the size changed > for jaxb-api-2.1.jar from beta-6 to beta-8 > > Any insights greatly appreciated. > > Thanks > > Todd > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-developers -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Todd Y. <tod...@me...> - 2008-09-25 17:47:22
|
When updating from beta-6 to beta-8, my jaxb unmarshalling no longer works where it once did. I now get the following unmarshal exception javax.xml.bind.UnmarshalException: unexpected element (uri:"http://www.example.org/DataCollectionPackage", local:"DataCollectionPackage"). Expected elements are (none) Looking at the Subversion changes for AbstractJAXBProvider.java, I see the following comment rev 343: fix JAXB baseclase bugs and eating of errors And the code changed from JAXBElement<T> e = unmarshaller.unmarshal(new StreamSource(entityStream), type); return e.getValue(); to return (T) unmarshaller.unmarshal(new StreamSource(entityStream)); So was there a problem with my JAXB class and it just wasn't being handled in beta-6, or did something else change in beta-8 that I should be aware of, perhaps? I noticed the supporting libs were all the same, except that the size changed for jaxb-api-2.1.jar from beta-6 to beta-8 Any insights greatly appreciated. Thanks Todd |
|
From: Mike C. (mchack) <mc...@ci...> - 2008-09-24 20:15:43
|
Bill,
It looks good. At some point it would probably be nice to conditionally
suspend in some manner but in reality most requests would probably need
to block anyway. Looks simple enough.
Sorry about the delay. Somehow my spam filter kicked in and didn't see
the message until today.
Mike
Mike Chack
mc...@ci...
-----Original Message-----
From: Bill Burke [mailto:bb...@re...]
Sent: Friday, September 19, 2008 2:46 PM
To: res...@li...
Cc: Mike Chack (mchack)
Subject: Asynch HTTP
As a first stab of support Asynchrnous HTTP, here are my current
thoughts for a very simple API.
public interface AsynchronousResponse {
void setResponse(Response response);
}
public @interface Suspend {
long value();
}
@GET
public void get(@Suspend(300) AsynchronousResponse response) {
..
}
AsynchronousResponse.setResponse() will throw an exception if the
request is no longer valid.
I'm going to start off by using Jetty as its easily embeddable for unit
testing. Then I'll create adapters for JBoss Web and Tomcat.
Any thoughts?
Bill
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: Bill B. <bb...@re...> - 2008-09-23 20:23:47
|
Should be whatever JNDI you can reach the EJB at. That could be java:comp/env/WhateverYouBoundTo, or the global JNDI name of the EJB. Really anything bound in JNDI will work. Doesn't have to be an EJB. Todd Yocum wrote: > Ok, looking at the actual EJB example included in the source, I see it > also includes the name of the EAR in the JNDI name, so it would look > like its a documentation bug, is that right? > > Todd Yocum wrote: >> Hello, >> >> I am working with beta-6 of RESTEasy, and have had an issue with the >> JNDI lookup of an EJB resource. I've setup my EAR to match how the >> RESTEasy documentation recommends, but am getting an error trying to >> find the EJB unless I fully qualify the name with the name of the EAR, >> which is not what the RESTEasy docs show. >> >> I'm guessing the problem isn't really specific to RESTEasy, but how I >> have configured my EJB, since I'm relatively new to EJB/JBoss/Java. I've >> stepped through the RESTEasy code in eclipse, but couldn't spot anything. >> >> Anybody know what I'm doing wrong? >> >> Thanks! >> > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-developers -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Todd Y. <tod...@me...> - 2008-09-23 19:52:52
|
Ok, looking at the actual EJB example included in the source, I see it also includes the name of the EAR in the JNDI name, so it would look like its a documentation bug, is that right? Todd Yocum wrote: > Hello, > > I am working with beta-6 of RESTEasy, and have had an issue with the > JNDI lookup of an EJB resource. I've setup my EAR to match how the > RESTEasy documentation recommends, but am getting an error trying to > find the EJB unless I fully qualify the name with the name of the EAR, > which is not what the RESTEasy docs show. > > I'm guessing the problem isn't really specific to RESTEasy, but how I > have configured my EJB, since I'm relatively new to EJB/JBoss/Java. I've > stepped through the RESTEasy code in eclipse, but couldn't spot anything. > > Anybody know what I'm doing wrong? > > Thanks! > |
|
From: Todd Y. <tod...@me...> - 2008-09-23 18:02:20
|
Hello,
I am working with beta-6 of RESTEasy, and have had an issue with the
JNDI lookup of an EJB resource. I've setup my EAR to match how the
RESTEasy documentation recommends, but am getting an error trying to
find the EJB unless I fully qualify the name with the name of the EAR,
which is not what the RESTEasy docs show.
I'm guessing the problem isn't really specific to RESTEasy, but how I
have configured my EJB, since I'm relatively new to EJB/JBoss/Java. I've
stepped through the RESTEasy code in eclipse, but couldn't spot anything.
Anybody know what I'm doing wrong?
Thanks!
Here is the error I'm seeing
javax.naming.NameNotFoundException: StoreResource not bound
at
org.jboss.resteasy.plugins.server.resourcefactory.JndiResourceFactory.getScannableClass(JndiResourceFactory.java:62)
at
org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:107)
My web.xml excerpt for how I expected it to be
<context-param>
<param-name>resteasy.jndi.resources</param-name>
<param-value>StoreResource/local</param-value>
</context-param>
My web.xml excerpt of what actually works
<context-param>
<param-name>resteasy.jndi.resources</param-name>
<param-value>DataCollectionRS_EAR/StoreResource/local</param-value>
</context-param>
The WAR and EJB are bundled into the same EAR.
My interface decleration
@Local
@Path("/")
public interface Store {
@POST
@Consumes("application/xml")
@Path("storeXML")
String storeXML(DataCollectionPackage dataCollectionPackage);
}
And implementation
@Stateless
public class StoreResource implements Store
{
// this unitName matches the one defined in persistence.xml file
@PersistenceContext(unitName="DataCollectionPU")
EntityManager em;
public String storeXML(DataCollectionPackage dataCollectionPackage)
{
This is what JNDI View showed from the JBoss JMX console, and how I
figured out I needed to include the EAR name
Global JNDI Namespace
+- DataCollectionRS_EAR (class: org.jnp.interfaces.NamingContext)
| +- StoreResource (class: org.jnp.interfaces.NamingContext)
| | +- local (proxy: $Proxy130 implements interface mil.navy.tsts.datacollectionRS.Store,interface org.jboss.ejb3.JBossProxy)
|
|
From: Bill B. <bb...@re...> - 2008-09-22 14:49:27
|
You are running the junit testsuite and getting these failures?
AsynchronousDispatcher is an experimental *incomplete* feature and I'm
not sure how you could possibly be invoking that code path if you just
copied the resteasy-jaxrs.war.
The failure stems from that the method is being dispatched to something
expecting input, i.e.
@Path("/basic")
@PUT
public void put(String content) {...}
Which still bothers the hell out of me. How can I easily reproduce this?
Eric Kahler wrote:
> Greetings,
>
> I'm interested in using RESTEasy, but having runtime problems. I
> downloaded the beta and installed a deep copy of directory
> "resteasy-jaxrs.war" to /server/default/deploy. I've tried to test the
> installation via existing RESTEasy components and from what I could
> glean from the source distribution (in resteasy/test/smoke), it seems
> the URL "http://localhost:8080/resteasy-jaxrs/basic" should return some
> text, like "basic". It seems the war deploys cleanly but when I
> exercise the server with the above URL I get the following exception:
>
> 2008-09-22 09:26:47,640 ERROR [STDERR] 11469 [http-0.0.0.0-8080-1] ERROR
> org.jboss.resteasy.core.SynchronousDispatcher - Failed executing GET /basic
> 2008-09-22 09:26:47,640 ERROR [STDERR]
> org.jboss.resteasy.spi.LoggableFailure: Failed processing arguments of
> public
> org.jboss.resteasy.core.AsynchronousDispatcher(org.jboss.resteasy.spi.ResteasyProviderFactory)
> 2008-09-22 09:26:47,640 ERROR [STDERR] at
> org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:79)
> 2008-09-22 09:26:47,640 ERROR [STDERR] at
> org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory.createResource(POJOResourceFactory.java:38)
> 2008-09-22 09:26:47,640 ERROR [STDERR] at
> org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:122)
> 2008-09-22 09:26:47,656 ERROR [STDERR] at
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:348)
> 2008-09-22 09:26:47,656 ERROR [STDERR] at
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:182)
> 2008-09-22 09:26:47,656 ERROR [STDERR] at
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:90)
> 2008-09-22 09:26:47,656 ERROR [STDERR] at
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:66)
> 2008-09-22 09:26:47,656 ERROR [STDERR] at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 2008-09-22 09:26:47,671 ERROR [STDERR] at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 2008-09-22 09:26:47,671 ERROR [STDERR] at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 2008-09-22 09:26:47,671 ERROR [STDERR] at
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> 2008-09-22 09:26:47,671 ERROR [STDERR] at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 2008-09-22 09:26:47,671 ERROR [STDERR] at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 2008-09-22 09:26:47,687 ERROR [STDERR] at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
> 2008-09-22 09:26:47,687 ERROR [STDERR] at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> 2008-09-22 09:26:47,687 ERROR [STDERR] at
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
> 2008-09-22 09:26:47,687 ERROR [STDERR] at
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
> 2008-09-22 09:26:47,687 ERROR [STDERR] at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> 2008-09-22 09:26:47,703 ERROR [STDERR] at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 2008-09-22 09:26:47,703 ERROR [STDERR] at
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
> 2008-09-22 09:26:47,703 ERROR [STDERR] at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 2008-09-22 09:26:47,703 ERROR [STDERR] at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
> 2008-09-22 09:26:47,718 ERROR [STDERR] at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> 2008-09-22 09:26:47,718 ERROR [STDERR] at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 2008-09-22 09:26:47,718 ERROR [STDERR] at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
> 2008-09-22 09:26:47,718 ERROR [STDERR] at
> java.lang.Thread.run(Thread.java:619)
> 2008-09-22 09:26:47,718 ERROR [STDERR] Caused by:
> org.jboss.resteasy.spi.LoggableFailure: content-type was null and
> expecting to extract a body
> 2008-09-22 09:26:47,718 ERROR [STDERR] at
> org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:41)
> 2008-09-22 09:26:47,734 ERROR [STDERR] at
> org.jboss.resteasy.core.ConstructorInjectorImpl.injectableArguments(ConstructorInjectorImpl.java:49)
> 2008-09-22 09:26:47,734 ERROR [STDERR] at
> org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:75)
> 2008-09-22 09:26:47,734 ERROR [STDERR] ... 25 more
>
> I was using my browser to issue the request. Thinking Mozilla might be
> introducing something unwanted in the HTTP header, I also tried telnet
> to port 8080 and issuing a plain-vanilla GET on /resteasy-jaxrs/basic
> but I arrived at the same exception server side.
>
> Looking at this in the debugger, it seems that the root cause is
> org.jboss.resteasy.core.MessageBodyParameter line 38:
>
> MediaType mediaType = request.getHttpHeaders().getMediaType();
>
> mediaType is coming back "null". However, if I use the debugger to
> assign a new MediaType() with "text/plain" the immediate lines pass but
> then I get other exceptions later.
>
> I've had this same experience on RESTEasy Beta's 5 and 7, using JBoss
> 4.2.1, 4.2.2, and 4.2.3, with either JDK 1.5 or 1.6.
>
> I'm open to suggestions and helping further the effort: If I'm
> performing an operation incorrectly please advise. If I can be of
> further assistance, please let me know.
>
> Best,
> Eric Kahler
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: Eric K. <ek...@cs...> - 2008-09-22 14:21:36
|
Greetings, I'm interested in using RESTEasy, but having runtime problems. I downloaded the beta and installed a deep copy of directory "resteasy-jaxrs.war" to /server/default/deploy. I've tried to test the installation via existing RESTEasy components and from what I could glean from the source distribution (in resteasy/test/smoke), it seems the URL "http://localhost:8080/resteasy-jaxrs/basic" should return some text, like "basic". It seems the war deploys cleanly but when I exercise the server with the above URL I get the following exception: 2008-09-22 09:26:47,640 ERROR [STDERR] 11469 [http-0.0.0.0-8080-1] ERROR org.jboss.resteasy.core.SynchronousDispatcher - Failed executing GET /basic 2008-09-22 09:26:47,640 ERROR [STDERR] org.jboss.resteasy.spi.LoggableFailure: Failed processing arguments of public org.jboss.resteasy.core.AsynchronousDispatcher(org.jboss.resteasy.spi.ResteasyProviderFactory) 2008-09-22 09:26:47,640 ERROR [STDERR] at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:79) 2008-09-22 09:26:47,640 ERROR [STDERR] at org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory.createResource(POJOResourceFactory.java:38) 2008-09-22 09:26:47,640 ERROR [STDERR] at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:122) 2008-09-22 09:26:47,656 ERROR [STDERR] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:348) 2008-09-22 09:26:47,656 ERROR [STDERR] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:182) 2008-09-22 09:26:47,656 ERROR [STDERR] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:90) 2008-09-22 09:26:47,656 ERROR [STDERR] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:66) 2008-09-22 09:26:47,656 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 2008-09-22 09:26:47,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 2008-09-22 09:26:47,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 2008-09-22 09:26:47,671 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 2008-09-22 09:26:47,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 2008-09-22 09:26:47,671 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 2008-09-22 09:26:47,687 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) 2008-09-22 09:26:47,687 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) 2008-09-22 09:26:47,687 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) 2008-09-22 09:26:47,687 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) 2008-09-22 09:26:47,687 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 2008-09-22 09:26:47,703 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 2008-09-22 09:26:47,703 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) 2008-09-22 09:26:47,703 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 2008-09-22 09:26:47,703 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) 2008-09-22 09:26:47,718 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 2008-09-22 09:26:47,718 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) 2008-09-22 09:26:47,718 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) 2008-09-22 09:26:47,718 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619) 2008-09-22 09:26:47,718 ERROR [STDERR] Caused by: org.jboss.resteasy.spi.LoggableFailure: content-type was null and expecting to extract a body 2008-09-22 09:26:47,718 ERROR [STDERR] at org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:41) 2008-09-22 09:26:47,734 ERROR [STDERR] at org.jboss.resteasy.core.ConstructorInjectorImpl.injectableArguments(ConstructorInjectorImpl.java:49) 2008-09-22 09:26:47,734 ERROR [STDERR] at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:75) 2008-09-22 09:26:47,734 ERROR [STDERR] ... 25 more I was using my browser to issue the request. Thinking Mozilla might be introducing something unwanted in the HTTP header, I also tried telnet to port 8080 and issuing a plain-vanilla GET on /resteasy-jaxrs/basic but I arrived at the same exception server side. Looking at this in the debugger, it seems that the root cause is org.jboss.resteasy.core.MessageBodyParameter line 38: MediaType mediaType = request.getHttpHeaders().getMediaType(); mediaType is coming back "null". However, if I use the debugger to assign a new MediaType() with "text/plain" the immediate lines pass but then I get other exceptions later. I've had this same experience on RESTEasy Beta's 5 and 7, using JBoss 4.2.1, 4.2.2, and 4.2.3, with either JDK 1.5 or 1.6. I'm open to suggestions and helping further the effort: If I'm performing an operation incorrectly please advise. If I can be of further assistance, please let me know. Best, Eric Kahler |
|
From: Michael B. <mic...@gm...> - 2008-09-17 12:52:59
|
Hi, To make the beta 7 work I had to remove the trailing slash from the mapping prefix: mapping prefix: /rest url pattern: /rest/* Otherwise the first letter of the path gets swallowed. with beta 6 the following was working mapping prefix: /rest/ url pattern: /rest/* Michael Brackx |
|
From: Bill B. <bb...@re...> - 2008-09-16 11:18:38
|
Fixed a few bugs that Stephane, Juergen, and Andreas found. Follow downloads link on http://jboss.org/resteasy -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Bill B. <bb...@re...> - 2008-09-12 17:11:56
|
Thanks dude. Michael Brackx wrote: > Hi, > > Chapter 26 uses the old groupId and beta-4 version. > > Michael > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-developers -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Michael B. <mic...@gm...> - 2008-09-12 10:53:20
|
Hi, Chapter 26 uses the old groupId and beta-4 version. Michael |
|
From: Michael B. <mic...@gm...> - 2008-09-12 10:46:52
|
Hi, In the HTML guide the following chapters are not accessible: 20, 21, 23 Chapter 25 still uses ProduceMime and ConsumeMime. Michael |
|
From: Bill B. <bb...@re...> - 2008-09-10 18:42:45
|
Looks like a bug. I'll get it fixed sometime Friday.
Stef Epardaud wrote:
> I'm using resteasy.servlet.mapping.prefix=/rest because my servlet
> mapping is /rest/* and when I build a URI using
>
> uriInfo.getBaseUriBuilder().path(Foo.class, "getFoo").build("bar");
>
> with (and from within a call of):
>
> @Path("/")
> class Foo {
> @Path("/foo/{key}")
> @GET
> public Response getFoo(@PathParam key);
> }
>
> I get http://localhost/app/foo/bar instead of
> http://localhost/app/rest/foo/bar (/rest is missing).
>
> This used to work before (beta1, way old), so maybe I'm missing a change
> that I should have made to my application?
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: Stef E. <st...@ep...> - 2008-09-10 15:20:07
|
I'm using resteasy.servlet.mapping.prefix=/rest because my servlet
mapping is /rest/* and when I build a URI using
uriInfo.getBaseUriBuilder().path(Foo.class, "getFoo").build("bar");
with (and from within a call of):
@Path("/")
class Foo {
@Path("/foo/{key}")
@GET
public Response getFoo(@PathParam key);
}
I get http://localhost/app/foo/bar instead of
http://localhost/app/rest/foo/bar (/rest is missing).
This used to work before (beta1, way old), so maybe I'm missing a change
that I should have made to my application?
--
Stéphane Epardaud
|
|
From: Bill B. <bb...@re...> - 2008-09-10 13:52:29
|
Your web.xml is wrong. Please take a look at: https://resteasy.svn.sourceforge.net/svnroot/resteasy/tags/RESTEASY_JAXRS_1_0_BETA_6/examples/ejb-integration/ This example comes with the distribution. Turn off scanning. You must also manually define EJBs to register with RESTEasy using the "resteasy.jndi.resources" context-param. Our documentation talks about how to do this. If these changes don't work, let me know on this list. <web-app> <display-name>Archetype Created Web Application</display-name> <context-param> <param-name>resteasy.jndi.resources</param-name> <param-value> JobTraker/IResultDaoRest/remote </param-value> </context-param> <!-- set this if you map the Resteasy servlet to something other than /* <context-param> <param-name>resteasy.servlet.mapping.prefix</param-name> <param-value>/resteasy</param-value> </context-param> --> <listener> <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class> </listener> <servlet> <servlet-name>Resteasy</servlet-name> <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class> </servlet> <servlet-mapping> <servlet-name>Resteasy</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> </web-app> Jean-Baptiste Meslin wrote: > Hi, > > I'm trying to use RestEsay and i have never could deploy my war. > > I work with beta 6 + jboss 4.2.2 GA + ejb3 > > first my EJB classes : > > @Remote > @Path("/") > public interface IResultDaoRest { > > @GET > @Path("/result") > @Produces("text/plain") > String getResults(); > > } > > @Stateless > public class ResultDaoRest implements IResultDaoRest { > > @EJB > IResultDao resultDao; > > @Override > public String getResults() { > System.out.println("getResult"); > return "result"; > } > } > > @Remote > @Path("/") > public interface ILocatingRessource { > @Path("locating") > IResulDaoRest getLocating(); > } > > and its implementation > > -------------------------------------------------------- > my web.wml : > > > <context-param> > <param-name>resteasy.jndi.resources</param-name> > > <param-value>JobTraker/ResultDaoRest/remote,JobTraker/LocatingResourceBean/remote > </param-value> > > </context-param> > > <context-param> > <param-name>resteasy.scan</param-name> > <param-value>true</param-value> > </context-param> > > <context-param> > <param-name>resteasy.resource.method-interceptors</param-name> > <param-value> > org.jboss.resteasy.core.ResourceMethodSecurityInterceptor > </param-value> > </context-param> > > <listener> > > <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class> > </listener> > > <servlet> > <servlet-name>Resteasy</servlet-name> > > <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class> > </servlet> > > <servlet-mapping> > <servlet-name>Resteasy</servlet-name> > <url-pattern>/*</url-pattern> > </servlet-mapping> > </web-app> > > ------------------------------------------------ > > I have an EAR named JobTracker, and this naming context > > +- JobTraker (class: org.jnp.interfaces.NamingContext) > | +- ResultDaoRest (class: org.jnp.interfaces.NamingContext) > | | +- remote (proxy: $Proxy520 implements > interface > com.linkdex.server.resteasy.dao.IResultDaoRest,interface > org.jboss.ejb3.JBossProxy) > | +- LocatingRessourceBean (class: > org.jnp.interfaces.NamingContext) > | | +- remote (proxy: $Proxy523 implements interface > com.linkdex.server.resteasy.dao.ILocatingRessource,interface > org.jboss.ejb3.JBossProxy) > > --------------------------------------------------- > > When I deploy my EAR i have this error : > > RuntimeException: Class is not a root resource. It, or one of its > interfaces must be annotated with @Path: $Proxy538 implements: > com.linkdex.server.resteasy.dao.IResulDaoRest org.jboss.ejb3.JBossProxy > at > org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:116) > [..] > > 14:10:15,484 ERROR [StandardContext] Error listenerStart > 14:10:15,484 ERROR [StandardContext] Erreur de démarrage du contexte > [/LinkdexRESTEasy] suite aux erreurs précédentes > 14:10:15,562 WARN [ServiceController] Problem starting service > jboss.web.deployment:war=LinkdexRESTEasy.war,id=1822547394 > ... > > somebody can help me ? > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-developers -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Edgar A S. <edg...@re...> - 2008-09-10 13:50:18
|
Jean,
I am not sure you can do that directly with EJBs, maybe Bill can confirm it.
However, you can create a "Façade" for you EJB where you can use EJB
dependency injection capabilities, and so you pojo can can access you
EJB without problems.
Another architectural issue is that maybe your "Dao" returning String
you may have problems in layers that are not suitable for REST, such as
a Swing or even plain JSP pages (whatever JSF or Wicket).
hth
Edgar
Jean-Baptiste Meslin wrote:
> Hi,
>
> I'm trying to use RestEsay and i have never could deploy my war.
>
> I work with beta 6 + jboss 4.2.2 GA + ejb3
>
> first my EJB classes :
>
> @Remote
> @Path("/")
> public interface IResultDaoRest {
>
> @GET
> @Path("/result")
> @Produces("text/plain")
> String getResults();
>
> }
>
> @Stateless
> public class ResultDaoRest implements IResultDaoRest {
>
> @EJB
> IResultDao resultDao;
>
> @Override
> public String getResults() {
> System.out.println("getResult");
> return "result";
> }
> }
>
> @Remote
> @Path("/")
> public interface ILocatingRessource {
> @Path("locating")
> IResulDaoRest getLocating();
> }
>
> and its implementation
>
> --------------------------------------------------------
> my web.wml :
>
>
> <context-param>
> <param-name>resteasy.jndi.resources</param-name>
>
> <param-value>JobTraker/ResultDaoRest/remote,JobTraker/LocatingResourceBean/remote
> </param-value>
>
> </context-param>
>
> <context-param>
> <param-name>resteasy.scan</param-name>
> <param-value>true</param-value>
> </context-param>
>
> <context-param>
> <param-name>resteasy.resource.method-interceptors</param-name>
> <param-value>
> org.jboss.resteasy.core.ResourceMethodSecurityInterceptor
> </param-value>
> </context-param>
>
> <listener>
>
> <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
> </listener>
>
> <servlet>
> <servlet-name>Resteasy</servlet-name>
>
> <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>Resteasy</servlet-name>
> <url-pattern>/*</url-pattern>
> </servlet-mapping>
> </web-app>
>
> ------------------------------------------------
>
> I have an EAR named JobTracker, and this naming context
>
> +- JobTraker (class: org.jnp.interfaces.NamingContext)
> | +- ResultDaoRest (class: org.jnp.interfaces.NamingContext)
> | | +- remote (proxy: $Proxy520 implements
> interface
> com.linkdex.server.resteasy.dao.IResultDaoRest,interface
> org.jboss.ejb3.JBossProxy)
> | +- LocatingRessourceBean (class:
> org.jnp.interfaces.NamingContext)
> | | +- remote (proxy: $Proxy523 implements interface
> com.linkdex.server.resteasy.dao.ILocatingRessource,interface
> org.jboss.ejb3.JBossProxy)
>
> ---------------------------------------------------
>
> When I deploy my EAR i have this error :
>
> RuntimeException: Class is not a root resource. It, or one of its
> interfaces must be annotated with @Path: $Proxy538 implements:
> com.linkdex.server.resteasy.dao.IResulDaoRest org.jboss.ejb3.JBossProxy
> at
> org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:116)
> [..]
>
> 14:10:15,484 ERROR [StandardContext] Error listenerStart
> 14:10:15,484 ERROR [StandardContext] Erreur de démarrage du contexte
> [/LinkdexRESTEasy] suite aux erreurs précédentes
> 14:10:15,562 WARN [ServiceController] Problem starting service
> jboss.web.deployment:war=LinkdexRESTEasy.war,id=1822547394
> ...
>
> somebody can help me ?
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
--
____________________________________________________
Edgar A Silva
Solutions Architect
JBoss, a division of Red Hat
Mobiles: + 55 11 7853-2861
Office: + 55 11 3529-6000
Red Hat Brazil
|
|
From: Jean-Baptiste M. <mes...@gm...> - 2008-09-10 13:31:50
|
Hi,
I'm trying to use RestEsay and i have never could deploy my war.
I work with beta 6 + jboss 4.2.2 GA + ejb3
first my EJB classes :
@Remote
@Path("/")
public interface IResultDaoRest {
@GET
@Path("/result")
@Produces("text/plain")
String getResults();
}
@Stateless
public class ResultDaoRest implements IResultDaoRest {
@EJB
IResultDao resultDao;
@Override
public String getResults() {
System.out.println("getResult");
return "result";
}
}
@Remote
@Path("/")
public interface ILocatingRessource {
@Path("locating")
IResulDaoRest getLocating();
}
and its implementation
--------------------------------------------------------
my web.wml :
<context-param>
<param-name>resteasy.jndi.resources</param-name>
<param-value>JobTraker/ResultDaoRest/remote,JobTraker/LocatingResourceBean/remote
</param-value>
</context-param>
<context-param>
<param-name>resteasy.scan</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>resteasy.resource.method-interceptors</param-name>
<param-value>
org.jboss.resteasy.core.ResourceMethodSecurityInterceptor
</param-value>
</context-param>
<listener>
<listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
</listener>
<servlet>
<servlet-name>Resteasy</servlet-name>
<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Resteasy</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
------------------------------------------------
I have an EAR named JobTracker, and this naming context
+- JobTraker (class: org.jnp.interfaces.NamingContext)
| +- ResultDaoRest (class: org.jnp.interfaces.NamingContext)
| | +- remote (proxy: $Proxy520 implements
interface
com.linkdex.server.resteasy.dao.IResultDaoRest,interface
org.jboss.ejb3.JBossProxy)
| +- LocatingRessourceBean (class:
org.jnp.interfaces.NamingContext)
| | +- remote (proxy: $Proxy523 implements interface
com.linkdex.server.resteasy.dao.ILocatingRessource,interface
org.jboss.ejb3.JBossProxy)
---------------------------------------------------
When I deploy my EAR i have this error :
RuntimeException: Class is not a root resource. It, or one of its
interfaces must be annotated with @Path: $Proxy538 implements:
com.linkdex.server.resteasy.dao.IResulDaoRest org.jboss.ejb3.JBossProxy
at
org.jboss.resteasy.core.ResourceMethodRegistry.addResourceFactory(ResourceMethodRegistry.java:116)
[..]
14:10:15,484 ERROR [StandardContext] Error listenerStart
14:10:15,484 ERROR [StandardContext] Erreur de démarrage du contexte
[/LinkdexRESTEasy] suite aux erreurs précédentes
14:10:15,562 WARN [ServiceController] Problem starting service
jboss.web.deployment:war=LinkdexRESTEasy.war,id=1822547394
...
somebody can help me ?
|