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: Bill B. <bb...@re...> - 2014-05-23 14:58:10
|
I know nothing about OSGi. My guess is that Resteasy automatic provider lookup is not working. The way it works is that it does a Classloader.getResources("META-INF/javax.ws.rs.ext.Providers") and iterates througha nd loads all those files. Those files contain Java class names which represent the providers. On 5/23/2014 9:26 AM, Rohrberg, Timo wrote: > Hello everybody, > > I am currently trying to use the RESTEasy client framework within an > OSGi environment (Eclipse Equinox). To provide the required > dependencies, I created a separate Eclipse Plug-In containing the > required JAR libraries and exporting the contained packages to > downstream bundles. Then, I am using the RESTEasy client framework as > follows within my main bundle which includes the before mentioned bundle > as required bundle: > > ResteasyClient client = *new*ResteasyClientBuilder().build(); > > ResteasyWebTarget target = client > > .target( > _"http://192.168.100.181:5952/RXT_RESTWebService-2.1/jobtemplates/Vitaphone > 300 BT/386340"_); > > RxtDevice device = target.request().get( RxtDevice.*class*); > > System./out/.println( device.getId() ); > > Unfortunately, I always get the following error: > > _javax.ws.rs.client.ResponseProcessingException_: > _javax.ws.rs.ProcessingException_: Unable to find a MessageBodyReader of > content-type application/xml and type class > com.vitasystems.remosxt.rest.client.model.RxtDevice > > at > org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(_ClientInvocation.java:140_) > > at > org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(_ClientInvocation.java:444_) > > at > org.jboss.resteasy.client.jaxrs.internal.ClientInvocationBuilder.get(_ClientInvocationBuilder.java:165_) > > at > de.vitasystems.example.resteasy.client.Activator.start(_Activator.java:25_) > > at > org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(_BundleContextImpl.java:711_) > > at java.security.AccessController.doPrivileged(_Native Method_) > > at > org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(_BundleContextImpl.java:702_) > > at > org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(_BundleContextImpl.java:683_) > > at > org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(_BundleHost.java:381_) > > at > org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(_AbstractBundle.java:390_) > > at > org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(_Framework.java:1176_) > > at > org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(_StartLevelManager.java:559_) > > at > org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(_StartLevelManager.java:544_) > > at > org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(_StartLevelManager.java:457_) > > at > org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(_StartLevelManager.java:243_) > > at > org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(_StartLevelManager.java:438_) > > at > org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(_StartLevelManager.java:1_) > > at > org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(_EventManager.java:230_) > > at > org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(_EventManager.java:340_) > > Caused by: _javax.ws.rs.ProcessingException_: Unable to find a > MessageBodyReader of content-type application/xml and type class > com.vitasystems.remosxt.rest.client.model.RxtDevice > > at > org.jboss.resteasy.core.interception.ClientReaderInterceptorContext.throwReaderNotFound(_ClientReaderInterceptorContext.java:39_) > > at > org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.getReader(_AbstractReaderInterceptorContext.java:73_) > > at > org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(_AbstractReaderInterceptorContext.java:50_) > > at > org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(_GZIPDecodingInterceptor.java:59_) > > at > org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(_AbstractReaderInterceptorContext.java:53_) > > at > org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(_ClientResponse.java:245_) > > at > org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readEntity(_ClientResponse.java:179_) > > at > org.jboss.resteasy.specimpl.BuiltResponse.readEntity(_BuiltResponse.java:211_) > > at > org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(_ClientInvocation.java:104_) > > ... 18 more > > By debugging the included libraries, I tracked the problem down to the > following location: > > ResteasyProviderFactory.java > > *protected*<T> MessageBodyReader<T> resolveMessageBodyReader(Class<T> > type, Type genericType, Annotation[] annotations, MediaType mediaType, > MediaTypeMap<SortedKey<MessageBodyReader>> availableReaders) > > { > > List<SortedKey<MessageBodyReader>> readers = > availableReaders.getPossible(mediaType, type); > > //logger.info("******** getMessageBodyReader *******"); > > *for*(SortedKey<MessageBodyReader> reader : readers) > > { > > //logger.info(" matching reader: " + reader.getClass().getName()); > > *if*(reader.obj.isReadable(type, genericType, annotations, mediaType)) > > { > > *return*(MessageBodyReader<T>) reader.obj; > > } > > } > > *return**null*; > > } > > The problem is a little weired: The readers list of MessageBodyReader > instances contains the > org.jboss.resteasy.plugins.providers.jaxb.JAXBXmlRootElementProvider, > but the reader.obj.isReadable() method returns false for that reader. > > In another setup as a plain Maven project outside of the OSGi world, the > the referred method reader.obj.isReadable() returns true and the same > piece of code works. > > I am at the end of my knowledge… Do you guys have any hints? > > Best regards, > > Timo Rohrberg > > > ------------------------------------------------------------------------ > Hinweis: Diese Email enthält evtl. vertrauliche und rechtlich geschützte > Informationen. Sollten Sie nicht der richtige Adressat sein oder diese > Email irrtümlich erhalten haben, informieren Sie bitte sofort den Absender, > und löschen Sie anschließend diese E-Mail. Das unerlaubte Kopieren sowie > die unbefugte Weitergabe des Inhalts dieser Email sind nicht gestattet. > > Attention: This e-mail may contain confidential and/or privileged > information. If you are not the intended recipient or if you have received > this e-mail in error, please notify the sender immediately and delete this > e-mail. Any unauthorized copying, disclosure or distribution of the > contents of this e-mail is strictly prohibited. > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > > > > _______________________________________________ > 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: Bill B. <bb...@re...> - 2014-05-23 14:50:02
|
I didn't actually solve this for the resteasy oauth implementation. We solved it in Keycloak, but I haven't been able to get back to resteasy to fix the problem there. On 5/22/2014 11:25 AM, JOSÉ INÁCIO DA SILVA JÚNIOR wrote: > Hi! > > My Resteasy/OAuth2.0 authentication environment is working perfect. > Everything is fine when I work in a web context. > But when I inject an EJB in a resteasy resource, I get the following exception: > > 12:22:32,027 DEBUG [org.jboss.security.auth.spi.UsersRolesLoginModule] (http--10.0.21.52-8443-5) Bad password for username=customer-portal > 12:22:32,027 ERROR [org.jboss.security.authentication.JBossCachedAuthenticationManager] (http--10.0.21.52-8443-5) Login failure: javax.security.auth.login.FailedLoginException: Password Incorrect/Password Required > at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:270) [picketbox-4.0.7.Final.jar:4.0.7.Final] > at org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:155) [picketbox-4.0.7.Final.jar:4.0.7.Final] > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_55] > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_55] > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_55] > at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_55] > at javax.security.auth.login.LoginContext.invoke(LoginContext.java:762) [rt.jar:1.7.0_55] > at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203) [rt.jar:1.7.0_55] > at javax.security.auth.login.LoginContext$4.run(LoginContext.java:690) [rt.jar:1.7.0_55] > at javax.security.auth.login.LoginContext$4.run(LoginContext.java:688) [rt.jar:1.7.0_55] > at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_55] > at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:687) [rt.jar:1.7.0_55] > at javax.security.auth.login.LoginContext.login(LoginContext.java:595) [rt.jar:1.7.0_55] > at org.jboss.security.authentication.JBossCachedAuthenticationManager.defaultLogin(JBossCachedAuthenticationManager.java:449) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] > at org.jboss.security.authentication.JBossCachedAuthenticationManager.proceedWithJaasLogin(JBossCachedAuthenticationManager.java:383) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] > at org.jboss.security.authentication.JBossCachedAuthenticationManager.authenticate(JBossCachedAuthenticationManager.java:371) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] > at org.jboss.security.authentication.JBossCachedAuthenticationManager.isValid(JBossCachedAuthenticationManager.java:160) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] > at org.jboss.as.security.service.SimpleSecurityManager.authenticate(SimpleSecurityManager.java:306) [jboss-as-security-7.1.1.Final.jar:7.1.1.Final] > at org.jboss.as.security.service.SimpleSecurityManager.push(SimpleSecurityManager.java:272) [jboss-as-security-7.1.1.Final.jar:7.1.1.Final] > at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:49) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] > at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:45) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] > at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_55] > at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:74) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] > at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final] > at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] > at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final] > at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final] > at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final] > at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] > at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final] > at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final] > at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final] > at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final] > at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final] > at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final] > at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final] > at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final] > at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final] > > Could you help me, please? > > Thanks in advance! > Inacio > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > 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: Rohrberg, T. <tim...@vi...> - 2014-05-23 13:39:06
|
Hello everybody, I am currently trying to use the RESTEasy client framework within an OSGi environment (Eclipse Equinox). To provide the required dependencies, I created a separate Eclipse Plug-In containing the required JAR libraries and exporting the contained packages to downstream bundles. Then, I am using the RESTEasy client framework as follows within my main bundle which includes the before mentioned bundle as required bundle: ResteasyClient client = new ResteasyClientBuilder().build(); ResteasyWebTarget target = client .target( "http://192.168.100.181:5952/RXT_RESTWebService-2.1/jobtemplates/Vitaphone 300 BT/386340" ); RxtDevice device = target.request().get( RxtDevice.class ); System.out.println( device.getId() ); Unfortunately, I always get the following error: javax.ws.rs.client.ResponseProcessingException: javax.ws.rs.ProcessingException: Unable to find a MessageBodyReader of content-type application/xml and type class com.vitasystems.remosxt.rest.client.model.RxtDevice at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:140) at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:444) at org.jboss.resteasy.client.jaxrs.internal.ClientInvocationBuilder.get(ClientInvocationBuilder.java:165) at de.vitasystems.example.resteasy.client.Activator.start(Activator.java:25) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438) at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) Caused by: javax.ws.rs.ProcessingException: Unable to find a MessageBodyReader of content-type application/xml and type class com.vitasystems.remosxt.rest.client.model.RxtDevice at org.jboss.resteasy.core.interception.ClientReaderInterceptorContext.throwReaderNotFound(ClientReaderInterceptorContext.java:39) at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.getReader(AbstractReaderInterceptorContext.java:73) at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:50) at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(GZIPDecodingInterceptor.java:59) at org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:53) at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:245) at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readEntity(ClientResponse.java:179) at org.jboss.resteasy.specimpl.BuiltResponse.readEntity(BuiltResponse.java:211) at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.extractResult(ClientInvocation.java:104) ... 18 more By debugging the included libraries, I tracked the problem down to the following location: ResteasyProviderFactory.java protected <T> MessageBodyReader<T> resolveMessageBodyReader(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType, MediaTypeMap<SortedKey<MessageBodyReader>> availableReaders) { List<SortedKey<MessageBodyReader>> readers = availableReaders.getPossible(mediaType, type); //logger.info("******** getMessageBodyReader *******"); for (SortedKey<MessageBodyReader> reader : readers) { //logger.info(" matching reader: " + reader.getClass().getName()); if (reader.obj.isReadable(type, genericType, annotations, mediaType)) { return (MessageBodyReader<T>) reader.obj; } } return null; } The problem is a little weired: The readers list of MessageBodyReader instances contains the org.jboss.resteasy.plugins.providers.jaxb.JAXBXmlRootElementProvider, but the reader.obj.isReadable() method returns false for that reader. In another setup as a plain Maven project outside of the OSGi world, the the referred method reader.obj.isReadable() returns true and the same piece of code works. I am at the end of my knowledge... Do you guys have any hints? Best regards, Timo Rohrberg ________________________________ Hinweis: Diese Email enth?lt evtl. vertrauliche und rechtlich gesch?tzte Informationen. Sollten Sie nicht der richtige Adressat sein oder diese Email irrt?mlich erhalten haben, informieren Sie bitte sofort den Absender, und l?schen Sie anschlie?end diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe des Inhalts dieser Email sind nicht gestattet. Attention: This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or if you have received this e-mail in error, please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the contents of this e-mail is strictly prohibited. |
From: JOSÉ I. DA S. J. <ina...@pr...> - 2014-05-22 15:25:53
|
Hi! My Resteasy/OAuth2.0 authentication environment is working perfect. Everything is fine when I work in a web context. But when I inject an EJB in a resteasy resource, I get the following exception: 12:22:32,027 DEBUG [org.jboss.security.auth.spi.UsersRolesLoginModule] (http--10.0.21.52-8443-5) Bad password for username=customer-portal 12:22:32,027 ERROR [org.jboss.security.authentication.JBossCachedAuthenticationManager] (http--10.0.21.52-8443-5) Login failure: javax.security.auth.login.FailedLoginException: Password Incorrect/Password Required at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:270) [picketbox-4.0.7.Final.jar:4.0.7.Final] at org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:155) [picketbox-4.0.7.Final.jar:4.0.7.Final] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_55] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_55] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_55] at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_55] at javax.security.auth.login.LoginContext.invoke(LoginContext.java:762) [rt.jar:1.7.0_55] at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203) [rt.jar:1.7.0_55] at javax.security.auth.login.LoginContext$4.run(LoginContext.java:690) [rt.jar:1.7.0_55] at javax.security.auth.login.LoginContext$4.run(LoginContext.java:688) [rt.jar:1.7.0_55] at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_55] at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:687) [rt.jar:1.7.0_55] at javax.security.auth.login.LoginContext.login(LoginContext.java:595) [rt.jar:1.7.0_55] at org.jboss.security.authentication.JBossCachedAuthenticationManager.defaultLogin(JBossCachedAuthenticationManager.java:449) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] at org.jboss.security.authentication.JBossCachedAuthenticationManager.proceedWithJaasLogin(JBossCachedAuthenticationManager.java:383) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] at org.jboss.security.authentication.JBossCachedAuthenticationManager.authenticate(JBossCachedAuthenticationManager.java:371) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] at org.jboss.security.authentication.JBossCachedAuthenticationManager.isValid(JBossCachedAuthenticationManager.java:160) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] at org.jboss.as.security.service.SimpleSecurityManager.authenticate(SimpleSecurityManager.java:306) [jboss-as-security-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.security.service.SimpleSecurityManager.push(SimpleSecurityManager.java:272) [jboss-as-security-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:49) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.ejb3.security.SecurityContextInterceptor$1.run(SecurityContextInterceptor.java:45) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_55] at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:74) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final] at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final] at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final] at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final] at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final] at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final] at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final] at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final] at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final] Could you help me, please? Thanks in advance! Inacio |
From: Weinan Li <l.w...@gm...> - 2014-05-21 11:08:53
|
Hi Heiko, If you bind @ApplicationPath to ‘/‘, then you will mask all the other paths of JPS pages. Please bind RESTEasy to some specific path, ‘/rest/‘ for example. Here is an example for your reference: https://github.com/wildfly/quickstart/tree/master/kitchensink-jsp -- Weinan Li On Thursday, May 15, 2014 at 12:16 AM, Heiko W.Rupp wrote: > Hey, > > suppose I have my rest-y app running on / in a Wildfly 8 container with > <jboss-web> > <context-root>/</context-root> > > and @ApplicationPath("/") and basically an empty web.xml (http://web.xml) > > Can I somehow say > > /* , but not /foo/* should be handled by RestEasy, while > /foo/* should be served as normal content (.html, .js, .css etc.).? > > > Thanks > Heiko > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Resteasy-users mailing list > Res...@li... (mailto:Res...@li...) > https://lists.sourceforge.net/lists/listinfo/resteasy-users |
From: Heiko W.R. <hr...@re...> - 2014-05-14 16:16:45
|
Hey, suppose I have my rest-y app running on / in a Wildfly 8 container with <jboss-web> <context-root>/</context-root> and @ApplicationPath("/") and basically an empty web.xml Can I somehow say /* , but not /foo/* should be handled by RestEasy, while /foo/* should be served as normal content (.html, .js, .css etc.).? Thanks Heiko |
From: Bill B. <bb...@re...> - 2014-05-13 21:12:42
|
BTW, take a look at keycloak.org Its the new project I started for security. On 5/13/2014 5:08 PM, Bill Burke wrote: > You have to provide a truststore or disable the trust manager. > > On 5/13/2014 4:26 PM, JOSÉ INÁCIO DA SILVA JÚNIOR wrote: >> Hi! >> >> I'm trying to implement SSO through Resteasy Skeleton Key. >> I'm following the Chapter 39. OAuth 2.0 and Resteasy Skeleton Key of Resteasy Reference Guide. >> >> I generated my keystore with: >> >> keytool -genkey -alias mydomain -keyalg rsa -keystore realmDINF.jks >> >> then I exported my certificate with: >> >> keytool -exportcert -alias mydomain -keystore /opt/jboss-7.1.1.Final/standalone/configuration/realmDINF.jks -file /opt/jboss-7.1.1.Final/standalone/configuration/mydomain.cer >> >> then I imported my certificate into cacerts: >> >> keytool -import -alias mydomain -keystore cacerts -trustcacerts -file /opt/jboss-7.1.1.Final/standalone/configuration/mydomain.cer >> >> >> The auth-server application e the customer-app applicaton were deployed >> >> When I access the customer-app application in my browser: >> >> https://localhost:8443/customer-app >> >> I see the login page and when I enter user and password I get the following exception: >> >> 17:09:35,499 ERROR [org.apache.catalina.connector.CoyoteAdapter] (http--127.0.0.1-8443-1) An exception or error occurred in the container during the request processing: javax.ws.rs.ProcessingException: Unable to invoke request >> at org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:287) [resteasy-client-3.0.7.Final.jar:] >> at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:407) [resteasy-client-3.0.7.Final.jar:] >> at org.jboss.resteasy.client.jaxrs.internal.ClientInvocationBuilder.post(ClientInvocationBuilder.java:195) [resteasy-client-3.0.7.Final.jar:] >> at org.jboss.resteasy.skeleton.key.as7.ServletOAuthLogin.resolveCode(ServletOAuthLogin.java:271) [skeleton-key-as7-3.0.7.Final.jar:] >> at org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.oauth(OAuthManagedResourceValve.java:273) [skeleton-key-as7-3.0.7.Final.jar:] >> at org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.authenticate(OAuthManagedResourceValve.java:175) [skeleton-key-as7-3.0.7.Final.jar:] >> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:455) [jbossweb-7.0.13.Final.jar:] >> at org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.invoke(OAuthManagedResourceValve.java:138) [skeleton-key-as7-3.0.7.Final.jar:] >> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] >> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:] >> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:] >> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:] >> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:] >> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:] >> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:] >> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:] >> at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45] >> Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated >> at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:352) [jsse.jar:1.6] >> at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128) [httpclient-4.2.1.jar:4.2.1] >> at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572) [httpclient-4.2.1.jar:4.2.1] >> at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) [httpclient-4.2.1.jar:4.2.1] >> at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294) [httpclient-4.2.1.jar:4.2.1] >> at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:640) [httpclient-4.2.1.jar:4.2.1] >> at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479) [httpclient-4.2.1.jar:4.2.1] >> at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) [httpclient-4.2.1.jar:4.2.1] >> at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) [httpclient-4.2.1.jar:4.2.1] >> at org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:283) [resteasy-client-3.0.7.Final.jar:] >> ... 16 more >> >> I've tried everything but I couldn't get authenticated in customer-app application. >> >> Please, help me. >> What am I missing? >> >> >> Thanks in advance! >> >> ------------------------------------------------------------------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. >> Get unparalleled scalability from the best Selenium testing platform available >> Simple to use. Nothing to install. Get started now for free." >> http://p.sf.net/sfu/SauceLabs >> _______________________________________________ >> 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: Bill B. <bb...@re...> - 2014-05-13 21:08:12
|
You have to provide a truststore or disable the trust manager. On 5/13/2014 4:26 PM, JOSÉ INÁCIO DA SILVA JÚNIOR wrote: > Hi! > > I'm trying to implement SSO through Resteasy Skeleton Key. > I'm following the Chapter 39. OAuth 2.0 and Resteasy Skeleton Key of Resteasy Reference Guide. > > I generated my keystore with: > > keytool -genkey -alias mydomain -keyalg rsa -keystore realmDINF.jks > > then I exported my certificate with: > > keytool -exportcert -alias mydomain -keystore /opt/jboss-7.1.1.Final/standalone/configuration/realmDINF.jks -file /opt/jboss-7.1.1.Final/standalone/configuration/mydomain.cer > > then I imported my certificate into cacerts: > > keytool -import -alias mydomain -keystore cacerts -trustcacerts -file /opt/jboss-7.1.1.Final/standalone/configuration/mydomain.cer > > > The auth-server application e the customer-app applicaton were deployed > > When I access the customer-app application in my browser: > > https://localhost:8443/customer-app > > I see the login page and when I enter user and password I get the following exception: > > 17:09:35,499 ERROR [org.apache.catalina.connector.CoyoteAdapter] (http--127.0.0.1-8443-1) An exception or error occurred in the container during the request processing: javax.ws.rs.ProcessingException: Unable to invoke request > at org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:287) [resteasy-client-3.0.7.Final.jar:] > at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:407) [resteasy-client-3.0.7.Final.jar:] > at org.jboss.resteasy.client.jaxrs.internal.ClientInvocationBuilder.post(ClientInvocationBuilder.java:195) [resteasy-client-3.0.7.Final.jar:] > at org.jboss.resteasy.skeleton.key.as7.ServletOAuthLogin.resolveCode(ServletOAuthLogin.java:271) [skeleton-key-as7-3.0.7.Final.jar:] > at org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.oauth(OAuthManagedResourceValve.java:273) [skeleton-key-as7-3.0.7.Final.jar:] > at org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.authenticate(OAuthManagedResourceValve.java:175) [skeleton-key-as7-3.0.7.Final.jar:] > at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:455) [jbossweb-7.0.13.Final.jar:] > at org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.invoke(OAuthManagedResourceValve.java:138) [skeleton-key-as7-3.0.7.Final.jar:] > at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:] > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:] > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:] > at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:] > at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:] > at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:] > at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:] > at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45] > Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated > at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:352) [jsse.jar:1.6] > at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128) [httpclient-4.2.1.jar:4.2.1] > at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572) [httpclient-4.2.1.jar:4.2.1] > at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) [httpclient-4.2.1.jar:4.2.1] > at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294) [httpclient-4.2.1.jar:4.2.1] > at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:640) [httpclient-4.2.1.jar:4.2.1] > at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479) [httpclient-4.2.1.jar:4.2.1] > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) [httpclient-4.2.1.jar:4.2.1] > at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) [httpclient-4.2.1.jar:4.2.1] > at org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:283) [resteasy-client-3.0.7.Final.jar:] > ... 16 more > > I've tried everything but I couldn't get authenticated in customer-app application. > > Please, help me. > What am I missing? > > > Thanks in advance! > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > 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: JOSÉ I. DA S. J. <ina...@pr...> - 2014-05-13 20:46:37
|
Hi! I'm trying to implement SSO through Resteasy Skeleton Key. I'm following the Chapter 39. OAuth 2.0 and Resteasy Skeleton Key of Resteasy Reference Guide. I generated my keystore with: keytool -genkey -alias mydomain -keyalg rsa -keystore realmDINF.jks then I exported my certificate with: keytool -exportcert -alias mydomain -keystore /opt/jboss-7.1.1.Final/standalone/configuration/realmDINF.jks -file /opt/jboss-7.1.1.Final/standalone/configuration/mydomain.cer then I imported my certificate into cacerts: keytool -import -alias mydomain -keystore cacerts -trustcacerts -file /opt/jboss-7.1.1.Final/standalone/configuration/mydomain.cer The auth-server application e the customer-app applicaton were deployed When I access the customer-app application in my browser: https://localhost:8443/customer-app I see the login page and when I enter user and password I get the following exception: 17:09:35,499 ERROR [org.apache.catalina.connector.CoyoteAdapter] (http--127.0.0.1-8443-1) An exception or error occurred in the container during the request processing: javax.ws.rs.ProcessingException: Unable to invoke request at org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:287) [resteasy-client-3.0.7.Final.jar:] at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:407) [resteasy-client-3.0.7.Final.jar:] at org.jboss.resteasy.client.jaxrs.internal.ClientInvocationBuilder.post(ClientInvocationBuilder.java:195) [resteasy-client-3.0.7.Final.jar:] at org.jboss.resteasy.skeleton.key.as7.ServletOAuthLogin.resolveCode(ServletOAuthLogin.java:271) [skeleton-key-as7-3.0.7.Final.jar:] at org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.oauth(OAuthManagedResourceValve.java:273) [skeleton-key-as7-3.0.7.Final.jar:] at org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.authenticate(OAuthManagedResourceValve.java:175) [skeleton-key-as7-3.0.7.Final.jar:] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:455) [jbossweb-7.0.13.Final.jar:] at org.jboss.resteasy.skeleton.key.as7.OAuthManagedResourceValve.invoke(OAuthManagedResourceValve.java:138) [skeleton-key-as7-3.0.7.Final.jar:] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45] Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:352) [jsse.jar:1.6] at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128) [httpclient-4.2.1.jar:4.2.1] at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:572) [httpclient-4.2.1.jar:4.2.1] at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) [httpclient-4.2.1.jar:4.2.1] at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294) [httpclient-4.2.1.jar:4.2.1] at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:640) [httpclient-4.2.1.jar:4.2.1] at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479) [httpclient-4.2.1.jar:4.2.1] at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) [httpclient-4.2.1.jar:4.2.1] at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) [httpclient-4.2.1.jar:4.2.1] at org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine.invoke(ApacheHttpClient4Engine.java:283) [resteasy-client-3.0.7.Final.jar:] ... 16 more I've tried everything but I couldn't get authenticated in customer-app application. Please, help me. What am I missing? Thanks in advance! |
From: David R R. <drr...@op...> - 2014-05-07 13:17:25
|
Thanks, if I am creating a new client each time (I'm using the ProxyFactory) then what is the proper way to release a proxy created by ProxyFactory? David David R Robison Open Roads Consulting, Inc. 103 Watson Road, Chesapeake, VA 23320 phone: (757) 546-3401 e-mail: drr...@op... web: http://openroadsconsulting.com blog: http://therobe.blogspot.com book: http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526 On 5/7/2014 8:42 AM, Bill Burke wrote: > You would have to create a new ResteasyClient each time. We use Apache > HttpClient under the covers, IIRC, you could only set it at socket > creation time, not per request. I could be wrong though. > > On 5/6/2014 12:34 PM, David R Robison wrote: >> I am using the resteasy client to communicate with a digital camera. >> Most of the commands finish in about 300ms but some take over 2s. Is >> there a way to specify the read timeout for individual calls? I know I >> can set a global SO_TIMEOUT value but can I change it with wach call I make? >> Thanks, David >> This email communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed. If you are not the intended recipient, please delete this email immediately. |
From: Bill B. <bb...@re...> - 2014-05-07 12:54:11
|
I assume you're using the old deprecated client api? ProxyFactory allows you to pass in a ClientExecutor. Create one of those, and pass it in. Then you have a reference to it. ApacheHttpClient4Executor executor = new ApacheHttpclient4Executor(...); MyInterface proxy = ProxyFactory.create(MyInterface.class, "http:/base", executor); On 5/7/2014 8:47 AM, David R Robison wrote: > Thanks, if I am creating a new client each time (I'm using the > ProxyFactory) then what is the proper way to release a proxy created by > ProxyFactory? David > > David R Robison > Open Roads Consulting, Inc. > 103 Watson Road, Chesapeake, VA 23320 > phone: (757) 546-3401 > e-mail: drr...@op... > web: http://openroadsconsulting.com > blog: http://therobe.blogspot.com > book: http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526 > > On 5/7/2014 8:42 AM, Bill Burke wrote: >> You would have to create a new ResteasyClient each time. We use Apache >> HttpClient under the covers, IIRC, you could only set it at socket >> creation time, not per request. I could be wrong though. >> >> On 5/6/2014 12:34 PM, David R Robison wrote: >>> I am using the resteasy client to communicate with a digital camera. >>> Most of the commands finish in about 300ms but some take over 2s. Is >>> there a way to specify the read timeout for individual calls? I know I >>> can set a global SO_TIMEOUT value but can I change it with wach call I make? >>> Thanks, David >>> > > > > This email communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed. > If you are not the intended recipient, please delete this email immediately. > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
From: Bill B. <bb...@re...> - 2014-05-07 12:42:54
|
You would have to create a new ResteasyClient each time. We use Apache HttpClient under the covers, IIRC, you could only set it at socket creation time, not per request. I could be wrong though. On 5/6/2014 12:34 PM, David R Robison wrote: > I am using the resteasy client to communicate with a digital camera. > Most of the commands finish in about 300ms but some take over 2s. Is > there a way to specify the read timeout for individual calls? I know I > can set a global SO_TIMEOUT value but can I change it with wach call I make? > Thanks, David > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
From: Bill B. <bb...@re...> - 2014-05-07 12:41:30
|
Assume anything deprecated is available in JAX-RS 2.0. On 5/4/2014 2:47 PM, kishore das wrote: > Hi, > > I have recently started using RestEasy and still working my ways through > it. > > I could see that for a lot of deprecated classes, there is no suggestion > in javadoc as to what should be used instead. It would be great help if > you could provide this going forward. > > Regards > Kishore > > > ------------------------------------------------------------------------------ > Is your legacy SCM system holding you back? Join Perforce May 7 to find out: > • 3 signs your SCM is hindering your productivity > • Requirements for releasing software faster > • Expert tips and advice for migrating your SCM now > http://p.sf.net/sfu/perforce > > > > _______________________________________________ > 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: David R R. <drr...@op...> - 2014-05-06 17:04:54
|
I am using the resteasy client to communicate with a digital camera. Most of the commands finish in about 300ms but some take over 2s. Is there a way to specify the read timeout for individual calls? I know I can set a global SO_TIMEOUT value but can I change it with wach call I make? Thanks, David -- David R Robison Open Roads Consulting, Inc. 103 Watson Road, Chesapeake, VA 23320 phone: (757) 546-3401 e-mail: drr...@op... web: http://openroadsconsulting.com blog: http://therobe.blogspot.com book: http://www.xulonpress.com/bookstore/bookdetail.php?PB_ISBN=9781597816526 This email communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed. If you are not the intended recipient, please delete this email immediately. |
From: Marco R. <mri...@re...> - 2014-05-05 12:20:43
|
Hi all, I'm not sure whether my configuration is incorrect, whether it's working the way it should or whether I've run into a bug. I would like to do the following in my REST interface: 1. Receive a request 2. Start a different thread to immediately send a response back 3. Continue processing the request (using, among other things CDI-injected resources[1]). I expected 2. to immediately send a response back, but it waits for 3 to complete. :( I've put together a small github arquillian project with a test that shows this (https://github.com/mrietveld/resteasy-async-comet/). I've added the <async-supported>true</async-supported> option to my web.xml (https://github.com/mrietveld/resteasy-async-comet/blob/master/src/test/resources/WEB-INF/web.xml#L19) -- is there something else I need to do? Thanks in advance, Marco Rietveld [1] The reason that I mention the CDI injected resources necessary for processing my request, is that I can't use the asynchronous job service (https://docs.jboss.org/resteasy/docs/2.3.6.Final/userguide/html/async_job_service.html) to do this because of RESTEASY-236. |
From: kishore d. <kda...@gm...> - 2014-05-04 18:47:54
|
Hi, I have recently started using RestEasy and still working my ways through it. I could see that for a lot of deprecated classes, there is no suggestion in javadoc as to what should be used instead. It would be great help if you could provide this going forward. Regards Kishore |
From: Willden, J. <jef...@op...> - 2014-05-01 16:24:19
|
Does resteasy have a mechanism for sending data of different data types in one response to avoid additional requests to other endpoints? Example: Supposwe I want to request user/23/withGroupMemberships so it would load data of type user and of type membership and of type group. Does a strict implementation of REST require three requests? user/23 to load that user and another request user/23/memberships to load the memberships that user 23 has, then you gather up the group IDs from those memberships and make another request for group/14,15,23 to load the three groups that the user is a member of? Or is there a way to load data of different types in one response? This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. |
From: Rodrigo U. <rod...@gm...> - 2014-04-29 18:40:47
|
If not in a filter, is there any place else? On Tue, Apr 29, 2014 at 12:40 PM, Bill Burke <bb...@re...> wrote: > JAx-RS requires that any exception thrown in a filter should be wrapped > by ResponseProcessingException. So, I don't think you should be > implementing this in a filter. > > On 4/28/2014 3:52 PM, Rodrigo Uchôa wrote: > > Hi everyone! > > > > Is there a way, using the client API, to map HTTP response codes to > > Exceptions? > > > > I'm developing clients that make calls to REST endpoins. These endpoins > > return multiple response error codes. To make things easier on the > > client side, I would like to map these response codes to some of my > > custom client Exceptions. For instance, a response code 409 could map to > > a BusinessException and so on. > > > > To achieve this, my first instinct was to use a ClientResponseFilter. It > > even worked, but the JAX-RS runtime is wrapping my exceptions inside a > > *javax.ws.client.ResponseProcessingException*. Although that does not > > stop me, all these "arrangements" are making me wonder if I chose the > > right path. > > > > Summing up, is using a ClientReponseFilter the best way? > > > > > > > ------------------------------------------------------------------------------ > > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > > Instantly run your Selenium tests across 300+ browser/OS combos. Get > > unparalleled scalability from the best Selenium testing platform > available. > > Simple to use. Nothing to install. Get started now for free." > > http://p.sf.net/sfu/SauceLabs > > > > > > > > _______________________________________________ > > 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 > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users > |
From: Bill B. <bb...@re...> - 2014-04-29 16:04:36
|
JAx-RS requires that any exception thrown in a filter should be wrapped by ResponseProcessingException. So, I don't think you should be implementing this in a filter. On 4/28/2014 3:52 PM, Rodrigo Uchôa wrote: > Hi everyone! > > Is there a way, using the client API, to map HTTP response codes to > Exceptions? > > I'm developing clients that make calls to REST endpoins. These endpoins > return multiple response error codes. To make things easier on the > client side, I would like to map these response codes to some of my > custom client Exceptions. For instance, a response code 409 could map to > a BusinessException and so on. > > To achieve this, my first instinct was to use a ClientResponseFilter. It > even worked, but the JAX-RS runtime is wrapping my exceptions inside a > *javax.ws.client.ResponseProcessingException*. Although that does not > stop me, all these "arrangements" are making me wonder if I chose the > right path. > > Summing up, is using a ClientReponseFilter the best way? > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > > > > _______________________________________________ > 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: Bill B. <bb...@re...> - 2014-04-29 15:34:51
|
On 4/29/2014 11:29 AM, Bill Burke wrote: > SimpleDateFormat is not threadsafe. Read the Javadoc. > BTW, unfortunately, I did not know SimpleDateFormat was not threadsafe and it is used as a singleton in 2.3.x codebase in a few places. This has been fixed in 3.x. -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
From: Bill B. <bb...@re...> - 2014-04-29 15:29:40
|
SimpleDateFormat is not threadsafe. Read the Javadoc. For StringParamUnmarshaller, Resteasy stores them in a map keyed by classname of the generic type: For example: class FooUnmarshaller implements StringParamUnmarshaller<Foo> {} FooUnmarshaller will be used to unmarshall Foo classes only. No subclasses of Foo though! That's just the limitation. An unmarshaller instance is created *per method parameter*. setAnnotations is called with the annotations of that parameter. So, if you had this: @GET public STring get(@Bar @HeaderParam("header") Foo arg1, @Stuff @HeaderParam("header") Foo arg2) {} An instance of FooUnmarshaller would be instantiated for arg1. ANother instance created for arg2. On 4/28/2014 1:45 PM, Allen Gilbert wrote: > Hello, > > Per > http://docs.jboss.org/resteasy/docs/2.3.5.Final/userguide/html/StringConverter.html#StringParamUnmarshaller, > I created a @DateFormat annotation for unmarshalling query parameters > into Date objects. Initially, I thought it was working well, but once I > started using more than one date format, I ran into trouble. > > The user guide states that a StringParameterUnmarshaller "is created per > injector," but its JavaDoc says, "Instances of this class are created > per parameter injection." I'm not sure what "created per injector" > means, but I read "created per parameter injection" to mean that my > custom unmarshaller should be instantiated per resource method call. > This is consistent with the example in the user guide, which assumes > that setAnnotations() is called for each request. Otherwise, only one > date format could ever be registered, and also, DateFormatter would not > be thread-safe. > > These are exactly the two issues I've run into: only one date format is > ever used to unmarshal query parameters, so many of my resource methods > fail because of wacky dates. Furthermore, when running at high load, > date parsing sometimes fails when multiple threads access the same > SimpleDateFormat instance. I've verified that the only > time setAnnotations() is called on my custom parameter unmarshaller is > during the very first request, as part of ResteasyDeployment.start(). > > Is this "caching" of StringParameterUnmarshallers by design? > > -Allen > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > > > > _______________________________________________ > 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: Rodrigo U. <rod...@gm...> - 2014-04-28 19:52:45
|
Hi everyone! Is there a way, using the client API, to map HTTP response codes to Exceptions? I'm developing clients that make calls to REST endpoins. These endpoins return multiple response error codes. To make things easier on the client side, I would like to map these response codes to some of my custom client Exceptions. For instance, a response code 409 could map to a BusinessException and so on. To achieve this, my first instinct was to use a ClientResponseFilter. It even worked, but the JAX-RS runtime is wrapping my exceptions inside a *javax.ws.client.ResponseProcessingException*. Although that does not stop me, all these "arrangements" are making me wonder if I chose the right path. Summing up, is using a ClientReponseFilter the best way? |
From: Allen G. <all...@do...> - 2014-04-28 18:16:55
|
Hello, Per http://docs.jboss.org/resteasy/docs/2.3.5.Final/userguide/html/StringConverter.html#StringParamUnmarshaller, I created a @DateFormat annotation for unmarshalling query parameters into Date objects. Initially, I thought it was working well, but once I started using more than one date format, I ran into trouble. The user guide states that a StringParameterUnmarshaller "is created per injector," but its JavaDoc says, "Instances of this class are created per parameter injection." I'm not sure what "created per injector" means, but I read "created per parameter injection" to mean that my custom unmarshaller should be instantiated per resource method call. This is consistent with the example in the user guide, which assumes that setAnnotations() is called for each request. Otherwise, only one date format could ever be registered, and also, DateFormatter would not be thread-safe. These are exactly the two issues I've run into: only one date format is ever used to unmarshal query parameters, so many of my resource methods fail because of wacky dates. Furthermore, when running at high load, date parsing sometimes fails when multiple threads access the same SimpleDateFormat instance. I've verified that the only time setAnnotations() is called on my custom parameter unmarshaller is during the very first request, as part of ResteasyDeployment.start(). Is this "caching" of StringParameterUnmarshallers by design? -Allen |
From: Tom B. <tb...@re...> - 2014-04-24 12:36:08
|
Thanks, that's what I was guessing, but thought I would check with the pros! ----- Original Message ----- From: "Bill Burke" <bb...@re...> To: res...@li... Sent: Wednesday, April 23, 2014 1:40:02 PM Subject: Re: [Resteasy-users] exception mappers and intercepting them? I would catch the upstream and handle it within code. On 4/23/2014 3:36 PM, Tom Butt wrote: > We currently use exception mappers, but I ran across an odd case. We work as a proxy to other systems, so if we get back a poorly formed response, we have an exception mapper for JAXBUnmarshalException. The problem is, if somebody sends in (to us) a poorly formatted request, it also hits our mapper (as it's the same exception.) In this case, we would like the responses to be different. If the user sends in poorly formatted XML for example, we would return a 400 response. If we get a bad response from the call we make to the upstream system, then we return a 502 response. If I put this exception mapper in place, we get all 502s. Is there a way to differentiate? Is this a case where I shouldn't deal with the mapper and simply catch this exception from the upstream system and throw a 502? Thanks in advance! > -Tom > > ------------------------------------------------------------------------------ > Start Your Social Network Today - Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > _______________________________________________ > 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 ------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform _______________________________________________ Resteasy-users mailing list Res...@li... https://lists.sourceforge.net/lists/listinfo/resteasy-users |
From: Bill B. <bb...@re...> - 2014-04-23 20:13:33
|
I would catch the upstream and handle it within code. On 4/23/2014 3:36 PM, Tom Butt wrote: > We currently use exception mappers, but I ran across an odd case. We work as a proxy to other systems, so if we get back a poorly formed response, we have an exception mapper for JAXBUnmarshalException. The problem is, if somebody sends in (to us) a poorly formatted request, it also hits our mapper (as it's the same exception.) In this case, we would like the responses to be different. If the user sends in poorly formatted XML for example, we would return a 400 response. If we get a bad response from the call we make to the upstream system, then we return a 502 response. If I put this exception mapper in place, we get all 502s. Is there a way to differentiate? Is this a case where I shouldn't deal with the mapper and simply catch this exception from the upstream system and throw a 502? Thanks in advance! > -Tom > > ------------------------------------------------------------------------------ > Start Your Social Network Today - Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > _______________________________________________ > 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 |