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: Jean-François H. <jfh...@gm...> - 2014-02-04 16:16:48
|
With a small change I got your sample :
public class LabelValueAdapter extends XmlAdapter<Element, LabelValue> {
@Override
public Element marshal(LabelValue labelValueModel) throws Exception {
Element e =
DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument().createElement(getCleanLabel(labelValueModel.getLabel()));
e.setAttribute("label", labelValueModel.getLabel());
e.setTextContent(labelValueModel.getValue());
return e;
}
@Override
public LabelValue unmarshal(Element element) throws Exception {
throw new UnsupportedOperationException();
}
private String getCleanLabel(String attributeLabel) {
attributeLabel = attributeLabel.replaceAll("dk_",
"").replaceAll("[()]", "")
.replaceAll("[^\\w\\s]", "_").replaceAll(" ", "_")
.toUpperCase();
return attributeLabel;
}
}
2014-02-04 Johnson, Shawn [USA] <joh...@ba...>:
> Thanks so much Jean-François. I had taken that example from another site
> - where they used the both JAXBElement as well as dom.Element - to add the
> attribute to the label. Is there another way to accomplish something like
> this? Since this is only marshaling my Java objects, I have a lot of
> flexibility on how I structure my class.
>
> <DISTILLED_WATER label="Distilled Water">Deer Park</DISTILLED_WATER>
> <MINERAL_WATER label="Mineral Water">Mountain Stream</MINERAL_WATER>
> <PURIFIED_WATER label="Mineral Water">Mr. Water</PURIFIED_WATER>
>
>
> From: Jean-François HEROUARD <jfh...@gm...>
> Date: Tuesday, February 4, 2014 4:25 AM
> To: Shawn Johnson <joh...@ba...>
> Cc: "res...@li..."
> <res...@li...>
> Subject: [External] Re: [Resteasy-users] Error marshaling w/
> XmlAnyElement + Element Adapter - simple JBoss 7 + RESTEasy project
>
>
> I've tested with JAXB 2.2.5, it's the same problem, so forget my previous
> mail.
>
> With the following method in LabelValueAdapter, there's no more NPE :
> @Override
> public Element marshal(LabelValue labelValueModel) throws Exception {
> Element e =
> DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument().cre
> ateElement(getCleanLabel(labelValueModel.getLabel()));
> e.setTextContent(labelValueModel.getValue());
> return e;
> }
>
>
> With this result :
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <testModel>
> <DISTILLED_WATER>Deer Park</DISTILLED_WATER>
> <MINERAL_WATER>Mountain Stream</MINERAL_WATER>
> <PURIFIED_WATER>Mr. Water</PURIFIED_WATER>
> </testModel>
> I have removed all adapter class private attributes and usage JAXBElement,
> it seems there is a problem calling a JAXB marshaller inside an adapter.
> JAXB marshalling is not "reentrant" ?
>
>
>
>
> 2014-02-04 Jean-François HEROUARD <jfh...@gm...>:
>
> I had a similar problem, but the stacktrace was not exactly the same. This
> NPE sounds like a jaxb-impl bug of 2.2.4 version, see
> https://jaxb.java.net/2.2.6/docs/ch02.html. Version 2.2.4 is embedded by
> JBoss7.1.x, you should replace jaxb-impl with 2.2.5. Can you also check in
> your "crazy class path" project what
> is your version af jaxb-impl ?
>
> I'll try to find time to check out and run your project.
>
>
>
> 2014-02-03 Johnson, Shawn [USA] <joh...@ba...>:
>
>
> Bill, thanks for the reply. Sorry for leaving out the version info -
> partially because I've tried 3 different configs. Below is the stack
> trace from JBoss AS 7.2 - which I left with it's included version of
> RESTEasy 2.3.5. I can also repeat this with
> 3.0.6 if that's more helpful?
>
>
> [Previous message was too long for the mailing list]
>
>
> Here is a link to the full stack trace using RESTEasy 2.3.5.
> http://pastebin.com/eFiBgfYQ
>
>
> Re: [Resteasy-users] Error marshaling w/ XmlAnyElement + Element Adapter -
> simple JBoss 7 + RESTEasy project
> From: Bill Burke <bburke@re...> - 2014-02-03 15:19
> You'll have to point out what resteasy version you are using so I can
> match the line numbers in you stack trace up.
>
>
>
> ---------------------------------------------------------------------------
> ---
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktr
> k
> _______________________________________________
> Resteasy-users mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
> _______________________________________________
> Resteasy-users mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>
|
|
From: Johnson, S. [USA] <joh...@ba...> - 2014-02-04 15:57:50
|
Thanks so much Jean-François. I had taken that example from another site
– where they used the both JAXBElement as well as dom.Element – to add the
attribute to the label. Is there another way to accomplish something like
this? Since this is only marshaling my Java objects, I have a lot of
flexibility on how I structure my class.
<DISTILLED_WATER label="Distilled Water">Deer Park</DISTILLED_WATER>
<MINERAL_WATER label="Mineral Water">Mountain Stream</MINERAL_WATER>
<PURIFIED_WATER label="Mineral Water">Mr. Water</PURIFIED_WATER>
From: Jean-François HEROUARD <jfh...@gm...>
Date: Tuesday, February 4, 2014 4:25 AM
To: Shawn Johnson <joh...@ba...>
Cc: "res...@li..."
<res...@li...>
Subject: [External] Re: [Resteasy-users] Error marshaling w/
XmlAnyElement + Element Adapter - simple JBoss 7 + RESTEasy project
I've tested with JAXB 2.2.5, it's the same problem, so forget my previous
mail.
With the following method in LabelValueAdapter, there's no more NPE :
@Override
public Element marshal(LabelValue labelValueModel) throws Exception {
Element e =
DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument().cre
ateElement(getCleanLabel(labelValueModel.getLabel()));
e.setTextContent(labelValueModel.getValue());
return e;
}
With this result :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testModel>
<DISTILLED_WATER>Deer Park</DISTILLED_WATER>
<MINERAL_WATER>Mountain Stream</MINERAL_WATER>
<PURIFIED_WATER>Mr. Water</PURIFIED_WATER>
</testModel>
I have removed all adapter class private attributes and usage JAXBElement,
it seems there is a problem calling a JAXB marshaller inside an adapter.
JAXB marshalling is not "reentrant" ?
2014-02-04 Jean-François HEROUARD <jfh...@gm...>:
I had a similar problem, but the stacktrace was not exactly the same. This
NPE sounds like a jaxb-impl bug of 2.2.4 version, see
https://jaxb.java.net/2.2.6/docs/ch02.html. Version 2.2.4 is embedded by
JBoss7.1.x, you should replace jaxb-impl with 2.2.5. Can you also check in
your "crazy class path" project what
is your version af jaxb-impl ?
I'll try to find time to check out and run your project.
2014-02-03 Johnson, Shawn [USA] <joh...@ba...>:
Bill, thanks for the reply. Sorry for leaving out the version info
partially because I've tried 3 different configs. Below is the stack
trace from JBoss AS 7.2 which I left with it's included version of
RESTEasy 2.3.5. I can also repeat this with
3.0.6 if that's more helpful?
[Previous message was too long for the mailing list]
Here is a link to the full stack trace using RESTEasy 2.3.5.
http://pastebin.com/eFiBgfYQ
Re: [Resteasy-users] Error marshaling w/ XmlAnyElement + Element Adapter -
simple JBoss 7 + RESTEasy project
From: Bill Burke <bburke@re...> - 2014-02-03 15:19
You'll have to point out what resteasy version you are using so I can
match the line numbers in you stack trace up.
---------------------------------------------------------------------------
---
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktr
k
_______________________________________________
Resteasy-users mailing list
Res...@li...
https://lists.sourceforge.net/lists/listinfo/resteasy-users
|
|
From: Jean-François H. <jfh...@gm...> - 2014-02-04 09:26:05
|
I've tested with JAXB 2.2.5, it's the same problem, so forget my previous
mail.
With the following method in LabelValueAdapter, there's no more NPE :
@Override
public Element marshal(LabelValue labelValueModel) throws Exception {
Element e =
DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument().createElement(getCleanLabel(labelValueModel.getLabel()));
e.setTextContent(labelValueModel.getValue());
return e;
}
With this result :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<testModel>
<DISTILLED_WATER>Deer Park</DISTILLED_WATER>
<MINERAL_WATER>Mountain Stream</MINERAL_WATER>
<PURIFIED_WATER>Mr. Water</PURIFIED_WATER>
</testModel>
I have removed all adapter class private attributes and usage JAXBElement,
it seems there is a problem calling a JAXB marshaller inside an adapter.
JAXB marshalling is not "reentrant" ?
2014-02-04 Jean-François HEROUARD <jfh...@gm...>:
> I had a similar problem, but the stacktrace was not exactly the same. This
> NPE sounds like a jaxb-impl bug of 2.2.4 version, see
> https://jaxb.java.net/2.2.6/docs/ch02.html. Version 2.2.4 is embedded by
> JBoss7.1.x, you should replace jaxb-impl with 2.2.5. Can you also check in
> your "crazy class path" project what is your version af jaxb-impl ?
> I'll try to find time to check out and run your project.
>
>
> 2014-02-03 Johnson, Shawn [USA] <joh...@ba...>:
>
> Bill, thanks for the reply. Sorry for leaving out the version info
>> partially because I've tried 3 different configs. Below is the stack
>> trace from JBoss AS 7.2 which I left with it's included version of
>> RESTEasy 2.3.5. I can also repeat this with
>> 3.0.6 if that's more helpful?
>>
>> [Previous message was too long for the mailing list]
>>
>>
>> Here is a link to the full stack trace using RESTEasy 2.3.5.
>> http://pastebin.com/eFiBgfYQ
>>
>>
>> Re: [Resteasy-users] Error marshaling w/ XmlAnyElement + Element Adapter -
>> simple JBoss 7 + RESTEasy project
>> From: Bill Burke <bburke@re...> - 2014-02-03 15:19
>> You'll have to point out what resteasy version you are using so I can
>> match the line numbers in you stack trace up.
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Managing the Performance of Cloud-Based Applications
>> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
>> Read the Whitepaper.
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Resteasy-users mailing list
>> Res...@li...
>> https://lists.sourceforge.net/lists/listinfo/resteasy-users
>>
>
>
|
|
From: Jean-François H. <jfh...@gm...> - 2014-02-04 07:59:40
|
I had a similar problem, but the stacktrace was not exactly the same. This NPE sounds like a jaxb-impl bug of 2.2.4 version, see https://jaxb.java.net/2.2.6/docs/ch02.html. Version 2.2.4 is embedded by JBoss7.1.x, you should replace jaxb-impl with 2.2.5. Can you also check in your "crazy class path" project what is your version af jaxb-impl ? I'll try to find time to check out and run your project. 2014-02-03 Johnson, Shawn [USA] <joh...@ba...>: > Bill, thanks for the reply. Sorry for leaving out the version info > partially because I've tried 3 different configs. Below is the stack > trace from JBoss AS 7.2 which I left with it's included version of > RESTEasy 2.3.5. I can also repeat this with > 3.0.6 if that's more helpful? > > [Previous message was too long for the mailing list] > > > Here is a link to the full stack trace using RESTEasy 2.3.5. > http://pastebin.com/eFiBgfYQ > > > Re: [Resteasy-users] Error marshaling w/ XmlAnyElement + Element Adapter - > simple JBoss 7 + RESTEasy project > From: Bill Burke <bburke@re...> - 2014-02-03 15:19 > You'll have to point out what resteasy version you are using so I can > match the line numbers in you stack trace up. > > > > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > Read the Whitepaper. > > http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users > |
|
From: Johnson, S. [USA] <joh...@ba...> - 2014-02-03 16:17:08
|
Bill, thanks for the reply. Sorry for leaving out the version info partially because I've tried 3 different configs. Below is the stack trace from JBoss AS 7.2 which I left with it's included version of RESTEasy 2.3.5. I can also repeat this with 3.0.6 if that's more helpful? [Previous message was too long for the mailing list] Here is a link to the full stack trace using RESTEasy 2.3.5. http://pastebin.com/eFiBgfYQ Re: [Resteasy-users] Error marshaling w/ XmlAnyElement + Element Adapter - simple JBoss 7 + RESTEasy project From: Bill Burke <bburke@re...> - 2014-02-03 15:19 You'll have to point out what resteasy version you are using so I can match the line numbers in you stack trace up. |
|
From: Johnson, S. [USA] <joh...@ba...> - 2014-02-03 16:11:15
|
Bill, thanks for the reply. Sorry for leaving out the version info – partially because I've tried 3 different configs. Below is the stack trace from JBoss AS 7.2 – which I left with it's included version of RESTEasy 2.3.5. I can also repeat this with 3.0.6 if that's more helpful? 10:55:30,747 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.0.CR1 10:55:31,120 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA 10:55:31,178 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: JBoss AS 7.2.0.Final "Janus" starting 10:55:31,967 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found resteasy-sample.war in deployment directory. To trigger deployment create a file called resteasy-sample.war.dodeploy 10:55:32,007 INFO [org.xnio] (MSC service thread 1-5) XNIO Version 3.0.7.GA 10:55:32,010 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http) 10:55:32,013 INFO [org.xnio.nio] (MSC service thread 1-5) XNIO NIO Implementation Version 3.0.7.GA 10:55:32,021 INFO [org.jboss.remoting] (MSC service thread 1-5) JBoss Remoting version 3.2.14.GA 10:55:32,054 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 29) JBAS010280: Activating Infinispan subsystem. 10:55:32,056 INFO [org.jboss.as.security] (ServerService Thread Pool -- 42) JBAS013171: Activating Security Subsystem 10:55:32,059 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 37) JBAS011800: Activating Naming Subsystem 10:55:32,062 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 35) JBAS012605: Activated the following JSF Implementations: [main, 1.2] 10:55:32,068 INFO [org.jboss.as.security] (MSC service thread 1-1) JBAS013170: Current PicketBox version=4.0.15.Final 10:55:32,103 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 46) JBAS015537: Activating WebServices Extension 10:55:32,127 INFO [org.jboss.as.connector.logging] (MSC service thread 1-5) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.15.Final) 10:55:32,138 INFO [org.jboss.as.naming] (MSC service thread 1-7) JBAS011802: Starting Naming Service 10:55:32,141 INFO [org.jboss.as.mail.extension] (MSC service thread 1-13) JBAS015400: Bound mail session [java:jboss/mail/Default] 10:55:32,184 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 25) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3) 10:55:32,306 INFO [org.jboss.ws.common.management] (MSC service thread 1-7) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.1.3.Final 10:55:32,406 INFO [org.apache.coyote.http11] (MSC service thread 1-6) JBWEB003001: Coyote HTTP/1.1 initializing on : http-localhost/127.0.0.1:8080 10:55:32,413 INFO [org.apache.coyote.http11] (MSC service thread 1-6) JBWEB003000: Coyote HTTP/1.1 starting on: http-localhost/127.0.0.1:8080 10:55:32,567 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS] 10:55:32,694 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-9) JBAS015012: Started FileSystemDeploymentService for directory /Users/shawnjohnson/erule-dev/jboss-as-7.2.0.Final/standalone/deployments 10:55:32,699 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "resteasy-sample.war" (runtime-name: "resteasy-sample.war") 10:55:32,705 INFO [org.jboss.as.remoting] (MSC service thread 1-6) JBAS017100: Listening on 127.0.0.1:9999 10:55:32,705 INFO [org.jboss.as.remoting] (MSC service thread 1-5) JBAS017100: Listening on 127.0.0.1:4447 10:55:33,001 INFO [org.jboss.web] (ServerService Thread Pool -- 52) JBAS018210: Register web context: /resteasy-sample 10:55:33,129 INFO [org.jboss.as.server] (ServerService Thread Pool -- 26) JBAS018559: Deployed "resteasy-sample.war" (runtime-name : "resteasy-sample.war") 10:55:33,135 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management 10:55:33,136 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990 10:55:33,136 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.2.0.Final "Janus" started in 2724ms - Started 162 of 219 services (56 services are passive or on-demand) 10:57:50,400 INFO [org.hibernate.validator.internal.util.Version] (http-localhost/127.0.0.1:8080-1) HV000001: Hibernate Validator 4.3.1.Final 10:57:50,505 INFO [org.jboss.resteasy.spi.ResteasyDeployment] (http-localhost/127.0.0.1:8080-1) Deploying javax.ws.rs.core.Application: class non.sample.resteasy.JaxRsActivator 10:57:50,681 WARN [org.jboss.resteasy.core.SynchronousDispatcher] (http-localhost/127.0.0.1:8080-1) Failed executing GET /test: org.jboss.resteasy.plugins.providers.jaxb.JAXBMarshalException: javax.xml.bind.MarshalException - with linked exception: [com.sun.istack.SAXException2 java.lang.NullPointerException] at org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.writeTo(AbstractJAXBProvider.java:148) [resteasy-jaxb-provider-2.3.5.Final.jar:] at org.jboss.resteasy.core.interception.MessageBodyWriterContextImpl.proceed(MessageBodyWriterContextImpl.java:117) [resteasy-jaxrs-2.3.5.Final.jar:] at org.jboss.resteasy.plugins.interceptors.encoding.GZIPEncodingInterceptor.write(GZIPEncodingInterceptor.java:104) [resteasy-jaxrs-2.3.5.Final.jar:] at org.jboss.resteasy.core.interception.MessageBodyWriterContextImpl.proceed(MessageBodyWriterContextImpl.java:123) [resteasy-jaxrs-2.3.5.Final.jar:] at org.jboss.resteasy.core.ServerResponse.writeTo(ServerResponse.java:250) [resteasy-jaxrs-2.3.5.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.writeJaxrsResponse(SynchronousDispatcher.java:602) [resteasy-jaxrs-2.3.5.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:528) [resteasy-jaxrs-2.3.5.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126) [resteasy-jaxrs-2.3.5.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.5.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.5.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.5.Final.jar:] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final.jar:1.0.2.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45] Caused by: javax.xml.bind.MarshalException - with linked exception: [com.sun.istack.SAXException2 java.lang.NullPointerException] at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:326) at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:251) at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:74) [jboss-jaxb-api_2.2_spec-1.0.4.Final.jar:1.0.4.Final] at org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.writeTo(AbstractJAXBProvider.java:144) [resteasy-jaxb-provider-2.3.5.Final.jar:] ... 24 more Caused by: com.sun.istack.SAXException2 java.lang.NullPointerException at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:247) at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:262) at com.sun.xml.bind.v2.runtime.reflect.AdaptedLister$ListIteratorImpl.next(AdaptedLister.java:115) at com.sun.xml.bind.v2.runtime.property.ArrayReferenceNodeProperty.serializeListBody(ArrayReferenceNodeProperty.java:107) at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:159) at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:358) at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsSoleContent(XMLSerializer.java:593) at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeRoot(ClassBeanInfoImpl.java:340) at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java:494) at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:323) ... 27 more Caused by: java.lang.NullPointerException at com.sun.xml.bind.v2.runtime.reflect.AdaptedLister.getAdapter(AdaptedLister.java:68) at com.sun.xml.bind.v2.runtime.reflect.AdaptedLister.access$000(AdaptedLister.java:55) at com.sun.xml.bind.v2.runtime.reflect.AdaptedLister$ListIteratorImpl.next(AdaptedLister.java:113) ... 34 more Re: [Resteasy-users] Error marshaling w/ XmlAnyElement + Element Adapter - simple JBoss 7 + RESTEasy project From: Bill Burke <bburke@re...> - 2014-02-03 15:19 You'll have to point out what resteasy version you are using so I can match the line numbers in you stack trace up. From: <Johnson>, Shawn Johnson <joh...@ba...<mailto:joh...@ba...>> Date: Monday, February 3, 2014 8:47 AM To: "res...@li...<mailto:res...@li...>" <res...@li...<mailto:res...@li...>> Subject: Error marshaling w/ XmlAnyElement + Element Adapter - simple JBoss 7 + RESTEasy project Hi All, First post, long-time lurker. I have posted this same question to StackOverflow and not had any bites yet. I've broken the issue down to the bare essentials – but I'm fairly clueless about where to go next. I have posted the code here: https://bitbucket.org/johnson_shawn/stackoverflow-21471310 – Basically I'm trying to take a label/value object list and marshal it to <XmlElementName label="Human Readable Label">Value Goes Here</XmlElementName>. In a larger project with a crazy class path, it runs fine from the main. When run through JBoss+RESTEasy I get the following (partial) stack: INFO [stdout] org.jboss.resteasy.plugins.providers.jaxb.JAXBMarshalException: javax.xml.bind.MarshalException 21:02:19,959 INFO [stdout] - with linked exception: 21:02:19,959 INFO [stdout] [com.sun.istack.SAXException2 21:02:19,959 INFO [stdout] java.lang.NullPointerException] 21:02:19,959 INFO [stdout] at org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.writeTo(AbstractJAXBProvider.java:148) 21:02:19,960 INFO [stdout] at org.jboss.resteasy.core.interception.MessageBodyWriterContextImpl.proceed(MessageBodyWriterContextImpl.java:117) 21:02:19,960 More info here: http://stackoverflow.com/questions/21471310/error-when-more-than-one-item-to-list-of-objects-using-jaxbs-xmlanyelement-and Any ideas for debugging further or other brilliant answers will be greatly appreciated! |
|
From: Bill B. <bb...@re...> - 2014-02-03 15:19:39
|
You'll have to point out what resteasy version you are using so I can match the line numbers in you stack trace up. On 2/3/2014 8:48 AM, Johnson, Shawn [USA] wrote: > Hi All, > First post, long-time lurker. I have posted this same question to > StackOverflow and not had any bites yet. I've broken the issue down to > the bare essentials – but I'm fairly clueless about where to go next. I > have posted the code here: > https://bitbucket.org/johnson_shawn/stackoverflow-21471310 – Basically > I'm trying to take a label/value object list and marshal it to > <XmlElementName label="Human Readable Label">Value Goes > Here</XmlElementName>. In a larger project with a crazy class path, it > runs fine from the main. When run through JBoss+RESTEasy I get the > following (partial) stack: > > INFO [stdout] > org.jboss.resteasy.plugins.providers.jaxb.JAXBMarshalException: > javax.xml.bind.MarshalException 21:02:19,959 > INFO [stdout] - with linked exception: 21:02:19,959 > INFO [stdout] [com.sun.istack.SAXException2 21:02:19,959 > INFO [stdout] java.lang.NullPointerException] 21:02:19,959 > INFO [stdout] at > org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.writeTo(AbstractJAXBProvider.java:148) > 21:02:19,960 > INFO [stdout] at > org.jboss.resteasy.core.interception.MessageBodyWriterContextImpl.proceed(MessageBodyWriterContextImpl.java:117) > 21:02:19,960 > > More info here: > http://stackoverflow.com/questions/21471310/error-when-more-than-one-item-to-list-of-objects-using-jaxbs-xmlanyelement-and > > Any ideas for debugging further or other brilliant answers will be > greatly appreciated! > > > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > Read the Whitepaper. > http://pubads.g.doubleclick.net/gampad/clk?id=121051231&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: Johnson, S. [USA] <joh...@ba...> - 2014-02-03 14:22:54
|
Hi All, First post, long-time lurker. I have posted this same question to StackOverflow and not had any bites yet. I've broken the issue down to the bare essentials – but I'm fairly clueless about where to go next. I have posted the code here: https://bitbucket.org/johnson_shawn/stackoverflow-21471310 – Basically I'm trying to take a label/value object list and marshal it to <XmlElementName label="Human Readable Label">Value Goes Here</XmlElementName>. In a larger project with a crazy class path, it runs fine from the main. When run through JBoss+RESTEasy I get the following (partial) stack: INFO [stdout] org.jboss.resteasy.plugins.providers.jaxb.JAXBMarshalException: javax.xml.bind.MarshalException 21:02:19,959 INFO [stdout] - with linked exception: 21:02:19,959 INFO [stdout] [com.sun.istack.SAXException2 21:02:19,959 INFO [stdout] java.lang.NullPointerException] 21:02:19,959 INFO [stdout] at org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.writeTo(AbstractJAXBProvider.java:148) 21:02:19,960 INFO [stdout] at org.jboss.resteasy.core.interception.MessageBodyWriterContextImpl.proceed(MessageBodyWriterContextImpl.java:117) 21:02:19,960 More info here: http://stackoverflow.com/questions/21471310/error-when-more-than-one-item-to-list-of-objects-using-jaxbs-xmlanyelement-and Any ideas for debugging further or other brilliant answers will be greatly appreciated! |
|
From: Bill B. <bb...@re...> - 2014-02-01 12:22:20
|
Tomcat 8 should support ServletContainerInitializer. Please read the 3.5 documentation you linked. It works with Jetty, so I don't know why it wouldn't work with Tomcat. On 2/1/2014 5:33 AM, Kapil Gambhir wrote: > I am using Tomcat 8.x which is a servlet 3.1 container, so the > expectation was that the example application should not require web.xml > (as per the documentation on > http://docs.jboss.org/resteasy/docs/3.0.6.Final/userguide/html_single/#d4e111). > The document seems to suggest that this is required for pre 3.0 servlet > containers. > > My bigger concern is that the app Path(i.e @ApplicationPath("/services") > ) annotation in the ShoppingApplication class (which is extending the > Application class) is ignored. So this path seems to be ignored totally > and the URL for Customer is (/ex03_1/customers) > <http://127.0.0.1:8080/ex03_1/customers> there is no "services" in this > URL. Does that mean that this annotation is not useful. > > Kapil. > <http://127.0.0.1:8080/ex03_1/customers> > > ---------- Forwarded message ---------- > From: *Weinan Li* <l.w...@gm... <mailto:l.w...@gm...>> > Date: Thu, Jan 16, 2014 at 5:31 PM > Subject: Re: [Resteasy-users] Running JAX-RS 2.0 O'Reilly book samples > on Tomcat.. > To: Kapil Gambhir <kap...@gm... <mailto:kap...@gm...>> > Cc: res...@li... > <mailto:res...@li...> > > > > > -- > Weinan Li > > > On Thursday, January 16, 2014 at 7:00 PM, Kapil Gambhir wrote: > > > Hi, > > thanks for a prompt response, am using the JAX-RS v2, so the > "oreilly-jaxrs-2.0-workbook/ex03_1”. > > I am able to run the example with the web.xml (http://web.xml) > changes suggested by you, it made sense also but am wondering how the > default example (shipped as a zip) worked on jetty (which is also a > servlet container only, pretty much like Tomcat). The examples download > has the Maven scripts which execute the test client using the Jetty and > that works fine without the web.xml (http://web.xml) changes. Any idea > on this one? > > my objective is to use a lightweight container to keep things simple > and fast. > > > I haven’t looked into details of Jetty, but the reason could only be > that Jetty supports JAX-RS2.0 spec out of box. > > > > > > On Thu, Jan 16, 2014 at 11:20 AM, Weinan Li <l.w...@gm... > <mailto:l.w...@gm...> (mailto:l.w...@gm... > <mailto:l.w...@gm...>)> wrote: > > > Hi Kapil, > > > > > > Are you using "oreilly-jaxrs-2.0-workbook/ex03_1” or > "oreilly-workbook/ex03_1”? The former one can only be deployed in a > JavaEE application server that supports JAX-RS 2.0 spec like WildFly, > because it doesn’t have standalone settings in web.xml (http://web.xml). > Please add following settings you web.xml (http://web.xml) if you want > to deploy it in tomcat: > > > > > > <servlet> > > > <servlet-name>Resteasy</servlet-name> > > > <servlet-class> > > > org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher > > > </servlet-class> > > > <init-param> > > > <param-name>javax.ws.rs.Application</param-name> > > > <param-value> > > > com.restfully.shop.services.ShoppingApplication > > > </param-value> > > > </init-param> > > > </servlet> > > > > > > <servlet-mapping> > > > <servlet-name>Resteasy</servlet-name> > > > <url-pattern>/*</url-pattern> > > > </servlet-mapping> > > > > > > > > > > > > In addition, if ex03_1.war is deployed into tomcat correctly you > should see the following log in catalina.out: > > > > > > resteasy.spi.ResteasyDeployment. Deploying > javax.ws.rs.core.Application: class > com.restfully.shop.services.ShoppingApplication > > > 16-Jan-2014 13:37:17.219 INFO [localhost-startStop-2] > org.jboss.resteasy.spi.ResteasyDeployment. Adding singleton resource > com.restfully.shop.services.CustomerResource from Application class > com.restfully.shop.services.ShoppingApplication > > > > > > > > > And then you can access it by http://127.0.0.1:8080/ex03_1/customers > > > > > > -- > > > Weinan Li > > > > > > > > > On Thursday, January 16, 2014 at 1:16 AM, Kapil Gambhir wrote: > > > > > > > am trying to run the samples from the O'Reilly book (by Bill > Burke) on Tomcat. Tried both for Tomcat 7 and 8. The ShoppingApplication > deploys fine but when i try to POST a customer resource to > /services/customers it gives me 404. > > > > I built the war from the Maven for Chapter 3 example (ex03_1) and > deployed that war on Tomcat and the deployment (Tomcat startup console) > shows messages of ShoppingApplication being deployed. What am i missing, > dont see any error message or any clue around what could be going wrong. > > > > > > > > Thanks in anticipation, > > > > Kapil. > > > > > ------------------------------------------------------------------------------ > > > > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > > > > Learn Why More Businesses Are Choosing CenturyLink Cloud For > > > > Critical Workloads, Development Environments & Everything In Between. > > > > Get a Quote or Start a Free Trial Today. > > > > > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > > > > > > > > _______________________________________________ > > > > Resteasy-users mailing list > > > > Res...@li... > <mailto:Res...@li...> > (mailto:Res...@li... > <mailto:Res...@li...>) > (mailto:Res...@li... > <mailto:Res...@li...>) > > > > https://lists.sourceforge.net/lists/listinfo/resteasy-users > > > > > > > > > > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&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: Kapil G. <kap...@gm...> - 2014-02-01 10:33:24
|
I am using Tomcat 8.x which is a servlet 3.1 container, so the expectation was that the example application should not require web.xml (as per the documentation on http://docs.jboss.org/resteasy/docs/3.0.6.Final/userguide/html_single/#d4e111). The document seems to suggest that this is required for pre 3.0 servlet containers. My bigger concern is that the app Path(i.e @ApplicationPath("/services") ) annotation in the ShoppingApplication class (which is extending the Application class) is ignored. So this path seems to be ignored totally and the URL for Customer is (/ex03_1/customers)<http://127.0.0.1:8080/ex03_1/customers>there is no "services" in this URL. Does that mean that this annotation is not useful. Kapil. <http://127.0.0.1:8080/ex03_1/customers> ---------- Forwarded message ---------- From: Weinan Li <l.w...@gm...> Date: Thu, Jan 16, 2014 at 5:31 PM Subject: Re: [Resteasy-users] Running JAX-RS 2.0 O'Reilly book samples on Tomcat.. To: Kapil Gambhir <kap...@gm...> Cc: res...@li... -- Weinan Li On Thursday, January 16, 2014 at 7:00 PM, Kapil Gambhir wrote: > Hi, > thanks for a prompt response, am using the JAX-RS v2, so the "oreilly-jaxrs-2.0-workbook/ex03_1". > I am able to run the example with the web.xml (http://web.xml) changes suggested by you, it made sense also but am wondering how the default example (shipped as a zip) worked on jetty (which is also a servlet container only, pretty much like Tomcat). The examples download has the Maven scripts which execute the test client using the Jetty and that works fine without the web.xml (http://web.xml) changes. Any idea on this one? > my objective is to use a lightweight container to keep things simple and fast. I haven't looked into details of Jetty, but the reason could only be that Jetty supports JAX-RS2.0 spec out of box. > > > On Thu, Jan 16, 2014 at 11:20 AM, Weinan Li <l.w...@gm... (mailto: l.w...@gm...)> wrote: > > Hi Kapil, > > > > Are you using "oreilly-jaxrs-2.0-workbook/ex03_1" or "oreilly-workbook/ex03_1"? The former one can only be deployed in a JavaEE application server that supports JAX-RS 2.0 spec like WildFly, because it doesn't have standalone settings in web.xml (http://web.xml). Please add following settings you web.xml (http://web.xml) if you want to deploy it in tomcat: > > > > <servlet> > > <servlet-name>Resteasy</servlet-name> > > <servlet-class> > > org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher > > </servlet-class> > > <init-param> > > <param-name>javax.ws.rs.Application</param-name> > > <param-value> > > com.restfully.shop.services.ShoppingApplication > > </param-value> > > </init-param> > > </servlet> > > > > <servlet-mapping> > > <servlet-name>Resteasy</servlet-name> > > <url-pattern>/*</url-pattern> > > </servlet-mapping> > > > > > > > > In addition, if ex03_1.war is deployed into tomcat correctly you should see the following log in catalina.out: > > > > resteasy.spi.ResteasyDeployment. Deploying javax.ws.rs.core.Application: class com.restfully.shop.services.ShoppingApplication > > 16-Jan-2014 13:37:17.219 INFO [localhost-startStop-2] org.jboss.resteasy.spi.ResteasyDeployment. Adding singleton resource com.restfully.shop.services.CustomerResource from Application class com.restfully.shop.services.ShoppingApplication > > > > > > And then you can access it by http://127.0.0.1:8080/ex03_1/customers > > > > -- > > Weinan Li > > > > > > On Thursday, January 16, 2014 at 1:16 AM, Kapil Gambhir wrote: > > > > > am trying to run the samples from the O'Reilly book (by Bill Burke) on Tomcat. Tried both for Tomcat 7 and 8. The ShoppingApplication deploys fine but when i try to POST a customer resource to /services/customers it gives me 404. > > > I built the war from the Maven for Chapter 3 example (ex03_1) and deployed that war on Tomcat and the deployment (Tomcat startup console) shows messages of ShoppingApplication being deployed. What am i missing, dont see any error message or any clue around what could be going wrong. > > > > > > Thanks in anticipation, > > > Kapil. > > > ------------------------------------------------------------------------------ > > > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > > > Learn Why More Businesses Are Choosing CenturyLink Cloud For > > > Critical Workloads, Development Environments & Everything In Between. > > > Get a Quote or Start a Free Trial Today. > > > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > > > > > > _______________________________________________ > > > Resteasy-users mailing list > > > Res...@li... (mailto: Res...@li...) (mailto: Res...@li...) > > > https://lists.sourceforge.net/lists/listinfo/resteasy-users > > > |
|
From: Bill B. <bb...@re...> - 2014-01-29 20:48:16
|
JAX_RS does not "merge" annotations between interfaces and classes.
Either the jaxrs annotations are on the interface, or they are on the class.
On 1/29/2014 3:19 PM, Kristoffer Sjögren wrote:
> Hi
>
> Im trying to create a jaxrs client proxy from an interface that looks
> roughly like this.
>
> public interface SimpleService {
> @GET
> @Path("basic")
> @Produces("text/plain")
> String getBasic();
> }
>
> There is a service side implementation which is registered using the
> Application.getSingletons().
>
> @Path("/simple")
> public class SimpleJaxrs implements SimpleService {
> String getBasic() { ... }
> }
>
> The problem is that @Path method annotations on the interface is not
> inherited to the implementation so method endpoints are never registered.
>
> 1) I don't want to put a @Path annotation on the interface because that
> is the address to find an implementation. Its an interface so I want to
> have any number of implementations, right?
>
> 2) I do want to have @Path annotations on interface methods because its
> part of the interface contract. Having @Path annotations on the
> implementation is redundant because it already implements the interface.
>
> Does this make sense? Is it possible to do?
>
> Cheers,
> -Kristoffer
>
>
>
> ------------------------------------------------------------------------------
> WatchGuard Dimension instantly turns raw network data into actionable
> security intelligence. It gives you real-time visual feedback on key
> security issues and trends. Skip the complicated setup - simply import
> a virtual appliance and go from zero to informed in seconds.
> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&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: Kristoffer S. <st...@gm...> - 2014-01-29 20:19:34
|
Hi
Im trying to create a jaxrs client proxy from an interface that looks
roughly like this.
public interface SimpleService {
@GET
@Path("basic")
@Produces("text/plain")
String getBasic();
}
There is a service side implementation which is registered using the
Application.getSingletons().
@Path("/simple")
public class SimpleJaxrs implements SimpleService {
String getBasic() { ... }
}
The problem is that @Path method annotations on the interface is not
inherited to the implementation so method endpoints are never registered.
1) I don't want to put a @Path annotation on the interface because that is
the address to find an implementation. Its an interface so I want to have
any number of implementations, right?
2) I do want to have @Path annotations on interface methods because its
part of the interface contract. Having @Path annotations on the
implementation is redundant because it already implements the interface.
Does this make sense? Is it possible to do?
Cheers,
-Kristoffer
|
|
From: Gunnar M. <gu...@hi...> - 2014-01-29 19:25:50
|
Perfect, works like a charm! Thanks again for your help, --Gunnar 2014/1/29 Bill Burke <bb...@re...> > Yeah, docs fell through the cracks on that: > > org.jboss.resteasy.util.BasicAuthHelper > > org.jboss.resteasy.client.jaxrs.BasicAuthentication > > You can use the filter if the same user is invoking in separate threads. > Otherwise you'll have to generate the header per request. > > > On 1/29/2014 1:17 PM, Gunnar Morling wrote: > >> Basic Auth; Do you have a pointer to these filters/utilities? That >> sounds like what I need. Is there an example or test somewhere (couldn't >> find that in the ref guide)? >> >> Thanks, >> >> --Gunnar >> >> >> >> >> >> 2014/1/29 Bill Burke <bb...@re... <mailto:bb...@re...>> >> >> >> pre-emptive for what protocol? Digest? For basic auth, resteasy >> has a filter or utility methods you can use instead. >> >> >> On 1/29/2014 12:36 PM, Gunnar Morling wrote: >> >> I'm invoking an authenticated endpoint and am using HttpContext >> to pass >> in an AuthCache instance which is needed to enable pre-emptive >> authentication. >> >> Is there any alternative way for setting credentials and have them >> pre-emptively sent which doesn't require to touch HttpClient >> specifics? >> >> --Gunnar >> >> >> >> 2014/1/29 Bill Burke <bb...@re... >> <mailto:bb...@re...> <mailto:bb...@re... >> >> <mailto:bb...@re...>>> >> >> >> What is the HttpContext used for anyways? Never used it. >> For >> multithreaded access, I've wrote and used the extension >> methods to >> ResteasyClientBuilder to configure connection pools and such. >> >> I honestly am trying to hide Apache HTTP Client with >> Resteasy (and in >> the future JAX-RS) apis. >> >> On 1/29/2014 12:14 PM, Gunnar Morling wrote: >> > Hi, >> > >> > I'm working with a RestEasy client (proxy) which should >> be accessible >> > from several threads in parallel. >> > >> > From the reference guide [1] I learned that I need to >> configure a >> > custom ApacheHttpClient4Engine instance so it uses a >> thread-safe HTTP >> > client connection manager. This works as expected but >> there is a >> > constructor of ApacheHttpClient4Engine which takes a >> HttpContext and >> > made me curious. >> > >> > HttpContext is not intended for multi-threaded access (see >> comments on >> > BasicHttpContext and SyncBasicHttpContext), but >> ApacheHttpClient4Engine >> > does not perform any sort of synchronization. Is there >> any way of >> > passing a new context instance per request issued by the >> engine? >> > >> > Thanks, >> > >> > --Gunnar >> > >> > [1] >> > >> http://docs.jboss.org/__resteasy/docs/3.0.6.Final/__ >> userguide/html_single/#__transport_layer >> <http://docs.jboss.org/resteasy/docs/3.0.6.Final/ >> userguide/html_single/#transport_layer> >> > >> > >> > >> > >> >> ------------------------------__---------------------------- >> --__------------------ >> >> > WatchGuard Dimension instantly turns raw network data >> into actionable >> > security intelligence. It gives you real-time visual >> feedback on key >> > security issues and trends. Skip the complicated setup >> - simply >> import >> > a virtual appliance and go from zero to informed in >> seconds. >> > >> http://pubads.g.doubleclick.__net/gampad/clk?id=123612991&__ >> iu=/4140/ostg.clktrk >> <http://pubads.g.doubleclick.net/gampad/clk?id=123612991& >> iu=/4140/ostg.clktrk> >> > >> > >> > >> > _________________________________________________ >> > Resteasy-users mailing list >> > Resteasy-users@lists.__sourceforge.net >> <mailto:Res...@li...> >> <mailto:Resteasy-users@lists.__sourceforge.net >> <mailto:Res...@li...>> >> >> > >> https://lists.sourceforge.net/__lists/listinfo/resteasy-users >> >> <https://lists.sourceforge.net/lists/listinfo/resteasy-users> >> > >> >> -- >> Bill Burke >> JBoss, a division of Red Hat >> http://bill.burkecentral.com >> >> >> ------------------------------__---------------------------- >> --__------------------ >> >> WatchGuard Dimension instantly turns raw network data into >> actionable >> security intelligence. It gives you real-time visual >> feedback on key >> security issues and trends. Skip the complicated setup - >> simply import >> a virtual appliance and go from zero to informed in seconds. >> http://pubads.g.doubleclick.__net/gampad/clk?id=123612991&__ >> iu=/4140/ostg.clktrk >> <http://pubads.g.doubleclick.net/gampad/clk?id=123612991& >> iu=/4140/ostg.clktrk> >> _________________________________________________ >> Resteasy-users mailing list >> Resteasy-users@lists.__sourceforge.net >> <mailto:Res...@li...> >> <mailto:Resteasy-users@lists.__sourceforge.net >> <mailto:Res...@li...>> >> https://lists.sourceforge.net/__lists/listinfo/resteasy-users >> >> <https://lists.sourceforge.net/lists/listinfo/resteasy-users> >> >> >> >> -- >> Bill Burke >> JBoss, a division of Red Hat >> http://bill.burkecentral.com >> >> >> > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > |
|
From: Bill B. <bb...@re...> - 2014-01-29 18:39:11
|
Yeah, docs fell through the cracks on that: org.jboss.resteasy.util.BasicAuthHelper org.jboss.resteasy.client.jaxrs.BasicAuthentication You can use the filter if the same user is invoking in separate threads. Otherwise you'll have to generate the header per request. On 1/29/2014 1:17 PM, Gunnar Morling wrote: > Basic Auth; Do you have a pointer to these filters/utilities? That > sounds like what I need. Is there an example or test somewhere (couldn't > find that in the ref guide)? > > Thanks, > > --Gunnar > > > > > > 2014/1/29 Bill Burke <bb...@re... <mailto:bb...@re...>> > > pre-emptive for what protocol? Digest? For basic auth, resteasy > has a filter or utility methods you can use instead. > > > On 1/29/2014 12:36 PM, Gunnar Morling wrote: > > I'm invoking an authenticated endpoint and am using HttpContext > to pass > in an AuthCache instance which is needed to enable pre-emptive > authentication. > > Is there any alternative way for setting credentials and have them > pre-emptively sent which doesn't require to touch HttpClient > specifics? > > --Gunnar > > > > 2014/1/29 Bill Burke <bb...@re... > <mailto:bb...@re...> <mailto:bb...@re... > <mailto:bb...@re...>>> > > > What is the HttpContext used for anyways? Never used it. For > multithreaded access, I've wrote and used the extension > methods to > ResteasyClientBuilder to configure connection pools and such. > > I honestly am trying to hide Apache HTTP Client with > Resteasy (and in > the future JAX-RS) apis. > > On 1/29/2014 12:14 PM, Gunnar Morling wrote: > > Hi, > > > > I'm working with a RestEasy client (proxy) which should > be accessible > > from several threads in parallel. > > > > From the reference guide [1] I learned that I need to > configure a > > custom ApacheHttpClient4Engine instance so it uses a > thread-safe HTTP > > client connection manager. This works as expected but > there is a > > constructor of ApacheHttpClient4Engine which takes a > HttpContext and > > made me curious. > > > > HttpContext is not intended for multi-threaded access (see > comments on > > BasicHttpContext and SyncBasicHttpContext), but > ApacheHttpClient4Engine > > does not perform any sort of synchronization. Is there > any way of > > passing a new context instance per request issued by the > engine? > > > > Thanks, > > > > --Gunnar > > > > [1] > > > http://docs.jboss.org/__resteasy/docs/3.0.6.Final/__userguide/html_single/#__transport_layer > <http://docs.jboss.org/resteasy/docs/3.0.6.Final/userguide/html_single/#transport_layer> > > > > > > > > > > ------------------------------__------------------------------__------------------ > > WatchGuard Dimension instantly turns raw network data > into actionable > > security intelligence. It gives you real-time visual > feedback on key > > security issues and trends. Skip the complicated setup > - simply > import > > a virtual appliance and go from zero to informed in seconds. > > > http://pubads.g.doubleclick.__net/gampad/clk?id=123612991&__iu=/4140/ostg.clktrk > <http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk> > > > > > > > > _________________________________________________ > > Resteasy-users mailing list > > Resteasy-users@lists.__sourceforge.net > <mailto:Res...@li...> > <mailto:Resteasy-users@lists.__sourceforge.net > <mailto:Res...@li...>> > > > > https://lists.sourceforge.net/__lists/listinfo/resteasy-users > <https://lists.sourceforge.net/lists/listinfo/resteasy-users> > > > > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > > > ------------------------------__------------------------------__------------------ > WatchGuard Dimension instantly turns raw network data into > actionable > security intelligence. It gives you real-time visual > feedback on key > security issues and trends. Skip the complicated setup - > simply import > a virtual appliance and go from zero to informed in seconds. > http://pubads.g.doubleclick.__net/gampad/clk?id=123612991&__iu=/4140/ostg.clktrk > <http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk> > _________________________________________________ > Resteasy-users mailing list > Resteasy-users@lists.__sourceforge.net > <mailto:Res...@li...> > <mailto:Resteasy-users@lists.__sourceforge.net > <mailto:Res...@li...>> > https://lists.sourceforge.net/__lists/listinfo/resteasy-users > <https://lists.sourceforge.net/lists/listinfo/resteasy-users> > > > > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Gunnar M. <gu...@hi...> - 2014-01-29 18:17:27
|
Basic Auth; Do you have a pointer to these filters/utilities? That sounds like what I need. Is there an example or test somewhere (couldn't find that in the ref guide)? Thanks, --Gunnar 2014/1/29 Bill Burke <bb...@re...> > pre-emptive for what protocol? Digest? For basic auth, resteasy has a > filter or utility methods you can use instead. > > > On 1/29/2014 12:36 PM, Gunnar Morling wrote: > >> I'm invoking an authenticated endpoint and am using HttpContext to pass >> in an AuthCache instance which is needed to enable pre-emptive >> authentication. >> >> Is there any alternative way for setting credentials and have them >> pre-emptively sent which doesn't require to touch HttpClient specifics? >> >> --Gunnar >> >> >> >> 2014/1/29 Bill Burke <bb...@re... <mailto:bb...@re...>> >> >> >> What is the HttpContext used for anyways? Never used it. For >> multithreaded access, I've wrote and used the extension methods to >> ResteasyClientBuilder to configure connection pools and such. >> >> I honestly am trying to hide Apache HTTP Client with Resteasy (and in >> the future JAX-RS) apis. >> >> On 1/29/2014 12:14 PM, Gunnar Morling wrote: >> > Hi, >> > >> > I'm working with a RestEasy client (proxy) which should be >> accessible >> > from several threads in parallel. >> > >> > From the reference guide [1] I learned that I need to configure a >> > custom ApacheHttpClient4Engine instance so it uses a thread-safe >> HTTP >> > client connection manager. This works as expected but there is a >> > constructor of ApacheHttpClient4Engine which takes a HttpContext >> and >> > made me curious. >> > >> > HttpContext is not intended for multi-threaded access (see >> comments on >> > BasicHttpContext and SyncBasicHttpContext), but >> ApacheHttpClient4Engine >> > does not perform any sort of synchronization. Is there any way of >> > passing a new context instance per request issued by the engine? >> > >> > Thanks, >> > >> > --Gunnar >> > >> > [1] >> > >> http://docs.jboss.org/resteasy/docs/3.0.6.Final/ >> userguide/html_single/#transport_layer >> > >> > >> > >> > >> ------------------------------------------------------------ >> ------------------ >> > WatchGuard Dimension instantly turns raw network data into >> actionable >> > security intelligence. It gives you real-time visual feedback on >> key >> > security issues and trends. Skip the complicated setup - simply >> import >> > a virtual appliance and go from zero to informed in seconds. >> > >> http://pubads.g.doubleclick.net/gampad/clk?id=123612991& >> iu=/4140/ostg.clktrk >> > >> > >> > >> > _______________________________________________ >> > Resteasy-users mailing list >> > Res...@li... >> <mailto:Res...@li...> >> >> > https://lists.sourceforge.net/lists/listinfo/resteasy-users >> > >> >> -- >> Bill Burke >> JBoss, a division of Red Hat >> http://bill.burkecentral.com >> >> ------------------------------------------------------------ >> ------------------ >> WatchGuard Dimension instantly turns raw network data into actionable >> security intelligence. It gives you real-time visual feedback on key >> security issues and trends. Skip the complicated setup - simply >> import >> a virtual appliance and go from zero to informed in seconds. >> http://pubads.g.doubleclick.net/gampad/clk?id=123612991& >> iu=/4140/ostg.clktrk >> _______________________________________________ >> Resteasy-users mailing list >> Res...@li... >> <mailto:Res...@li...> >> https://lists.sourceforge.net/lists/listinfo/resteasy-users >> >> >> > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > |
|
From: Bill B. <bb...@re...> - 2014-01-29 18:10:37
|
pre-emptive for what protocol? Digest? For basic auth, resteasy has a filter or utility methods you can use instead. On 1/29/2014 12:36 PM, Gunnar Morling wrote: > I'm invoking an authenticated endpoint and am using HttpContext to pass > in an AuthCache instance which is needed to enable pre-emptive > authentication. > > Is there any alternative way for setting credentials and have them > pre-emptively sent which doesn't require to touch HttpClient specifics? > > --Gunnar > > > > 2014/1/29 Bill Burke <bb...@re... <mailto:bb...@re...>> > > What is the HttpContext used for anyways? Never used it. For > multithreaded access, I've wrote and used the extension methods to > ResteasyClientBuilder to configure connection pools and such. > > I honestly am trying to hide Apache HTTP Client with Resteasy (and in > the future JAX-RS) apis. > > On 1/29/2014 12:14 PM, Gunnar Morling wrote: > > Hi, > > > > I'm working with a RestEasy client (proxy) which should be accessible > > from several threads in parallel. > > > > From the reference guide [1] I learned that I need to configure a > > custom ApacheHttpClient4Engine instance so it uses a thread-safe HTTP > > client connection manager. This works as expected but there is a > > constructor of ApacheHttpClient4Engine which takes a HttpContext and > > made me curious. > > > > HttpContext is not intended for multi-threaded access (see > comments on > > BasicHttpContext and SyncBasicHttpContext), but > ApacheHttpClient4Engine > > does not perform any sort of synchronization. Is there any way of > > passing a new context instance per request issued by the engine? > > > > Thanks, > > > > --Gunnar > > > > [1] > > > http://docs.jboss.org/resteasy/docs/3.0.6.Final/userguide/html_single/#transport_layer > > > > > > > > > ------------------------------------------------------------------------------ > > WatchGuard Dimension instantly turns raw network data into actionable > > security intelligence. It gives you real-time visual feedback on key > > security issues and trends. Skip the complicated setup - simply > import > > a virtual appliance and go from zero to informed in seconds. > > > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > > > > > > > > _______________________________________________ > > Resteasy-users mailing list > > Res...@li... > <mailto:Res...@li...> > > https://lists.sourceforge.net/lists/listinfo/resteasy-users > > > > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > Resteasy-users mailing list > Res...@li... > <mailto:Res...@li...> > https://lists.sourceforge.net/lists/listinfo/resteasy-users > > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Gunnar M. <gu...@hi...> - 2014-01-29 17:36:26
|
I'm invoking an authenticated endpoint and am using HttpContext to pass in an AuthCache instance which is needed to enable pre-emptive authentication. Is there any alternative way for setting credentials and have them pre-emptively sent which doesn't require to touch HttpClient specifics? --Gunnar 2014/1/29 Bill Burke <bb...@re...> > What is the HttpContext used for anyways? Never used it. For > multithreaded access, I've wrote and used the extension methods to > ResteasyClientBuilder to configure connection pools and such. > > I honestly am trying to hide Apache HTTP Client with Resteasy (and in > the future JAX-RS) apis. > > On 1/29/2014 12:14 PM, Gunnar Morling wrote: > > Hi, > > > > I'm working with a RestEasy client (proxy) which should be accessible > > from several threads in parallel. > > > > From the reference guide [1] I learned that I need to configure a > > custom ApacheHttpClient4Engine instance so it uses a thread-safe HTTP > > client connection manager. This works as expected but there is a > > constructor of ApacheHttpClient4Engine which takes a HttpContext and > > made me curious. > > > > HttpContext is not intended for multi-threaded access (see comments on > > BasicHttpContext and SyncBasicHttpContext), but ApacheHttpClient4Engine > > does not perform any sort of synchronization. Is there any way of > > passing a new context instance per request issued by the engine? > > > > Thanks, > > > > --Gunnar > > > > [1] > > > http://docs.jboss.org/resteasy/docs/3.0.6.Final/userguide/html_single/#transport_layer > > > > > > > > > ------------------------------------------------------------------------------ > > WatchGuard Dimension instantly turns raw network data into actionable > > security intelligence. It gives you real-time visual feedback on key > > security issues and trends. Skip the complicated setup - simply import > > a virtual appliance and go from zero to informed in seconds. > > > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&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 > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users > |
|
From: Bill B. <bb...@re...> - 2014-01-29 17:23:26
|
What is the HttpContext used for anyways? Never used it. For multithreaded access, I've wrote and used the extension methods to ResteasyClientBuilder to configure connection pools and such. I honestly am trying to hide Apache HTTP Client with Resteasy (and in the future JAX-RS) apis. On 1/29/2014 12:14 PM, Gunnar Morling wrote: > Hi, > > I'm working with a RestEasy client (proxy) which should be accessible > from several threads in parallel. > > From the reference guide [1] I learned that I need to configure a > custom ApacheHttpClient4Engine instance so it uses a thread-safe HTTP > client connection manager. This works as expected but there is a > constructor of ApacheHttpClient4Engine which takes a HttpContext and > made me curious. > > HttpContext is not intended for multi-threaded access (see comments on > BasicHttpContext and SyncBasicHttpContext), but ApacheHttpClient4Engine > does not perform any sort of synchronization. Is there any way of > passing a new context instance per request issued by the engine? > > Thanks, > > --Gunnar > > [1] > http://docs.jboss.org/resteasy/docs/3.0.6.Final/userguide/html_single/#transport_layer > > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&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: Gunnar M. <gu...@hi...> - 2014-01-29 17:14:52
|
Hi, I'm working with a RestEasy client (proxy) which should be accessible from several threads in parallel. >From the reference guide [1] I learned that I need to configure a custom ApacheHttpClient4Engine instance so it uses a thread-safe HTTP client connection manager. This works as expected but there is a constructor of ApacheHttpClient4Engine which takes a HttpContext and made me curious. HttpContext is not intended for multi-threaded access (see comments on BasicHttpContext and SyncBasicHttpContext), but ApacheHttpClient4Engine does not perform any sort of synchronization. Is there any way of passing a new context instance per request issued by the engine? Thanks, --Gunnar [1] http://docs.jboss.org/resteasy/docs/3.0.6.Final/userguide/html_single/#transport_layer |
|
From: Bill B. <bb...@re...> - 2014-01-27 13:29:58
|
Right now, once the HTTP session is authenticated, the token is not used to check timeouts. It relies on the application's HTTP Session settings to handle timeout. Not sure if that is the right approach or not. BTW, check out keycloak.org. We've taken this stuff to the next level. On 1/26/2014 3:24 PM, james truty wrote: > Hi Weinan, > > The AWS load balancer sends an X-Forwarded-Proto header to the Jboss > server in the backed, which Jboss is able to use if I add this valve and > option to my jboss-web.xml: > <valve> > <class-name>org.apache.catalina.valves.RemoteIpValve</class-name> > <param> > <param-name>protocolHeader</param-name> > <param-value>x-forwarded-proto</param-value> > </param> > </valve> > This allows Jboss to handle the original https request, and Resteasy to > proceed with proper authorization. Thanks for the help! The only issue I > see now is that the Bearer token that I get back by using client > credentials and BASIC auth does not expire when I set it to - even if I > set it to 1 minute in the RestEasy settings. It is still allowed after > it should have timed out. Is there another way that I should be setting > or enforcing the token timeout? > > Thanks, > James > > > On Sat, Jan 25, 2014 at 6:07 AM, Weinan Li <l.w...@gm... > <mailto:l.w...@gm...>> wrote: > > Hi James, > > Sorry I’m not familiar with AWS load balancer. I know that mod_jk > supports to pass client SSL information to backend JBoss server and > the application in JBoss server could use the information to do > their work. And mod_jk is using standard AJPv13 protocol to forward > the client SSL information to backend JBoss servers. If AWS load > balancer supports AJPv13 protocol, it should also be able to pass > the SSL information to JBoss. > > -- > Weinan Li > > > On Saturday, January 25, 2014 at 6:55 AM, james truty wrote: > > > I am trying to use RestEasy in Jboss as a central auth server to > authenticate REST calls behind an AWS load balancer. Ideally, this > load balancer would communicate to the Jboss server over HTTP (not > https) as the SSL part is handled at the load balancer level before > hitting the auth server in the backend. In this case, the Jboss > server has no knowledge of the SSL Cert or the HTTPS request. Is it > possible to use RestEasy for auth in this scenario? Without the SSL > connector configured through JBoss, I don't have access to the > necessary OAUTH urls. > > > > Thanks, > > James > > > ------------------------------------------------------------------------------ > > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > > Learn Why More Businesses Are Choosing CenturyLink Cloud For > > Critical Workloads, Development Environments & Everything In Between. > > Get a Quote or Start a Free Trial Today. > > > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > > > > _______________________________________________ > > Resteasy-users mailing list > > Res...@li... > <mailto:Res...@li...> > (mailto:Res...@li... > <mailto:Res...@li...>) > > https://lists.sourceforge.net/lists/listinfo/resteasy-users > > > > > > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&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: Weinan Li <l.w...@gm...> - 2014-01-27 06:56:39
|
Hi James, Glad the header problem is solved :-) For Beaer token, sorry I’m not familiar about it, but if it uses cookies to store authentication information, you can try to check your browser to see if the ‘Expires’ field of the cookie is set correctly or not. For example, if you are using Firefox, you can follow this instruction[1] to check the cookies. If the expiration is controlled in server side, then you can try to find the data that controls the expiration behaviour to see whether it set correctly or not. Hope the information useful to you :-) [1] http://support.mozilla.org/en-US/questions/689713 -- Weinan Li On Monday, January 27, 2014 at 4:24 AM, james truty wrote: > Hi Weinan, > > The AWS load balancer sends an X-Forwarded-Proto header to the Jboss server in the backed, which Jboss is able to use if I add this valve and option to my jboss-web.xml (http://web.xml): > <valve> > <class-name>org.apache.catalina.valves.RemoteIpValve</class-name> > <param> > <param-name>protocolHeader</param-name> > <param-value>x-forwarded-proto</param-value> > </param> > </valve> > > This allows Jboss to handle the original https request, and Resteasy to proceed with proper authorization. Thanks for the help! The only issue I see now is that the Bearer token that I get back by using client credentials and BASIC auth does not expire when I set it to - even if I set it to 1 minute in the RestEasy settings. It is still allowed after it should have timed out. Is there another way that I should be setting or enforcing the token timeout? > > Thanks, > James > > > On Sat, Jan 25, 2014 at 6:07 AM, Weinan Li <l.w...@gm... (mailto:l.w...@gm...)> wrote: > > Hi James, > > > > Sorry I’m not familiar with AWS load balancer. I know that mod_jk supports to pass client SSL information to backend JBoss server and the application in JBoss server could use the information to do their work. And mod_jk is using standard AJPv13 protocol to forward the client SSL information to backend JBoss servers. If AWS load balancer supports AJPv13 protocol, it should also be able to pass the SSL information to JBoss. > > > > -- > > Weinan Li > > > > > > On Saturday, January 25, 2014 at 6:55 AM, james truty wrote: > > > > > I am trying to use RestEasy in Jboss as a central auth server to authenticate REST calls behind an AWS load balancer. Ideally, this load balancer would communicate to the Jboss server over HTTP (not https) as the SSL part is handled at the load balancer level before hitting the auth server in the backend. In this case, the Jboss server has no knowledge of the SSL Cert or the HTTPS request. Is it possible to use RestEasy for auth in this scenario? Without the SSL connector configured through JBoss, I don't have access to the necessary OAUTH urls. > > > > > > Thanks, > > > James > > > ------------------------------------------------------------------------------ > > > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > > > Learn Why More Businesses Are Choosing CenturyLink Cloud For > > > Critical Workloads, Development Environments & Everything In Between. > > > Get a Quote or Start a Free Trial Today. > > > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > > > > > > _______________________________________________ > > > Resteasy-users mailing list > > > Res...@li... (mailto:Res...@li...) (mailto:Res...@li...) > > > https://lists.sourceforge.net/lists/listinfo/resteasy-users > > > |
|
From: J C. <jc...@su...> - 2014-01-27 02:44:50
|
Can this be done? Similar to how WebDAV has PROPFIND, MOVE and COPY in addition to the standard GET, POST, DELETE and such. If so, a pointer to an example would be much appreciated. |
|
From: james t. <jt...@gm...> - 2014-01-26 20:24:41
|
Hi Weinan,
The AWS load balancer sends an X-Forwarded-Proto header to the Jboss server
in the backed, which Jboss is able to use if I add this valve and option to
my jboss-web.xml:
<valve>
<class-name>org.apache.catalina.valves.RemoteIpValve</class-name>
<param>
<param-name>protocolHeader</param-name>
<param-value>x-forwarded-proto</param-value>
</param>
</valve>
This allows Jboss to handle the original https request, and Resteasy to
proceed with proper authorization. Thanks for the help! The only issue I
see now is that the Bearer token that I get back by using client
credentials and BASIC auth does not expire when I set it to - even if I set
it to 1 minute in the RestEasy settings. It is still allowed after it
should have timed out. Is there another way that I should be setting or
enforcing the token timeout?
Thanks,
James
On Sat, Jan 25, 2014 at 6:07 AM, Weinan Li <l.w...@gm...> wrote:
> Hi James,
>
> Sorry I’m not familiar with AWS load balancer. I know that mod_jk supports
> to pass client SSL information to backend JBoss server and the application
> in JBoss server could use the information to do their work. And mod_jk is
> using standard AJPv13 protocol to forward the client SSL information to
> backend JBoss servers. If AWS load balancer supports AJPv13 protocol, it
> should also be able to pass the SSL information to JBoss.
>
> --
> Weinan Li
>
>
> On Saturday, January 25, 2014 at 6:55 AM, james truty wrote:
>
> > I am trying to use RestEasy in Jboss as a central auth server to
> authenticate REST calls behind an AWS load balancer. Ideally, this load
> balancer would communicate to the Jboss server over HTTP (not https) as the
> SSL part is handled at the load balancer level before hitting the auth
> server in the backend. In this case, the Jboss server has no knowledge of
> the SSL Cert or the HTTPS request. Is it possible to use RestEasy for auth
> in this scenario? Without the SSL connector configured through JBoss, I
> don't have access to the necessary OAUTH urls.
> >
> > Thanks,
> > James
> >
> ------------------------------------------------------------------------------
> > CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> > Learn Why More Businesses Are Choosing CenturyLink Cloud For
> > Critical Workloads, Development Environments & Everything In Between.
> > Get a Quote or Start a Free Trial Today.
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> >
> > _______________________________________________
> > Resteasy-users mailing list
> > Res...@li... (mailto:
> Res...@li...)
> > https://lists.sourceforge.net/lists/listinfo/resteasy-users
>
>
>
>
|
|
From: Weinan Li <l.w...@gm...> - 2014-01-25 12:08:07
|
Hi James, Sorry I’m not familiar with AWS load balancer. I know that mod_jk supports to pass client SSL information to backend JBoss server and the application in JBoss server could use the information to do their work. And mod_jk is using standard AJPv13 protocol to forward the client SSL information to backend JBoss servers. If AWS load balancer supports AJPv13 protocol, it should also be able to pass the SSL information to JBoss. -- Weinan Li On Saturday, January 25, 2014 at 6:55 AM, james truty wrote: > I am trying to use RestEasy in Jboss as a central auth server to authenticate REST calls behind an AWS load balancer. Ideally, this load balancer would communicate to the Jboss server over HTTP (not https) as the SSL part is handled at the load balancer level before hitting the auth server in the backend. In this case, the Jboss server has no knowledge of the SSL Cert or the HTTPS request. Is it possible to use RestEasy for auth in this scenario? Without the SSL connector configured through JBoss, I don't have access to the necessary OAUTH urls. > > Thanks, > James > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > > _______________________________________________ > Resteasy-users mailing list > Res...@li... (mailto:Res...@li...) > https://lists.sourceforge.net/lists/listinfo/resteasy-users |
|
From: james t. <jt...@gm...> - 2014-01-24 22:55:21
|
I am trying to use RestEasy in Jboss as a central auth server to authenticate REST calls behind an AWS load balancer. Ideally, this load balancer would communicate to the Jboss server over HTTP (not https) as the SSL part is handled at the load balancer level before hitting the auth server in the backend. In this case, the Jboss server has no knowledge of the SSL Cert or the HTTPS request. Is it possible to use RestEasy for auth in this scenario? Without the SSL connector configured through JBoss, I don't have access to the necessary OAUTH urls. Thanks, James |