You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2010 |
Jan
(1) |
Feb
(2) |
Mar
(6) |
Apr
(5) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
(8) |
Sep
(4) |
Oct
(2) |
Nov
(6) |
Dec
(4) |
| 2011 |
Jan
(4) |
Feb
(18) |
Mar
(9) |
Apr
(7) |
May
(6) |
Jun
(13) |
Jul
(11) |
Aug
(7) |
Sep
(12) |
Oct
(28) |
Nov
(12) |
Dec
(11) |
| 2012 |
Jan
(20) |
Feb
(21) |
Mar
(19) |
Apr
(12) |
May
(44) |
Jun
(23) |
Jul
(14) |
Aug
(26) |
Sep
(23) |
Oct
(7) |
Nov
(42) |
Dec
(15) |
| 2013 |
Jan
(62) |
Feb
(20) |
Mar
(14) |
Apr
(52) |
May
(29) |
Jun
(46) |
Jul
(20) |
Aug
(55) |
Sep
(27) |
Oct
(53) |
Nov
(29) |
Dec
(21) |
| 2014 |
Jan
(35) |
Feb
(44) |
Mar
(12) |
Apr
(37) |
May
(24) |
Jun
(17) |
Jul
(13) |
Aug
(1) |
Sep
(4) |
Oct
(13) |
Nov
(1) |
Dec
(1) |
| 2015 |
Jan
(11) |
Feb
(8) |
Mar
(10) |
Apr
(7) |
May
(17) |
Jun
(11) |
Jul
(13) |
Aug
(14) |
Sep
(6) |
Oct
(3) |
Nov
(7) |
Dec
(3) |
| 2016 |
Jan
(1) |
Feb
(4) |
Mar
(8) |
Apr
(2) |
May
(2) |
Jun
(10) |
Jul
|
Aug
|
Sep
(5) |
Oct
(1) |
Nov
|
Dec
|
|
From: Christian H. <chr...@ya...> - 2013-11-26 21:17:23
|
> John D. Ament <joh...@gm...> schrieb am 20:23 Dienstag, 26.November 2013: > > I assumed this would happen, based on Bill's email. You're right. This happend after adding the following line to my startup code: deployment.setInjectorFactoryClass(org.jboss.resteasy.cdi.CdiInjectorFactory.class.getName()); > you'll probably > need to extend the CdiInjectorFactory to use your own BeanManager. I wonder why http://docs.jboss.org/resteasy/docs/3.0.5.Final/userguide/html_single/index.html#d4e2034 seems to be so simple. Sounds like Weld and RESTEasy are simply not built for what I want to do! The philosophie seems to be: use the whole application server or use something else. My idea was to create a small configuration which could be restarted very fast during development. I've done something similar with Guice and Jersey. But Wildfly should start pretty fast, so this could be better than trying to do the configuration myself. Christian |
|
From: Bill B. <bb...@re...> - 2013-11-26 21:09:05
|
This does not work?
LicenseList list = response.readEntity(LicenseList.class);
You could also try this:
LicenseList list = response.readEntity(new
GenericType<JAXBElement<LicenseList>>() {}).getValue();
javax.ws.rs.core.GenericType
On 11/26/2013 4:00 PM, Gabriella Turek wrote:
> No, I've tried that, it does not work. I get the following error:
>
> java.lang.ClassCastException: javax.xml.bind.JAXBElement cannot be cast to
> nz.org.riskscape.license.rest.domain.LicenseList
> at
> nz.org.riskscape.license.rest.RiskScapeLicenseServiceTest.testGetExpiredLic
> enses(RiskScapeLicenseServiceTest.java:102)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:5
> 7)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
> l.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
>
>
> --
> Dr Gabriella Turek
> Sr. Software Engineer, Systems Development Team
> NIWA Auckland, New Zealand
> Tel: +64 9 3754645
> www.niwa.co.nz
> NIWA - Enhancing the benefit of New Zealand¹s natural resources.
>
>
>> Date: Tue, 26 Nov 2013 15:51:56 -0500
>> From: Bill Burke <bb...@re...>
>> Subject: Re: [Resteasy-users] Replacing ProxyFactory with
>> RestEasyWebTarget does not work
>> To: res...@li...
>> Message-ID: <529...@re...>
>> Content-Type: text/plain; charset=windows-1252; format=flowed
>>
>> This is a Resteasy Client -> JAX-RS 2.0 mismatch migration problem.
>>
>> Replace:
>>
>> response.getEntity()
>>
>> with:
>>
>> response.readEntity(String.class);
>>
>> replace String.class to whatever class you want to marshal to.
>> getEntity() returns null if you haven't unmarshalled anything with
>> readEntity().
>>
>>
>>
>> On 11/26/2013 2:59 PM, Gabriella Turek wrote:
>>> After upgrading from Resteasy 2.4 to 3.0.5, none of my client calls work
>>> anymore. The entity which I am expecting (as simple as a String) is
>>> always null. In debug mode I can see it being set in the Response object
>>> on the server side, but on the client side the entity in the Response is
>>> null.
>>> Here is an example call:
>>>
>>> The interface:
>>>
>>> | /**
>>> * @return all expired licenses
>>> */
>>> @GET
>>> @ClientResponseType(entityType= LicenseList.class)
>>> @Path("/expired")
>>> @Produces(MediaType.APPLICATION_XML)
>>> public Response getExpiredLicenses();|
>>>
>>> The implementation:
>>>
>>> | /**
>>> * @return all expired licenses
>>> */
>>> @Override
>>> public Response getExpiredLicenses() {
>>> try {
>>> LicenseList list= LicensesDBUtil.getExpiredLicenses();
>>> Response resp= Response.ok().entity(list).build();
>>> return resp;
>>> } catch (SQLException e) {
>>> LOG.error("Error getting expired licenses :" + e.getMessage());
>>> return
>>> Response.status(Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).type
>>> (MediaType.TEXT_PLAIN).build();
>>> }|
>>>
>>> The test call :
>>>
>>> | @Test
>>> public void testGetExpiredLicenses() throws Exception {
>>> ResteasyClientBuilder rsb= new ResteasyClientBuilder();
>>> ResteasyClient rsc= rsb.build();
>>> ResteasyWebTarget target= rsc.target(BASEURL);
>>> return target.proxy(RiskScapeLicenseService.class);
>>> Response response= client.getExpiredLicenses();
>>> assertTrue(HttpResponseCodes.SC_OK== response.getStatus());
>>> @SuppressWarnings("unchecked")
>>> JAXBElement<LicenseList> element= (JAXBElement<LicenseList>)
>>> response.getEntity();
>>> LicenseList list= element.getValue();
>>> assertEquals(4, list.getLicenses().size());
>>> for (License lic: list.getLicenses()) {
>>> assertTrue((new
>>> Date()).after(DateUtils.parseDate(lic.getValidTo(), new String[] {
>>> "yyyy-MM-dd" })));
>>> }
>>> }|
>>>
>>> My web.xml file:
>>>
>>> |<?xml version="1.0" encoding="UTF-8"?>
>>> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> xmlns="http://java.sun.com/xml/ns/javaee"
>>> xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
>>> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>>> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
>>> <display-name>riskscapelic_rest</display-name>
>>> <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.HttpServletDispa
>>> tcher</servlet-class>
>>> </servlet>
>>> <servlet-mapping>
>>> <servlet-name>Resteasy</servlet-name>
>>> <url-pattern>/*</url-pattern>
>>> </servlet-mapping>
>>> <context-param>
>>> <param-name>resteasy.scan</param-name>
>>> <param-value>true</param-value>
>>> </context-param>
>>> <context-param>
>>> <param-name>resteasy.servlet.mapping.prefix</param-name>
>>> <param-value>/</param-value>
>>> </context-param>
>>> </web-app>|
>>>
>>> The LicenseList class:
>>>
>>> |@XmlRootElement(name= "LicenseList")
>>> @XmlAccessorType(XmlAccessType.FIELD)
>>> @XmlType(name= "licenseList", propOrder= {
>>> "licenses"
>>> })
>>> public class LicenseList {
>>>
>>> @XmlElement(name= "Licenses", required= true)
>>> protected List<License> licenses;
>>>
>>> /**
>>> * Gets the value of the licenses property.
>>> *
>>> * <p>
>>> * This accessor method returns a reference to the live list,
>>> * not a snapshot. Therefore any modification you make to the
>>> * returned list will be present inside the JAXB object.
>>> * This is why there is not a <CODE>set</CODE> method for the
>>> licenses property.
>>> *
>>> * <p>
>>> * For example, to add a new item, do as follows:
>>> * <pre>
>>> * getLicenses().add(newItem);
>>> * </pre>
>>> *
>>> *
>>> * <p>
>>> * Objects of the following type(s) are allowed in the list
>>> * {@link License }
>>> *
>>> *
>>> */
>>> public List<License> getLicenses() {
>>> if (licenses== null) {
>>> licenses= new ArrayList<License>();
>>> }
>>> return this.licenses;
>>> }
>>>
>>> }|
>>>
>>> I am using JDK 1.7, Tomcat 7.0.47
>>> --
>>> Dr Gabriella Turek
>>> Sr. Software Engineer, Systems Development Team
>>> NIWA Auckland, New Zealand
>>> Tel: +64 9 3754645
>>> www.niwa.co.nz
>>> NIWA - Enhancing the benefit of New Zealand?s natural resources.
>>> --
>>> Please consider the environment before printing this email.
>>> NIWA is the trading name of the National Institute of Water &
>>> Atmospheric Research Ltd.
>>>
>>>
>>>
>>> -------------------------------------------------------------------------
>>> -----
>>> Rapidly troubleshoot problems before they affect your business. Most IT
>>> organizations don't have a clear picture of how application performance
>>> affects their revenue. With AppDynamics, you get 100% visibility into
>>> your
>>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of
>>> AppDynamics Pro!
>>>
>>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clkt
>>> rk
>>>
>>>
>>>
>>> _______________________________________________
>>> Resteasy-users mailing list
>>> Res...@li...
>>> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>>>
>>
>> --
>> Bill Burke
>> JBoss, a division of Red Hat
>> http://bill.burkecentral.com
>>
>>
>>
>> ------------------------------
>>
>> --------------------------------------------------------------------------
>> ----
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into
>> your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
>> Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktr
>> k
>>
>> ------------------------------
>>
>> _______________________________________________
>> Resteasy-users mailing list
>> Res...@li...
>> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>>
>>
>> End of Resteasy-users Digest, Vol 42, Issue 4
>> *********************************************
>
> --
> Please consider the environment before printing this email.
> NIWA is the trading name of the National Institute of Water & Atmospheric Research Ltd.
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> Resteasy-users mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: Gabriella T. <Gab...@ni...> - 2013-11-26 21:00:25
|
No, I've tried that, it does not work. I get the following error:
java.lang.ClassCastException: javax.xml.bind.JAXBElement cannot be cast to
nz.org.riskscape.license.rest.domain.LicenseList
at
nz.org.riskscape.license.rest.RiskScapeLicenseServiceTest.testGetExpiredLic
enses(RiskScapeLicenseServiceTest.java:102)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:5
7)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
--
Dr Gabriella Turek
Sr. Software Engineer, Systems Development Team
NIWA Auckland, New Zealand
Tel: +64 9 3754645
www.niwa.co.nz
NIWA - Enhancing the benefit of New Zealand¹s natural resources.
>Date: Tue, 26 Nov 2013 15:51:56 -0500
>From: Bill Burke <bb...@re...>
>Subject: Re: [Resteasy-users] Replacing ProxyFactory with
> RestEasyWebTarget does not work
>To: res...@li...
>Message-ID: <529...@re...>
>Content-Type: text/plain; charset=windows-1252; format=flowed
>
>This is a Resteasy Client -> JAX-RS 2.0 mismatch migration problem.
>
>Replace:
>
>response.getEntity()
>
>with:
>
>response.readEntity(String.class);
>
>replace String.class to whatever class you want to marshal to.
>getEntity() returns null if you haven't unmarshalled anything with
>readEntity().
>
>
>
>On 11/26/2013 2:59 PM, Gabriella Turek wrote:
>> After upgrading from Resteasy 2.4 to 3.0.5, none of my client calls work
>> anymore. The entity which I am expecting (as simple as a String) is
>> always null. In debug mode I can see it being set in the Response object
>> on the server side, but on the client side the entity in the Response is
>> null.
>> Here is an example call:
>>
>> The interface:
>>
>> | /**
>> * @return all expired licenses
>> */
>> @GET
>> @ClientResponseType(entityType= LicenseList.class)
>> @Path("/expired")
>> @Produces(MediaType.APPLICATION_XML)
>> public Response getExpiredLicenses();|
>>
>> The implementation:
>>
>> | /**
>> * @return all expired licenses
>> */
>> @Override
>> public Response getExpiredLicenses() {
>> try {
>> LicenseList list= LicensesDBUtil.getExpiredLicenses();
>> Response resp= Response.ok().entity(list).build();
>> return resp;
>> } catch (SQLException e) {
>> LOG.error("Error getting expired licenses :" + e.getMessage());
>> return
>>Response.status(Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).type
>>(MediaType.TEXT_PLAIN).build();
>> }|
>>
>> The test call :
>>
>> | @Test
>> public void testGetExpiredLicenses() throws Exception {
>> ResteasyClientBuilder rsb= new ResteasyClientBuilder();
>> ResteasyClient rsc= rsb.build();
>> ResteasyWebTarget target= rsc.target(BASEURL);
>> return target.proxy(RiskScapeLicenseService.class);
>> Response response= client.getExpiredLicenses();
>> assertTrue(HttpResponseCodes.SC_OK== response.getStatus());
>> @SuppressWarnings("unchecked")
>> JAXBElement<LicenseList> element= (JAXBElement<LicenseList>)
>>response.getEntity();
>> LicenseList list= element.getValue();
>> assertEquals(4, list.getLicenses().size());
>> for (License lic: list.getLicenses()) {
>> assertTrue((new
>>Date()).after(DateUtils.parseDate(lic.getValidTo(), new String[] {
>>"yyyy-MM-dd" })));
>> }
>> }|
>>
>> My web.xml file:
>>
>> |<?xml version="1.0" encoding="UTF-8"?>
>> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>xmlns="http://java.sun.com/xml/ns/javaee"
>>xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
>>xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>>http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
>> <display-name>riskscapelic_rest</display-name>
>> <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.HttpServletDispa
>>tcher</servlet-class>
>> </servlet>
>> <servlet-mapping>
>> <servlet-name>Resteasy</servlet-name>
>> <url-pattern>/*</url-pattern>
>> </servlet-mapping>
>> <context-param>
>> <param-name>resteasy.scan</param-name>
>> <param-value>true</param-value>
>> </context-param>
>> <context-param>
>> <param-name>resteasy.servlet.mapping.prefix</param-name>
>> <param-value>/</param-value>
>> </context-param>
>> </web-app>|
>>
>> The LicenseList class:
>>
>> |@XmlRootElement(name= "LicenseList")
>> @XmlAccessorType(XmlAccessType.FIELD)
>> @XmlType(name= "licenseList", propOrder= {
>> "licenses"
>> })
>> public class LicenseList {
>>
>> @XmlElement(name= "Licenses", required= true)
>> protected List<License> licenses;
>>
>> /**
>> * Gets the value of the licenses property.
>> *
>> * <p>
>> * This accessor method returns a reference to the live list,
>> * not a snapshot. Therefore any modification you make to the
>> * returned list will be present inside the JAXB object.
>> * This is why there is not a <CODE>set</CODE> method for the
>>licenses property.
>> *
>> * <p>
>> * For example, to add a new item, do as follows:
>> * <pre>
>> * getLicenses().add(newItem);
>> * </pre>
>> *
>> *
>> * <p>
>> * Objects of the following type(s) are allowed in the list
>> * {@link License }
>> *
>> *
>> */
>> public List<License> getLicenses() {
>> if (licenses== null) {
>> licenses= new ArrayList<License>();
>> }
>> return this.licenses;
>> }
>>
>> }|
>>
>> I am using JDK 1.7, Tomcat 7.0.47
>> --
>> Dr Gabriella Turek
>> Sr. Software Engineer, Systems Development Team
>> NIWA Auckland, New Zealand
>> Tel: +64 9 3754645
>> www.niwa.co.nz
>> NIWA - Enhancing the benefit of New Zealand?s natural resources.
>> --
>> Please consider the environment before printing this email.
>> NIWA is the trading name of the National Institute of Water &
>> Atmospheric Research Ltd.
>>
>>
>>
>>-------------------------------------------------------------------------
>>-----
>> Rapidly troubleshoot problems before they affect your business. Most IT
>> organizations don't have a clear picture of how application performance
>> affects their revenue. With AppDynamics, you get 100% visibility into
>>your
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of
>>AppDynamics Pro!
>>
>>http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clkt
>>rk
>>
>>
>>
>> _______________________________________________
>> Resteasy-users mailing list
>> Res...@li...
>> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>>
>
>--
>Bill Burke
>JBoss, a division of Red Hat
>http://bill.burkecentral.com
>
>
>
>------------------------------
>
>--------------------------------------------------------------------------
>----
>Rapidly troubleshoot problems before they affect your business. Most IT
>organizations don't have a clear picture of how application performance
>affects their revenue. With AppDynamics, you get 100% visibility into
>your
>Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
>Pro!
>http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktr
>k
>
>------------------------------
>
>_______________________________________________
>Resteasy-users mailing list
>Res...@li...
>https://lists.sourceforge.net/lists/listinfo/resteasy-users
>
>
>End of Resteasy-users Digest, Vol 42, Issue 4
>*********************************************
--
Please consider the environment before printing this email.
NIWA is the trading name of the National Institute of Water & Atmospheric Research Ltd.
|
|
From: Bill B. <bb...@re...> - 2013-11-26 20:52:05
|
This is a Resteasy Client -> JAX-RS 2.0 mismatch migration problem.
Replace:
response.getEntity()
with:
response.readEntity(String.class);
replace String.class to whatever class you want to marshal to.
getEntity() returns null if you haven't unmarshalled anything with
readEntity().
On 11/26/2013 2:59 PM, Gabriella Turek wrote:
> After upgrading from Resteasy 2.4 to 3.0.5, none of my client calls work
> anymore. The entity which I am expecting (as simple as a String) is
> always null. In debug mode I can see it being set in the Response object
> on the server side, but on the client side the entity in the Response is
> null.
> Here is an example call:
>
> The interface:
>
> | /**
> * @return all expired licenses
> */
> @GET
> @ClientResponseType(entityType= LicenseList.class)
> @Path("/expired")
> @Produces(MediaType.APPLICATION_XML)
> public Response getExpiredLicenses();|
>
> The implementation:
>
> | /**
> * @return all expired licenses
> */
> @Override
> public Response getExpiredLicenses() {
> try {
> LicenseList list= LicensesDBUtil.getExpiredLicenses();
> Response resp= Response.ok().entity(list).build();
> return resp;
> } catch (SQLException e) {
> LOG.error("Error getting expired licenses :" + e.getMessage());
> return Response.status(Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).type(MediaType.TEXT_PLAIN).build();
> }|
>
> The test call :
>
> | @Test
> public void testGetExpiredLicenses() throws Exception {
> ResteasyClientBuilder rsb= new ResteasyClientBuilder();
> ResteasyClient rsc= rsb.build();
> ResteasyWebTarget target= rsc.target(BASEURL);
> return target.proxy(RiskScapeLicenseService.class);
> Response response= client.getExpiredLicenses();
> assertTrue(HttpResponseCodes.SC_OK== response.getStatus());
> @SuppressWarnings("unchecked")
> JAXBElement<LicenseList> element= (JAXBElement<LicenseList>) response.getEntity();
> LicenseList list= element.getValue();
> assertEquals(4, list.getLicenses().size());
> for (License lic: list.getLicenses()) {
> assertTrue((new Date()).after(DateUtils.parseDate(lic.getValidTo(), new String[] { "yyyy-MM-dd" })));
> }
> }|
>
> My web.xml file:
>
> |<?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
> <display-name>riskscapelic_rest</display-name>
> <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>
> <context-param>
> <param-name>resteasy.scan</param-name>
> <param-value>true</param-value>
> </context-param>
> <context-param>
> <param-name>resteasy.servlet.mapping.prefix</param-name>
> <param-value>/</param-value>
> </context-param>
> </web-app>|
>
> The LicenseList class:
>
> |@XmlRootElement(name= "LicenseList")
> @XmlAccessorType(XmlAccessType.FIELD)
> @XmlType(name= "licenseList", propOrder= {
> "licenses"
> })
> public class LicenseList {
>
> @XmlElement(name= "Licenses", required= true)
> protected List<License> licenses;
>
> /**
> * Gets the value of the licenses property.
> *
> * <p>
> * This accessor method returns a reference to the live list,
> * not a snapshot. Therefore any modification you make to the
> * returned list will be present inside the JAXB object.
> * This is why there is not a <CODE>set</CODE> method for the licenses property.
> *
> * <p>
> * For example, to add a new item, do as follows:
> * <pre>
> * getLicenses().add(newItem);
> * </pre>
> *
> *
> * <p>
> * Objects of the following type(s) are allowed in the list
> * {@link License }
> *
> *
> */
> public List<License> getLicenses() {
> if (licenses== null) {
> licenses= new ArrayList<License>();
> }
> return this.licenses;
> }
>
> }|
>
> I am using JDK 1.7, Tomcat 7.0.47
> --
> Dr Gabriella Turek
> Sr. Software Engineer, Systems Development Team
> NIWA Auckland, New Zealand
> Tel: +64 9 3754645
> www.niwa.co.nz
> NIWA - Enhancing the benefit of New Zealand’s natural resources.
> --
> Please consider the environment before printing this email.
> NIWA is the trading name of the National Institute of Water &
> Atmospheric Research Ltd.
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Resteasy-users mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: Gabriella T. <Gab...@ni...> - 2013-11-26 20:14:48
|
After upgrading from Resteasy 2.4 to 3.0.5, none of my client calls work anymore. The entity which I am expecting (as simple as a String) is always null. In debug mode I can see it being set in the Response object on the server side, but on the client side the entity in the Response is null.
Here is an example call:
The interface:
/**
* @return all expired licenses
*/
@GET
@ClientResponseType(entityType = LicenseList.class)
@Path("/expired")
@Produces(MediaType.APPLICATION_XML)
public Response getExpiredLicenses();
The implementation:
/**
* @return all expired licenses
*/
@Override
public Response getExpiredLicenses() {
try {
LicenseList list = LicensesDBUtil.getExpiredLicenses();
Response resp = Response.ok().entity(list).build();
return resp;
} catch (SQLException e) {
LOG.error("Error getting expired licenses : " + e.getMessage());
return Response.status(Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()).type(MediaType.TEXT_PLAIN).build();
}
The test call :
@Test
public void testGetExpiredLicenses() throws Exception {
ResteasyClientBuilder rsb = new ResteasyClientBuilder();
ResteasyClient rsc = rsb.build();
ResteasyWebTarget target = rsc.target(BASEURL);
return target.proxy(RiskScapeLicenseService.class);
Response response = client.getExpiredLicenses();
assertTrue(HttpResponseCodes.SC_OK == response.getStatus());
@SuppressWarnings("unchecked")
JAXBElement<LicenseList> element = (JAXBElement<LicenseList>) response.getEntity();
LicenseList list = element.getValue();
assertEquals(4, list.getLicenses().size());
for (License lic : list.getLicenses()) {
assertTrue((new Date()).after(DateUtils.parseDate(lic.getValidTo(), new String[] { "yyyy-MM-dd" })));
}
}
My web.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<display-name>riskscapelic_rest</display-name>
<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>
<context-param>
<param-name>resteasy.scan</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>resteasy.servlet.mapping.prefix</param-name>
<param-value>/</param-value>
</context-param>
</web-app>
The LicenseList class:
@XmlRootElement(name = "LicenseList")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "licenseList", propOrder = {
"licenses"
})
public class LicenseList {
@XmlElement(name = "Licenses", required = true)
protected List<License> licenses;
/**
* Gets the value of the licenses property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the licenses property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getLicenses().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link License }
*
*
*/
public List<License> getLicenses() {
if (licenses == null) {
licenses = new ArrayList<License>();
}
return this.licenses;
}
}
I am using JDK 1.7, Tomcat 7.0.47
--
Dr Gabriella Turek
Sr. Software Engineer, Systems Development Team
NIWA Auckland, New Zealand
Tel: +64 9 3754645
www.niwa.co.nz
NIWA - Enhancing the benefit of New Zealand’s natural resources.
--
Please consider the environment before printing this email.
NIWA is the trading name of the National Institute of Water & Atmospheric Research Ltd.
|
|
From: John D. A. <joh...@gm...> - 2013-11-26 19:23:46
|
I assumed this would happen, based on Bill's email. you'll probably need to extend the CdiInjectorFactory to use your own BeanManager. On Tue, Nov 26, 2013 at 1:58 PM, Christian Helmbold <chr...@ya...> wrote: > Thank you. After adding one more dependency (javax.servlet-api), I get the following error, when I try to start my RESTEasy/Weld configuration: > > Exception in thread "main" java.lang.RuntimeException: Unable to instantiate InjectorFactory implementation. > at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:156) > at org.jboss.resteasy.plugins.server.netty.NettyJaxrsServer.start(NettyJaxrsServer.java:130) > at com.example.jaxrscdi.App.run(App.java:25) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93) > at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266) > at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253) > at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232) > at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169) > at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:165) > at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:119) > at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:112) > at org.jboss.weld.event.EventImpl.fire(EventImpl.java:83) > at org.jboss.weld.environment.se.Weld.initialize(Weld.java:153) > at org.jboss.weld.environment.se.StartMain.go(StartMain.java:41) > at org.jboss.weld.environment.se.StartMain.main(StartMain.java:52) > Caused by: java.lang.NullPointerException > at org.jboss.resteasy.cdi.CdiInjectorFactory.lookupBeanManager(CdiInjectorFactory.java:155) > at org.jboss.resteasy.cdi.CdiInjectorFactory.<init>(CdiInjectorFactory.java:45) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > at java.lang.reflect.Constructor.newInstance(Constructor.java:526) > at java.lang.Class.newInstance(Class.java:374) > at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:148) > ... 18 more > > > Any idea? > > Regards, > Christian > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users |
|
From: Christian H. <chr...@ya...> - 2013-11-26 19:12:32
|
Thank you. After adding one more dependency (javax.servlet-api), I get the following error, when I try to start my RESTEasy/Weld configuration: Exception in thread "main" java.lang.RuntimeException: Unable to instantiate InjectorFactory implementation. at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:156) at org.jboss.resteasy.plugins.server.netty.NettyJaxrsServer.start(NettyJaxrsServer.java:130) at com.example.jaxrscdi.App.run(App.java:25) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93) at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266) at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253) at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232) at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169) at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:165) at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:119) at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:112) at org.jboss.weld.event.EventImpl.fire(EventImpl.java:83) at org.jboss.weld.environment.se.Weld.initialize(Weld.java:153) at org.jboss.weld.environment.se.StartMain.go(StartMain.java:41) at org.jboss.weld.environment.se.StartMain.main(StartMain.java:52) Caused by: java.lang.NullPointerException at org.jboss.resteasy.cdi.CdiInjectorFactory.lookupBeanManager(CdiInjectorFactory.java:155) at org.jboss.resteasy.cdi.CdiInjectorFactory.<init>(CdiInjectorFactory.java:45) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.Class.newInstance(Class.java:374) at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:148) ... 18 more Any idea? Regards, Christian |
|
From: Bill B. <bb...@re...> - 2013-11-25 21:23:05
|
I've never tried using CDI in Java SE. Really depend on the implementation of CDI I suppose. You'd have to manually set up CDI, then set the deployment.setInjectorFactoryClass(org.jboss.resteasy.cdi.CdiInjectoryFactory.class.getName()); Also, our impl only works with Weld. On 11/25/2013 3:49 PM, Christian Helmbold wrote: > Hi! > > > How can I setup RESTEasy (3.0.5) with CDI and Netty in a Java SE environment? > > Simply putting the resteasy-cdi module on the class path doesn't work (as suggested in http://docs.jboss.org/resteasy/docs/3.0.5.Final/userguide/html_single/index.html#d4e2034). > > Here is my startup class: > > @Singleton > public class App { > > public void printHello( > @Observes ContainerInitialized event, @Parameters List<String> parameters) > throws Exception { > NettyJaxrsServer netty = new NettyJaxrsServer(); > netty.setDeployment(new ResteasyDeployment()); > netty.setPort(8000); > netty.setRootResourcePath(""); > netty.setSecurityDomain(null); > netty.start(); > } > } > > I have a root resource in my example project which should be discovered by weld automatically. But if I load the resource I get: > javax.ws.rs.NotFoundException: Could not find resource for full path: http://localhost:8000/ > > I'm using the following libs: > > > What do I have to do to setup RESTEasy with CDI and Netty (or Undertow would be fine too)? > > > ------------------------------------------------------------------------------ > Shape the Mobile Experience: Free Subscription > Software experts and developers: Be at the forefront of tech innovation. > Intel(R) Software Adrenaline delivers strategic insight and game-changing > conversations that shape the rapidly evolving mobile landscape. Sign up now. > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Christian H. <chr...@ya...> - 2013-11-25 21:05:56
|
Hi! How can I setup RESTEasy (3.0.5) with CDI and Netty in a Java SE environment? Simply putting the resteasy-cdi module on the class path doesn't work (as suggested in http://docs.jboss.org/resteasy/docs/3.0.5.Final/userguide/html_single/index.html#d4e2034). Here is my startup class: @Singleton public class App { public void printHello( @Observes ContainerInitialized event, @Parameters List<String> parameters) throws Exception { NettyJaxrsServer netty = new NettyJaxrsServer(); netty.setDeployment(new ResteasyDeployment()); netty.setPort(8000); netty.setRootResourcePath(""); netty.setSecurityDomain(null); netty.start(); } } I have a root resource in my example project which should be discovered by weld automatically. But if I load the resource I get: javax.ws.rs.NotFoundException: Could not find resource for full path: http://localhost:8000/ I'm using the following libs: What do I have to do to setup RESTEasy with CDI and Netty (or Undertow would be fine too)? |
|
From: Saravanabavagugan V. <vsb...@gm...> - 2013-11-24 07:23:59
|
-- regards, Saravana B403 |
|
From: Bill B. <bb...@re...> - 2013-11-19 13:37:32
|
UriInfo.getBaseUri() UriInfo.getBaseUriBuilder() On 11/19/2013 2:47 AM, andrew simpson wrote: > Does anyone have any guidance about generating hrefs including the > server address with RestEasy > I'd like to generate someting like: > href: 'http://api.domain.com/objects/12345' > but infer 'api.domain.com <http://api.domain.com>' rather than hard-code > it.. > Thanks.. > Andrew > > > ------------------------------------------------------------------------------ > Shape the Mobile Experience: Free Subscription > Software experts and developers: Be at the forefront of tech innovation. > Intel(R) Software Adrenaline delivers strategic insight and game-changing > conversations that shape the rapidly evolving mobile landscape. Sign up now. > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: andrew s. <and...@gm...> - 2013-11-19 07:47:58
|
Does anyone have any guidance about generating hrefs including the server address with RestEasy I'd like to generate someting like: href: 'http://api.domain.com/objects/12345' but infer 'api.domain.com' rather than hard-code it.. Thanks.. Andrew |
|
From: chinni <ch...@re...> - 2013-11-18 18:02:26
|
Hi Bill, Need help to fix org.jboss.resteasy.spi.NotFoundException for static resources in a RestEasy-Spring integrated application.It is throwing warnings as could not find resource for files like .css, .js, .html, .png files in log whereas I'm not finding any issue in browser with these files. Please find the exception details and config file below and could you please suggest me if any misconfiguration in my config file. WARN 17 Nov 2013 20:21:37 [http-bio-8080-exec-1] [org.jboss.resteasy.springmvc.ResteasyHandlerMapping - error() - Resource Not Found: Could not find resource for relative : /css/images/ui-bg_flat_0_aaaaaa_40x100.png of full path: http://localhost:8080/myapp/css/images/ui-bg_flat_0_aaaaaa_40x100.png] org.jboss.resteasy.spi.NotFoundException: Could not find resource for relative : /css/images/ui-bg_flat_0_aaaaaa_40x100.png of full path: http://localhost:8080/quantum-monitoring/css/images/ui-bg_flat_0_aaaaaa_40x100.png at org.jboss.resteasy.core.registry.RootSegment.matchChildren(RootSegment.java:360) at org.jboss.resteasy.core.registry.RootSegment.matchRoot(RootSegment.java:374) at org.jboss.resteasy.core.registry.RootSegment.matchRoot(RootSegment.java:367) at org.jboss.resteasy.core.ResourceMethodRegistry.getResourceInvoker(ResourceMethodRegistry.java:251) at org.jboss.resteasy.core.SynchronousDispatcher.getInvoker(SynchronousDispatcher.java:173) at org.jboss.resteasy.springmvc.ResteasyHandlerMapping.getInvoker(ResteasyHandlerMapping.java:99) at org.jboss.resteasy.springmvc.ResteasyHandlerMapping.getHandler(ResteasyHandlerMapping.java:76) at org.springframework.web.servlet.DispatcherServlet.getHandler(DispatcherServlet.java:1063) at org.springframework.web.servlet.DispatcherServlet.getHandler(DispatcherServlet.java:1048) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:886) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:178) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:155) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) Please find my web.xml below <listener> <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootStrap</listener-class></listener><listener> <listener-class>org.jboss.resteasy.plugins.spring.SpringContextLoaderListener</listener-class></listener> <servlet> < servlet-name>db-dispatch</servlet-name> <servlet-class>org.springframework.web.servlet.DispatchServlet</servlet-class> <load-on-startup>1</load-on-startup></servlet> <servlet-mapping> <servlet-name>db-dispatcher</servlet-name> <url-pattern>/</url-pattern></servlet-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file></welcome-file-list> <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class></filter><filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class></filter-mapping> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern></filter-mapping> <context-param> <param-name>contextConfigLocation</param-value> <param-value>/WEB-INF/application-security.xml</param-value></context-param> Anything wrong with config file? Thanks in advance. |
|
From: Joseph O. <jo...@en...> - 2013-11-12 15:55:25
|
Nice! Way to go, Bill. (Incidentally, your book on EJB from ORA has a place of honor on my bookshelf.) On Tue, Nov 12, 2013 at 10:43 AM, Bill Burke <bb...@re...> wrote: > > http://bill.burkecentral.com/2013/11/12/my-new-book-restful-java-with-jax-rs-2-0/ > > > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > > > ------------------------------------------------------------------------------ > November Webinars for C, C++, Fortran Developers > Accelerate application performance with scalable programming models. > Explore > techniques for threading, error checking, porting, and tuning. Get the most > from the latest Intel processors and coprocessors. See abstracts and > register > http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users > -- Joseph B. Ottinger http://enigmastation.com *Memento mori.* |
|
From: Bill B. <bb...@re...> - 2013-11-12 15:43:38
|
http://bill.burkecentral.com/2013/11/12/my-new-book-restful-java-with-jax-rs-2-0/ -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Juergen Z. <Jue...@HS...> - 2013-11-08 10:08:49
|
I compiled the latest WildFly snapshot and upgraded to RESTEasy 3.0.5.Final. Now I'm getting this warning: [org.jboss.resteasy.plugins.providers.RegisterBuiltin] NoClassDefFoundError: Unable to load builtin provider: org.jboss.resteasy.security.smime.MultipartSignedReader How can I get rid of this warning? |
|
From: Paul K M. <pau...@gm...> - 2013-11-07 20:36:20
|
Hi Bill, Thanks for this. I could do something similar with Velocity, but what I was really looking for is something like SeamRest (essentially an equivalent of Jersey MVC). I’m assuming from your response that the SeamRest to RESTEasy migration never happened (or wasn’t agreed?…). Do you think there would be interest in providing equivalent capability in a RESTEasy module (resteasy-mvc)? …or are these sorts of requirements generally handled by SpringMVC in the Resteasy ecosphere (and hence there is largely a null requirement)? Thanks Paul On 7 Nov 2013, at 19:22, Bill Burke <bb...@re...> wrote: > We've been using Freemarker + Resteasy in one of the projects I'm > working on, but not sure the level of integration you could do with it. > Right now we just generate a string using Freemarker and send that in > the JAX-RS response. > > On 11/7/2013 1:12 PM, Paul K Moore wrote: >> Hi all, >> >> First post here, so please feel free to redirect if appropriate. >> >> I’m in the process of moving from Glassfish to WildFly (following >> Oracle’s recent announcement!) and am trying to understand the level of >> support for templating engines. >> >> I found SeamRest <http://www.seamframework.org/Seam3/RESTModuleHome>, >> which looked interesting, but apparently development of SeamRest has >> been halted. It wasn’t obvious whether this was a recent event, but the >> GitHub repo indicates a degree of staleness (2 years). >> >> The SeamFramework <http://www.seamframework.org/> home page indicates >> that (whilst many projects are moving to DeltaSpike) SeamRest is / will >> be integrated with RESTEasy. >> >> The RESTEasy documentation is somewhat silent on the issue of >> “templating”, and certainly there’s no mention of Velocity / Freemarker etc. >> >> I’ve also had a cursory look through the RESTEasy Jira, but couldn’t >> find anything that looked like a placeholder for the migration effort >> from Seam. >> >> So, I’m confused! Where should I be looking for templating support in >> the WildFly ecosystem? If it’s aspirational for RESTEasy, are there any >> current plans / timelines? Is there somewhere else I should be looking? >> >> Thanks in advance >> >> Paul >> >> >> ------------------------------------------------------------------------------ >> November Webinars for C, C++, Fortran Developers >> Accelerate application performance with scalable programming models. Explore >> techniques for threading, error checking, porting, and tuning. Get the most >> from the latest Intel processors and coprocessors. See abstracts and register >> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk >> >> >> >> _______________________________________________ >> Resteasy-users mailing list >> Res...@li... >> https://lists.sourceforge.net/lists/listinfo/resteasy-users >> > > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > > ------------------------------------------------------------------------------ > November Webinars for C, C++, Fortran Developers > Accelerate application performance with scalable programming models. Explore > techniques for threading, error checking, porting, and tuning. Get the most > from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users |
|
From: Bill B. <bb...@re...> - 2013-11-07 19:22:52
|
We've been using Freemarker + Resteasy in one of the projects I'm working on, but not sure the level of integration you could do with it. Right now we just generate a string using Freemarker and send that in the JAX-RS response. On 11/7/2013 1:12 PM, Paul K Moore wrote: > Hi all, > > First post here, so please feel free to redirect if appropriate. > > I’m in the process of moving from Glassfish to WildFly (following > Oracle’s recent announcement!) and am trying to understand the level of > support for templating engines. > > I found SeamRest <http://www.seamframework.org/Seam3/RESTModuleHome>, > which looked interesting, but apparently development of SeamRest has > been halted. It wasn’t obvious whether this was a recent event, but the > GitHub repo indicates a degree of staleness (2 years). > > The SeamFramework <http://www.seamframework.org/> home page indicates > that (whilst many projects are moving to DeltaSpike) SeamRest is / will > be integrated with RESTEasy. > > The RESTEasy documentation is somewhat silent on the issue of > “templating”, and certainly there’s no mention of Velocity / Freemarker etc. > > I’ve also had a cursory look through the RESTEasy Jira, but couldn’t > find anything that looked like a placeholder for the migration effort > from Seam. > > So, I’m confused! Where should I be looking for templating support in > the WildFly ecosystem? If it’s aspirational for RESTEasy, are there any > current plans / timelines? Is there somewhere else I should be looking? > > Thanks in advance > > Paul > > > ------------------------------------------------------------------------------ > November Webinars for C, C++, Fortran Developers > Accelerate application performance with scalable programming models. Explore > techniques for threading, error checking, porting, and tuning. Get the most > from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Paul K M. <pau...@gm...> - 2013-11-07 18:12:17
|
Hi all, First post here, so please feel free to redirect if appropriate. I’m in the process of moving from Glassfish to WildFly (following Oracle’s recent announcement!) and am trying to understand the level of support for templating engines. I found SeamRest, which looked interesting, but apparently development of SeamRest has been halted. It wasn’t obvious whether this was a recent event, but the GitHub repo indicates a degree of staleness (2 years). The SeamFramework home page indicates that (whilst many projects are moving to DeltaSpike) SeamRest is / will be integrated with RESTEasy. The RESTEasy documentation is somewhat silent on the issue of “templating”, and certainly there’s no mention of Velocity / Freemarker etc. I’ve also had a cursory look through the RESTEasy Jira, but couldn’t find anything that looked like a placeholder for the migration effort from Seam. So, I’m confused! Where should I be looking for templating support in the WildFly ecosystem? If it’s aspirational for RESTEasy, are there any current plans / timelines? Is there somewhere else I should be looking? Thanks in advance Paul |
|
From: Mike M. <Mik...@jd...> - 2013-11-06 15:33:49
|
Bill, I created a filter that follows the spec (as best I can tell :-) ) and would like to contribute it the project and have a couple questions: 1) I assume you would want a pull request for the filter? (This assumes you want the filter) 2) We use RestEasy 2.3.5, so what's your thought about which version I should create the filter/pull request against? 2.3.5 or whatever is the latest? 3) I have test cases created but we use Mokito for mocking. I noticed that RestEasy has some mocking but the 2.3.5 version (didn't check higher yet) doesn't have mocking support for the FilterConfig. My filter uses several filter init parameters , so I needed mocking for that class and stayed with Mockito for all the mocking in the test cases. -----Original Message----- From: Bill Burke [mailto:bb...@re...] Sent: Monday, October 28, 2013 10:09 AM To: res...@li... Subject: Re: [Resteasy-users] CORS support needed? Not really hard to add yourself: Read this: http://www.html5rocks.com/en/tutorials/cors/ What we could add to resteasy is a filter that takes a list of allowed origins and handles preflight and simple requests. But, it would be really simple to add it yourself. On 10/28/2013 11:01 AM, Mike Miller wrote: > We are using RestEasy 2.3.5. > > I read thru a couple threads on the mailing list and trying to figure > out if we need CORS support for our usage. Just looking for some > verification or validation. > > We are exposing a lot of our services thru resteasy and the > expectation is that our resources will be called from mobile applications using Ajax > to call the services. We support calls for GET, PUT, POST and DELETE > consuming and producing both json and xml. Testing from the Chrome > Advanced Rest Client works great but once we start trying to make > jQuery (or other Javascript) AJAX calls from web pages, we run into problems. > We can start Chrome with the "-disable-web-security" command line > parameter but I know that's not real solution. To correctly support > these remote ajax calls do we need to provide some type of CORS support? > > > > ---------------------------------------------------------------------- > -------- October Webinars: Code for Performance Free Intel webinars > can help you accelerate application performance. > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the > most from the latest Intel processors and coprocessors. See abstracts > and register > > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.c > lktrk > > > > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk _______________________________________________ Resteasy-users mailing list Res...@li... https://lists.sourceforge.net/lists/listinfo/resteasy-users |
|
From: John D. A. <joh...@gm...> - 2013-10-31 19:14:49
|
I wanted to circle back to this.
I use this to generate a stub:
String contextUrl = co.getValue();
ClientConnectionManager cm = new ThreadSafeClientConnManager();
HttpClient httpClient = new DefaultHttpClient(cm);
ClientExecutor executor = new ApacheHttpClient4Executor(httpClient);
RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
return (T) ProxyFactory.create(className, contextUrl, executor);
However, Bill mentions I need to use ClientResponse.releaseConnection(). I
don't see a way to do this in this scenario. I don't actually have the
ClientResponse here. Should I make that the return value of my interface
methods?
Thanks,
JOhn
On Wed, Oct 16, 2013 at 8:12 AM, Bill Burke <bb...@re...> wrote:
> You should be calling ClientResponse.releaseConnection() after you are
> done with the ClientResponse. Resteasy should automatically clean up
> the connection, but this only happens on a GC.
>
> In JAX-RS 2.0 you are also required to call Response.close().
>
> On 10/15/2013 5:15 PM, John D. Ament wrote:
> > I've seen this error lots of times:
> >
> > Caused by: java.lang.IllegalStateException: Invalid use of
> > BasicClientConnManager: connection still allocated.
> > Make sure to release the connection before allocating another one.
> > at
> org.apache.http.impl.conn.BasicClientConnectionManager.getConnection(BasicClientConnectionManager.java:161)
> > at
> org.apache.http.impl.conn.BasicClientConnectionManager$1.getConnection(BasicClientConnectionManager.java:138)
> > at
> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:455)
> > at
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
> > at
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
> > at
> org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor.execute(ApacheHttpClient4Executor.java:182)
> > [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1]
> > at
> org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:39)
> > [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1]
> > at
> org.jboss.resteasy.plugins.interceptors.encoding.AcceptEncodingGZIPInterceptor.execute(AcceptEncodingGZIPInterceptor.java:40)
> > [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1]
> > at
> org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:45)
> > [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1]
> > at
> org.jboss.resteasy.client.ClientRequest.execute(ClientRequest.java:443)
> > [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1]
> > at
> org.jboss.resteasy.client.ClientRequest.httpMethod(ClientRequest.java:677)
> > [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1]
> > at
> org.jboss.resteasy.client.core.ClientInvoker.invoke(ClientInvoker.java:111)
> > [resteasy-jaxrs-2.3.6.Final-redhat-1.jar:2.3.6.Final-redhat-1]
> >
> > When trying to use the resteasy client. However, how do I reset
> > connection as is indicated in here when I'm using a proxy object?
> >
> > John
> >
> >
> ------------------------------------------------------------------------------
> > October Webinars: Code for Performance
> > Free Intel webinars can help you accelerate application performance.
> > Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> > the latest Intel processors and coprocessors. See abstracts and register
> >
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
> > _______________________________________________
> > Resteasy-users mailing list
> > Res...@li...
> > https://lists.sourceforge.net/lists/listinfo/resteasy-users
> >
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
> _______________________________________________
> Resteasy-users mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>
|
|
From: Bill B. <bb...@re...> - 2013-10-31 17:05:13
|
Resteasy 3.0 or greater, JAX-RS 2.0. Earlier JAX-RS 1.1. On 10/31/2013 11:28 AM, Mike Miller wrote: > For example, we are running RestEasy 2.3.5 – so how can I tell which > version of JAX-RS that supports? Where do I look? > > > > ------------------------------------------------------------------------------ > Android is increasing in popularity, but the open development platform that > developers love is also attractive to malware creators. Download this white > paper to learn more about secure code signing practices that can help keep > Android apps secure. > http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Mike M. <Mik...@jd...> - 2013-10-31 15:28:52
|
For example, we are running RestEasy 2.3.5 - so how can I tell which version of JAX-RS that supports? Where do I look? |
|
From: John D. A. <joh...@gm...> - 2013-10-29 00:06:49
|
Bill, >From the looks of it, the framework is actually leveraging your client framework.. https://github.com/arquillian/arquillian-extension-rest/blob/master/rest-client/impl/impl-3x/src/main/java/org/jboss/arquillian/extension/rest/client/RestEnricher.java#L94 Anyways, the use cases are many. Basically, a test can now have a handle injected to it that points to the REST API, no need to figure out the URL. On Mon, Oct 28, 2013 at 6:10 PM, Bill Burke <bb...@re...> wrote: > Have you seen our proxy extension? (This exists in 2.3.x too) > > > http://docs.jboss.org/resteasy/docs/3.0.4.Final/userguide/html/RESTEasy_Client_Framework.html#d4e2101 > > I guess I just don't understand what problem you are trying to solve > with this extension. > > > > On 10/28/2013 5:56 PM, Jakub Narloch wrote: > > Hi RESTEasy users, > > > > We would like to inform you that the JBoss Arquillian universe just > > extended with completly new extension that was designed to ease the > > testing of JAX-RS based web services: > > > http://arquillian.org/blog/2013/10/28/arquillian-extension-rest-1-0-0-Alpha1/ > > > > One of of it's unique features is the integration with Arquillian Warp > > that does allow to intercept the state of the service running and verify > > it in a test that is being executed in the application container. > > > > We were hoping that you could give a try and give us as much feedback as > > possible. We also welcome any contributions to the newly developed > > extension. > > > > Thanks, > > Jakub Narloch > > > > > > > ------------------------------------------------------------------------------ > > Android is increasing in popularity, but the open development platform > that > > developers love is also attractive to malware creators. Download this > white > > paper to learn more about secure code signing practices that can help > keep > > Android apps secure. > > > http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk > > _______________________________________________ > > Resteasy-users mailing list > > Res...@li... > > https://lists.sourceforge.net/lists/listinfo/resteasy-users > > > > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > > > ------------------------------------------------------------------------------ > Android is increasing in popularity, but the open development platform that > developers love is also attractive to malware creators. Download this white > paper to learn more about secure code signing practices that can help keep > Android apps secure. > http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users > |
|
From: Bill B. <bb...@re...> - 2013-10-28 22:10:18
|
Have you seen our proxy extension? (This exists in 2.3.x too) http://docs.jboss.org/resteasy/docs/3.0.4.Final/userguide/html/RESTEasy_Client_Framework.html#d4e2101 I guess I just don't understand what problem you are trying to solve with this extension. On 10/28/2013 5:56 PM, Jakub Narloch wrote: > Hi RESTEasy users, > > We would like to inform you that the JBoss Arquillian universe just > extended with completly new extension that was designed to ease the > testing of JAX-RS based web services: > http://arquillian.org/blog/2013/10/28/arquillian-extension-rest-1-0-0-Alpha1/ > > One of of it's unique features is the integration with Arquillian Warp > that does allow to intercept the state of the service running and verify > it in a test that is being executed in the application container. > > We were hoping that you could give a try and give us as much feedback as > possible. We also welcome any contributions to the newly developed > extension. > > Thanks, > Jakub Narloch > > > ------------------------------------------------------------------------------ > Android is increasing in popularity, but the open development platform that > developers love is also attractive to malware creators. Download this white > paper to learn more about secure code signing practices that can help keep > Android apps secure. > http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |