Re: CXF and CDI injection
Almost but not totally. 1) i think you should put it in web-inf 2) values are id of resources defined in resources.xml ( ) Le 15 sept. 2012 23:41, "Luca Merolla" a écrit : > Not sure if it's right but I have added this openejb-jar.xml file in > META-INF of my REST application. > > > http://www.openejb.org/openejb-jar/1.1";> > > > cxf.jax-rs.providers = > org.codehaus.jackson.jaxrs.JacksonJsonProvider, > org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider > > > > > Where PortoneApplication extends javax.ws.rs.core.Application. > > It seems that nothing is changed because I still get the same error > > Sep 15, 2012 11:39:26 PM org.apache.cxf.jaxrs.utils.JAXRSUtils > readFromMessageBody > WARNING: No message body reader has been found for request class > SecurityContext, ContentType : application/json. > > > On Sat, Sep 15, 2012 at 10:26 PM, Romain Manni-Bucau > wrote: > > > Yeah using openejb-jar.xml in either pojo-deployment (attribute > class-name) > > or ejb-deployment (attribute name) add cxf.jaxrs.providers = ... property > > Le 15 sept. 2012 22:24, "Luca Merolla" a écrit > : > > > > > I'm trying to configure Jackson Json provider but I get this error: > > > > > > INFO: ServletContext initialized. > > > Sep 15, 2012 10:22:31 PM org.apache.openejb.observer.ObserverManager > > > fireEvent > > > SEVERE: error invoking > > > org.apache.openejb.observer.ObserverManager$Observer@38131650 > > > java.lang.reflect.InvocationTargetException > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > at > > > > > > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > > at > > > > > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > > at java.lang.reflect.Method.invoke(Method.java:597) > > > at > > > > > > > > > org.apache.openejb.observer.ObserverManager$Observer.invoke(ObserverManager.java:145) > > > at > > > > > > > > > org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:69) > > > at > > > > > > org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:105) > > > at > > > > > > > > > org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:1102) > > > at > > > > > > > > > org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:104) > > > at > > > > > > > > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > > > at > > > > > > > > > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > > > at > > > > > > > > > org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401) > > > at > > > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168) > > > at > > > > > > > > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) > > > at > > > > > > > > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) > > > at > > > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > > > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > > > at > > > > > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > > > at > > > > > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > > > at java.lang.Thread.run(Thread.java:662) > > > Caused by: java.lang.IllegalArgumentException: no @Path annotation on > > > com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider > > > at > > > > > > org.apache.openejb.server.rest.RESTService.getAddress(RESTService.java:422) > > > at > > > > > > > > > org.apache.openejb.server.rest.RESTService.deploySingleton(RESTService.java:315) > > > at > > > > > > > > > org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:171) > > > at > > > > > > > > > org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:51) > > > ... 20 more > > > > > > in my application class I have: > > > > > > @Override > > > public Set getSingletons() { > > > HashSet singletons = new HashSet(); > > > singletons.add(new > > com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider()); > > > > > > return singletons; > > > } > > > > > > Is there a better way to use the jackson as json provider? > > > > > > On Sat, Sep 15, 2012 at 12:42 PM, Romain Manni-Bucau > > > wrote: > > > > > > > Depend what they do but normally no > > > > Le 15 sept. 2012 12:34, "Luca Merolla" a > > écrit > > > : > > > > > > > > > I'll give a try. Could be that the problem is related to the fact > > that > > > I > > > > > have some @WebFilter configured? > > > > > > > > > > On Sat, Sep 15, 2012 at 12:09 PM, Romain Manni-Bucau > > > > > wrote: > > > > > > > >
Re: Next TomEE release date?
We're hacking on the release now, it'll be a scramble to get it done by the end of the month but should be doable. No Apache project can actually guarantee a date due to voting -- it takes a minimum of 3 days per Apache bylaws and can't be closed till certain conditions are met -- such as getting enough votes. As it's a volunteer organization and difficult to get people's time, we typically get last minute feedback that requires new binaries and a new vote and another 3 days. So the best I can say is we're trying very hard to get it out before JavaOne / end of the month. As that sounds very scary, as a point of reference, we were in this same position last year and made the "before JavaOne" date. We got our *first* ever 100% TCK pass on September 23rd (cutting it very close) and were able to get a release out and announcement ready by JavaOne. If we're able to get a vote started by mid week, we should be able to make it by end of the month no problem. -David On Sep 15, 2012, at 1:28 PM, Alex The Rocker wrote: > Anyone here knowing TomEE/TomEE+ 1.1.0 targeted date for "general > availability" ? > > > On Fri, Sep 14, 2012 at 9:39 PM, Alex The Rocker wrote: > >> Okay, I don't mind if the next release is called 1.1.0 instead of 1.0.1. >> However, do care to know whether or not it's still scheduled for this >> month & before JavaOne: >> the application for which I'm lobbying a change from Tomcat to TomEE+ is >> currently in final phase >> for prerequisites define. They want to add REST façade, and I saw in TomEE >> 1.0.1 release notes >> (here: >> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12312320&version=12321242) >> that >> there was a fix on the JAX-WS + JAX-RS cohexistence in a same web app. >> >> If TomEE 1.1.0 come too late (ie after September), then they'll reject >> TomEE+ and choose instead >> to stay with Tomcat and use Jersey for JAX-RS, which would make a TomEE+ >> "win-back" hard >> (I saw some threads about Jersey annoyances when deploying such apps to >> TomEE+) >> >> Baseline : what's the target date for 1.1.0 GA (General Availability) ? >> >> Alex >> >> On Fri, Sep 14, 2012 at 9:31 PM, Romain Manni-Bucau >> wrote: >> >>> Yeah, i think 1.0.1 will never be released >>> >>> Npt = not from a phone ;) >>> Le 14 sept. 2012 21:24, "Alex The Rocker" a écrit >>> : >>> Call me n00b if you want, but I don't catch it: do you mean that next release due for JavaOne (end of this month) is 1.1.0 ? If otherwise it's still 1.0.1, then why couldn't there be a refresh of 1.0.1 snapshot? (and btw, what do you mean by npt? I utfm but wtf, no hit ;) Alex On Fri, Sep 14, 2012 at 9:05 PM, Romain Manni-Bucau wrote: > Hi, > > The snapshot is the 1.1.0 (npt 1.0.1). The rc will probably be skipped (we > had CI issues this week and lost some days on it :(). btw we need the > snapshot for the end of the month. > > We currently wait an openwebbeans new version then we should be able >>> to > release > Le 14 sept. 2012 20:58, "Alex The Rocker" a écrit > : > >> Hello, >> >> I saw in dev list that a 1.0.1 release candidate should be available this >> week, is that still the plan? >> I had a look to your (useful) link with snapshots builds. >> >> Unfortunately, for 1.0.1 there is not recent snapshot here: >> >> > >>> https://repository.apache.org/content/repositories/snapshots/org/apache/openejb/apache-tomee/1.0.1-SNAPSHOT/ >> >> The most recent one is dated 7th of June. >> >> In 1.0.1 snapshots repository, there are more recent build, but >>> since > 1.0.1 >> is planned before JavaOne (this month I understand), I think it's >>> safer > to >> target 1.0.1 a prerequisite for an application to be moved from >>> Tomcat to >> TomEE+. >> >> Would you please update 1.0.1 snapshot (unless a RC is actually for > current >> wekk) ? >> >> Thanks, >> Alex >> >> On Sat, Sep 8, 2012 at 10:01 AM, Romain Manni-Bucau >> wrote: >> >>> I hope a rc next week. >>> >>> I wrote a post to get the snapshot: >>> >>> http://rmannibucau.wordpress.com/2012/05/23/getting-tomee-snapshot/ >>> Le 8 sept. 2012 09:44, "Alex The Rocker" a > écrit >> : >>> Thanks guys, Based on David's answer and given that JavaOne begins end of >> september, I guess we can hope for a generally available 1.0.1 at this time, > right? However, I see no 1.0.1-alpha or 1.0.1-beta on the official >>> TomEE >>> download page. May I suggest that -even if not everything is ironed for 1.0.1- you >> guys post on TomEE download page links to alpha/beta/release >>> candidate >>> (whatever makes sense) builds o
Re: CXF and CDI injection
Not sure if it's right but I have added this openejb-jar.xml file in META-INF of my REST application. http://www.openejb.org/openejb-jar/1.1";> cxf.jax-rs.providers = org.codehaus.jackson.jaxrs.JacksonJsonProvider, org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider Where PortoneApplication extends javax.ws.rs.core.Application. It seems that nothing is changed because I still get the same error Sep 15, 2012 11:39:26 PM org.apache.cxf.jaxrs.utils.JAXRSUtils readFromMessageBody WARNING: No message body reader has been found for request class SecurityContext, ContentType : application/json. On Sat, Sep 15, 2012 at 10:26 PM, Romain Manni-Bucau wrote: > Yeah using openejb-jar.xml in either pojo-deployment (attribute class-name) > or ejb-deployment (attribute name) add cxf.jaxrs.providers = ... property > Le 15 sept. 2012 22:24, "Luca Merolla" a écrit : > > > I'm trying to configure Jackson Json provider but I get this error: > > > > INFO: ServletContext initialized. > > Sep 15, 2012 10:22:31 PM org.apache.openejb.observer.ObserverManager > > fireEvent > > SEVERE: error invoking > > org.apache.openejb.observer.ObserverManager$Observer@38131650 > > java.lang.reflect.InvocationTargetException > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > at > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:597) > > at > > > > > org.apache.openejb.observer.ObserverManager$Observer.invoke(ObserverManager.java:145) > > at > > > > > org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:69) > > at > > > org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:105) > > at > > > > > org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:1102) > > at > > > > > org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:104) > > at > > > > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > > at > > > > > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > > at > > > > > org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401) > > at > > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168) > > at > > > > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) > > at > > > > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) > > at > > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > > at > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > > at > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > > at java.lang.Thread.run(Thread.java:662) > > Caused by: java.lang.IllegalArgumentException: no @Path annotation on > > com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider > > at > > > org.apache.openejb.server.rest.RESTService.getAddress(RESTService.java:422) > > at > > > > > org.apache.openejb.server.rest.RESTService.deploySingleton(RESTService.java:315) > > at > > > > > org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:171) > > at > > > > > org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:51) > > ... 20 more > > > > in my application class I have: > > > > @Override > > public Set getSingletons() { > > HashSet singletons = new HashSet(); > > singletons.add(new > com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider()); > > > > return singletons; > > } > > > > Is there a better way to use the jackson as json provider? > > > > On Sat, Sep 15, 2012 at 12:42 PM, Romain Manni-Bucau > > wrote: > > > > > Depend what they do but normally no > > > Le 15 sept. 2012 12:34, "Luca Merolla" a > écrit > > : > > > > > > > I'll give a try. Could be that the problem is related to the fact > that > > I > > > > have some @WebFilter configured? > > > > > > > > On Sat, Sep 15, 2012 at 12:09 PM, Romain Manni-Bucau > > > > wrote: > > > > > > > > > Hmm weird, maybe you need to configure custom providers, i dont > think > > > we > > > > > have example but i could provide one next week. > > > > > > > > > > Fyi here a sample of jaxws config > > > > > > > > > > > > > > > > > > > > http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/webservice-ws-with-resources-config/(use > > > > > cxf.jaxrs.providers for your case) and here default providers > > > > > > > > > > > > > > > > > > > > http://svn.apache.org/repos/asf/openejb/trunk/openejb/
Re: Next TomEE release date?
Anyone here knowing TomEE/TomEE+ 1.1.0 targeted date for "general availability" ? On Fri, Sep 14, 2012 at 9:39 PM, Alex The Rocker wrote: > Okay, I don't mind if the next release is called 1.1.0 instead of 1.0.1. > However, do care to know whether or not it's still scheduled for this > month & before JavaOne: > the application for which I'm lobbying a change from Tomcat to TomEE+ is > currently in final phase > for prerequisites define. They want to add REST façade, and I saw in TomEE > 1.0.1 release notes > (here: > https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12312320&version=12321242) > that > there was a fix on the JAX-WS + JAX-RS cohexistence in a same web app. > > If TomEE 1.1.0 come too late (ie after September), then they'll reject > TomEE+ and choose instead > to stay with Tomcat and use Jersey for JAX-RS, which would make a TomEE+ > "win-back" hard > (I saw some threads about Jersey annoyances when deploying such apps to > TomEE+) > > Baseline : what's the target date for 1.1.0 GA (General Availability) ? > > Alex > > On Fri, Sep 14, 2012 at 9:31 PM, Romain Manni-Bucau > wrote: > >> Yeah, i think 1.0.1 will never be released >> >> Npt = not from a phone ;) >> Le 14 sept. 2012 21:24, "Alex The Rocker" a écrit >> : >> >> > Call me n00b if you want, but I don't catch it: do you mean that next >> > release due for JavaOne (end of this month) is 1.1.0 ? >> > If otherwise it's still 1.0.1, then why couldn't there be a refresh of >> > 1.0.1 snapshot? >> > >> > (and btw, what do you mean by npt? I utfm but wtf, no hit ;) >> > >> > Alex >> > >> > >> > On Fri, Sep 14, 2012 at 9:05 PM, Romain Manni-Bucau >> > wrote: >> > >> > > Hi, >> > > >> > > The snapshot is the 1.1.0 (npt 1.0.1). The rc will probably be skipped >> > (we >> > > had CI issues this week and lost some days on it :(). btw we need the >> > > snapshot for the end of the month. >> > > >> > > We currently wait an openwebbeans new version then we should be able >> to >> > > release >> > > Le 14 sept. 2012 20:58, "Alex The Rocker" a >> > écrit >> > > : >> > > >> > > > Hello, >> > > > >> > > > I saw in dev list that a 1.0.1 release candidate should be available >> > this >> > > > week, is that still the plan? >> > > > I had a look to your (useful) link with snapshots builds. >> > > > >> > > > Unfortunately, for 1.0.1 there is not recent snapshot here: >> > > > >> > > > >> > > >> > >> https://repository.apache.org/content/repositories/snapshots/org/apache/openejb/apache-tomee/1.0.1-SNAPSHOT/ >> > > > >> > > > The most recent one is dated 7th of June. >> > > > >> > > > In 1.0.1 snapshots repository, there are more recent build, but >> since >> > > 1.0.1 >> > > > is planned before JavaOne (this month I understand), I think it's >> safer >> > > to >> > > > target 1.0.1 a prerequisite for an application to be moved from >> Tomcat >> > to >> > > > TomEE+. >> > > > >> > > > Would you please update 1.0.1 snapshot (unless a RC is actually for >> > > current >> > > > wekk) ? >> > > > >> > > > Thanks, >> > > > Alex >> > > > >> > > > On Sat, Sep 8, 2012 at 10:01 AM, Romain Manni-Bucau >> > > > wrote: >> > > > >> > > > > I hope a rc next week. >> > > > > >> > > > > I wrote a post to get the snapshot: >> > > > > >> http://rmannibucau.wordpress.com/2012/05/23/getting-tomee-snapshot/ >> > > > > Le 8 sept. 2012 09:44, "Alex The Rocker" a >> > > écrit >> > > > : >> > > > > >> > > > > > Thanks guys, >> > > > > > >> > > > > > Based on David's answer and given that JavaOne begins end of >> > > > september, I >> > > > > > guess we can hope for a generally available 1.0.1 at this time, >> > > right? >> > > > > > >> > > > > > However, I see no 1.0.1-alpha or 1.0.1-beta on the official >> TomEE >> > > > > download >> > > > > > page. >> > > > > > >> > > > > > May I suggest that -even if not everything is ironed for 1.0.1- >> > you >> > > > guys >> > > > > > post on TomEE download page links to alpha/beta/release >> candidate >> > > > > (whatever >> > > > > > makes sense) builds of "current stable" TomEE and TomEE+, for >> the >> > > rest >> > > > of >> > > > > > us who aren't quite at ease with poking into source code >> > > repositories? >> > > > > (I'm >> > > > > > don't even know from where to start, I had a look to >> > > support/github... >> > > > > and >> > > > > > got lost) >> > > > > > >> > > > > > I love Eclipse download site, where nightly builds can be >> > downloaded >> > > at >> > > > > any >> > > > > > time, do we have something like this coming for TomEE/TomEE+ ? >> > > > > > >> > > > > > TomEE's great, I bet it will have more audience if such >> > improvements >> > > > > > (including a roadmap) could be provided on its home page. >> > > > > > >> > > > > > Alex >> > > > > > >> > > > > > >> > > > > > On Sat, Sep 8, 2012 at 9:07 AM, Romain Manni-Bucau < >> > > > > rmannibu...@gmail.com >> > > > > > >wrote: >> > > > > > >> > > > > > > We should do it when owb will use asm instead of javassist >> IMO (I >> > > > have >> > > > > > some
Re: CXF and CDI injection
Yeah using openejb-jar.xml in either pojo-deployment (attribute class-name) or ejb-deployment (attribute name) add cxf.jaxrs.providers = ... property Le 15 sept. 2012 22:24, "Luca Merolla" a écrit : > I'm trying to configure Jackson Json provider but I get this error: > > INFO: ServletContext initialized. > Sep 15, 2012 10:22:31 PM org.apache.openejb.observer.ObserverManager > fireEvent > SEVERE: error invoking > org.apache.openejb.observer.ObserverManager$Observer@38131650 > java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > > org.apache.openejb.observer.ObserverManager$Observer.invoke(ObserverManager.java:145) > at > > org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:69) > at > org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:105) > at > > org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:1102) > at > > org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:104) > at > > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) > at > > org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) > at > > org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401) > at > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168) > at > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) > at > > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) > at > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:662) > Caused by: java.lang.IllegalArgumentException: no @Path annotation on > com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider > at > org.apache.openejb.server.rest.RESTService.getAddress(RESTService.java:422) > at > > org.apache.openejb.server.rest.RESTService.deploySingleton(RESTService.java:315) > at > > org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:171) > at > > org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:51) > ... 20 more > > in my application class I have: > > @Override > public Set getSingletons() { > HashSet singletons = new HashSet(); > singletons.add(new com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider()); > > return singletons; > } > > Is there a better way to use the jackson as json provider? > > On Sat, Sep 15, 2012 at 12:42 PM, Romain Manni-Bucau > wrote: > > > Depend what they do but normally no > > Le 15 sept. 2012 12:34, "Luca Merolla" a écrit > : > > > > > I'll give a try. Could be that the problem is related to the fact that > I > > > have some @WebFilter configured? > > > > > > On Sat, Sep 15, 2012 at 12:09 PM, Romain Manni-Bucau > > > wrote: > > > > > > > Hmm weird, maybe you need to configure custom providers, i dont think > > we > > > > have example but i could provide one next week. > > > > > > > > Fyi here a sample of jaxws config > > > > > > > > > > > > > > http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/webservice-ws-with-resources-config/(use > > > > cxf.jaxrs.providers for your case) and here default providers > > > > > > > > > > > > > > http://svn.apache.org/repos/asf/openejb/trunk/openejb/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java(last > > > > method) > > > > Le 15 sept. 2012 10:41, "Luca Merolla" a > > écrit > > > : > > > > > > > > > I have tried last build snapshot from the 15th September, and with > > this > > > > > build I don't get the 404 but I get "415 Unsupported Media Type" > > > > > > > > > > Sep 15, 2012 10:36:10 AM org.apache.cxf.jaxrs.utils.JAXRSUtils > > > > > readFromMessageBody > > > > > WARNING: No message body reader has been found for request class > > > > > SecurityContext, ContentType : application/json > > > > > > > > > > I had @Produces({ MediaType.APPLICATION_JSON, > > MediaType.APPLICATION_XML > > > > }) > > > > > in the interface class, and I have moved them as well in the impl > > class > > > > but > > > > > it does not change anything. > > > > > When I'm sending the request I put these headers: > > > > > -Content-Type: application/json > > > > > -Accept
Re: CXF and CDI injection
I'm trying to configure Jackson Json provider but I get this error: INFO: ServletContext initialized. Sep 15, 2012 10:22:31 PM org.apache.openejb.observer.ObserverManager fireEvent SEVERE: error invoking org.apache.openejb.observer.ObserverManager$Observer@38131650 java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.openejb.observer.ObserverManager$Observer.invoke(ObserverManager.java:145) at org.apache.openejb.observer.ObserverManager.fireEvent(ObserverManager.java:69) at org.apache.openejb.loader.SystemInstance.fireEvent(SystemInstance.java:105) at org.apache.tomee.catalina.TomcatWebAppBuilder.afterStart(TomcatWebAppBuilder.java:1102) at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:104) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:168) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.IllegalArgumentException: no @Path annotation on com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider at org.apache.openejb.server.rest.RESTService.getAddress(RESTService.java:422) at org.apache.openejb.server.rest.RESTService.deploySingleton(RESTService.java:315) at org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:171) at org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:51) ... 20 more in my application class I have: @Override public Set getSingletons() { HashSet singletons = new HashSet(); singletons.add(new com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider()); return singletons; } Is there a better way to use the jackson as json provider? On Sat, Sep 15, 2012 at 12:42 PM, Romain Manni-Bucau wrote: > Depend what they do but normally no > Le 15 sept. 2012 12:34, "Luca Merolla" a écrit : > > > I'll give a try. Could be that the problem is related to the fact that I > > have some @WebFilter configured? > > > > On Sat, Sep 15, 2012 at 12:09 PM, Romain Manni-Bucau > > wrote: > > > > > Hmm weird, maybe you need to configure custom providers, i dont think > we > > > have example but i could provide one next week. > > > > > > Fyi here a sample of jaxws config > > > > > > > > > http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/webservice-ws-with-resources-config/(use > > > cxf.jaxrs.providers for your case) and here default providers > > > > > > > > > http://svn.apache.org/repos/asf/openejb/trunk/openejb/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java(last > > > method) > > > Le 15 sept. 2012 10:41, "Luca Merolla" a > écrit > > : > > > > > > > I have tried last build snapshot from the 15th September, and with > this > > > > build I don't get the 404 but I get "415 Unsupported Media Type" > > > > > > > > Sep 15, 2012 10:36:10 AM org.apache.cxf.jaxrs.utils.JAXRSUtils > > > > readFromMessageBody > > > > WARNING: No message body reader has been found for request class > > > > SecurityContext, ContentType : application/json > > > > > > > > I had @Produces({ MediaType.APPLICATION_JSON, > MediaType.APPLICATION_XML > > > }) > > > > in the interface class, and I have moved them as well in the impl > class > > > but > > > > it does not change anything. > > > > When I'm sending the request I put these headers: > > > > -Content-Type: application/json > > > > -Accept: application/json > > > > > > > > > > > > On Sat, Sep 15, 2012 at 1:19 AM, Luca Merolla < > luca.mero...@gmail.com > > > > >wrote: > > > > > > > > > I have tried to use @ApplicationPath and remove the cxf servlet, > > then i > > > > > moved @Path from the interface to the impl classes and my URI are > not > > > > > accessible anymore... I get 404 errors. > > > > > > > > > > I'll try tomorrow with the new build from the repository to see if > > > > changes > > > > >
Re: CXF and CDI injection
Depend what they do but normally no Le 15 sept. 2012 12:34, "Luca Merolla" a écrit : > I'll give a try. Could be that the problem is related to the fact that I > have some @WebFilter configured? > > On Sat, Sep 15, 2012 at 12:09 PM, Romain Manni-Bucau > wrote: > > > Hmm weird, maybe you need to configure custom providers, i dont think we > > have example but i could provide one next week. > > > > Fyi here a sample of jaxws config > > > > > http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/webservice-ws-with-resources-config/(use > > cxf.jaxrs.providers for your case) and here default providers > > > > > http://svn.apache.org/repos/asf/openejb/trunk/openejb/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java(last > > method) > > Le 15 sept. 2012 10:41, "Luca Merolla" a écrit > : > > > > > I have tried last build snapshot from the 15th September, and with this > > > build I don't get the 404 but I get "415 Unsupported Media Type" > > > > > > Sep 15, 2012 10:36:10 AM org.apache.cxf.jaxrs.utils.JAXRSUtils > > > readFromMessageBody > > > WARNING: No message body reader has been found for request class > > > SecurityContext, ContentType : application/json > > > > > > I had @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML > > }) > > > in the interface class, and I have moved them as well in the impl class > > but > > > it does not change anything. > > > When I'm sending the request I put these headers: > > > -Content-Type: application/json > > > -Accept: application/json > > > > > > > > > On Sat, Sep 15, 2012 at 1:19 AM, Luca Merolla > > >wrote: > > > > > > > I have tried to use @ApplicationPath and remove the cxf servlet, > then i > > > > moved @Path from the interface to the impl classes and my URI are not > > > > accessible anymore... I get 404 errors. > > > > > > > > I'll try tomorrow with the new build from the repository to see if > > > changes > > > > fixed it. > > > > > > > > On Fri, Sep 14, 2012 at 8:50 PM, Romain Manni-Bucau < > > > rmannibu...@gmail.com > > > > > wrote: > > > > > > > >> Just push a little change. If you can build a snapshot (i cant run > the > > > >> deployment now). Btw you shouldnt need cxf servlet if ypu use tomee > > > jaxrs > > > >> or tomee plus otherwise disable cxf. > > > >> > > > >> Either use OpenEJBRestServlet or use @applicationpath on your > > > application > > > >> child. > > > >> Le 14 sept. 2012 19:53, "Romain Manni-Bucau" > > > a > > > >> écrit : > > > >> > > > >> > Hmm maybe i messed my env but simply moving path annotation from > > > >> interface > > > >> > to impl worked for me (im rebuilding again to check if i didnt > have > > > >> local > > > >> > modif) > > > >> > Le 14 sept. 2012 18:25, "Luca Merolla" a > > > >> écrit : > > > >> > > > > >> >> My interface and implementation class are following somehow this > > > >> schema, > > > >> >> especially about the JAX-RS annotations. I have @Path @GET > > @Produces > > > in > > > >> >> the > > > >> >> interface and this lead to the NPE inside the impl class > > > >> >> > > > >> >> > > > >> >> > > > >> > > > > > > http://extreme-java.blogspot.it/2011/04/rest-webservice-using-cxf-first.html > > > >> >> > > > >> >> If I move the annotations to the impl class I get the "415 > > > Unsupported > > > >> >> Media Type" > > > >> >> > > > >> >> On Fri, Sep 14, 2012 at 6:17 PM, Luca Merolla < > > > luca.mero...@gmail.com > > > >> >> >wrote: > > > >> >> > > > >> >> > Now the request doesn't reach the method and I get: > > > >> >> > > > > >> >> > No message body reader has been found for request class > > > >> SecurityContext, > > > >> >> > ContentType : application/json > > > >> >> > > > > >> >> > > > > >> >> > On Fri, Sep 14, 2012 at 6:00 PM, Romain Manni-Bucau < > > > >> >> rmannibu...@gmail.com > > > >> >> > > wrote: > > > >> >> > > > > >> >> >> did it already work? > > > >> >> >> > > > >> >> >> honestly i'm not sure you can do it this way, cxf seems to > > expect > > > >> the > > > >> >> impl > > > >> >> >> to be decorated by jaxrs annotations > > > >> >> >> > > > >> >> >> *Romain Manni-Bucau* > > > >> >> >> *Twitter: @rmannibucau* > > > >> >> >> *Blog: http://rmannibucau.wordpress.com* > > > >> >> >> > > > >> >> >> > > > >> >> >> > > > >> >> >> > > > >> >> >> 2012/9/14 Luca Merolla > > > >> >> >> > > > >> >> >> > I have the @Path on the interface implemented by the class. > > > Anyway > > > >> >> I'll > > > >> >> >> > give a try with it, but the NPE is getting at > > > >> >> >> > > > > >> >> >> > Caused by: java.lang.NullPointerException at > > > >> >> >> > > > > >> >> >> > > > > >> >> >> > > > >> >> > > > >> > > > > > > org.pokernuvola.portone.service.LobbyResourceImpl.getUserCash(LobbyResourceImpl.java:35 > > > >> >> >> > > > > >> >> >> > where I have: > > > >> >> >> > > > > >> >> >> > userBO.getUserCash(sec.getUserPrincipal().getName()); > > > >> >> >> > > > > >> >> >> > and userBO is injected in this way: > > > >> >> >> > > > > >> >> >> > @Inject
Re: CXF and CDI injection
I'll give a try. Could be that the problem is related to the fact that I have some @WebFilter configured? On Sat, Sep 15, 2012 at 12:09 PM, Romain Manni-Bucau wrote: > Hmm weird, maybe you need to configure custom providers, i dont think we > have example but i could provide one next week. > > Fyi here a sample of jaxws config > > http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/webservice-ws-with-resources-config/(use > cxf.jaxrs.providers for your case) and here default providers > > http://svn.apache.org/repos/asf/openejb/trunk/openejb/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java(last > method) > Le 15 sept. 2012 10:41, "Luca Merolla" a écrit : > > > I have tried last build snapshot from the 15th September, and with this > > build I don't get the 404 but I get "415 Unsupported Media Type" > > > > Sep 15, 2012 10:36:10 AM org.apache.cxf.jaxrs.utils.JAXRSUtils > > readFromMessageBody > > WARNING: No message body reader has been found for request class > > SecurityContext, ContentType : application/json > > > > I had @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML > }) > > in the interface class, and I have moved them as well in the impl class > but > > it does not change anything. > > When I'm sending the request I put these headers: > > -Content-Type: application/json > > -Accept: application/json > > > > > > On Sat, Sep 15, 2012 at 1:19 AM, Luca Merolla > >wrote: > > > > > I have tried to use @ApplicationPath and remove the cxf servlet, then i > > > moved @Path from the interface to the impl classes and my URI are not > > > accessible anymore... I get 404 errors. > > > > > > I'll try tomorrow with the new build from the repository to see if > > changes > > > fixed it. > > > > > > On Fri, Sep 14, 2012 at 8:50 PM, Romain Manni-Bucau < > > rmannibu...@gmail.com > > > > wrote: > > > > > >> Just push a little change. If you can build a snapshot (i cant run the > > >> deployment now). Btw you shouldnt need cxf servlet if ypu use tomee > > jaxrs > > >> or tomee plus otherwise disable cxf. > > >> > > >> Either use OpenEJBRestServlet or use @applicationpath on your > > application > > >> child. > > >> Le 14 sept. 2012 19:53, "Romain Manni-Bucau" > a > > >> écrit : > > >> > > >> > Hmm maybe i messed my env but simply moving path annotation from > > >> interface > > >> > to impl worked for me (im rebuilding again to check if i didnt have > > >> local > > >> > modif) > > >> > Le 14 sept. 2012 18:25, "Luca Merolla" a > > >> écrit : > > >> > > > >> >> My interface and implementation class are following somehow this > > >> schema, > > >> >> especially about the JAX-RS annotations. I have @Path @GET > @Produces > > in > > >> >> the > > >> >> interface and this lead to the NPE inside the impl class > > >> >> > > >> >> > > >> >> > > >> > > > http://extreme-java.blogspot.it/2011/04/rest-webservice-using-cxf-first.html > > >> >> > > >> >> If I move the annotations to the impl class I get the "415 > > Unsupported > > >> >> Media Type" > > >> >> > > >> >> On Fri, Sep 14, 2012 at 6:17 PM, Luca Merolla < > > luca.mero...@gmail.com > > >> >> >wrote: > > >> >> > > >> >> > Now the request doesn't reach the method and I get: > > >> >> > > > >> >> > No message body reader has been found for request class > > >> SecurityContext, > > >> >> > ContentType : application/json > > >> >> > > > >> >> > > > >> >> > On Fri, Sep 14, 2012 at 6:00 PM, Romain Manni-Bucau < > > >> >> rmannibu...@gmail.com > > >> >> > > wrote: > > >> >> > > > >> >> >> did it already work? > > >> >> >> > > >> >> >> honestly i'm not sure you can do it this way, cxf seems to > expect > > >> the > > >> >> impl > > >> >> >> to be decorated by jaxrs annotations > > >> >> >> > > >> >> >> *Romain Manni-Bucau* > > >> >> >> *Twitter: @rmannibucau* > > >> >> >> *Blog: http://rmannibucau.wordpress.com* > > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> 2012/9/14 Luca Merolla > > >> >> >> > > >> >> >> > I have the @Path on the interface implemented by the class. > > Anyway > > >> >> I'll > > >> >> >> > give a try with it, but the NPE is getting at > > >> >> >> > > > >> >> >> > Caused by: java.lang.NullPointerException at > > >> >> >> > > > >> >> >> > > > >> >> >> > > >> >> > > >> > > > org.pokernuvola.portone.service.LobbyResourceImpl.getUserCash(LobbyResourceImpl.java:35 > > >> >> >> > > > >> >> >> > where I have: > > >> >> >> > > > >> >> >> > userBO.getUserCash(sec.getUserPrincipal().getName()); > > >> >> >> > > > >> >> >> > and userBO is injected in this way: > > >> >> >> > > > >> >> >> > @Inject private UserBO userBO; > > >> >> >> > > > >> >> >> > On Fri, Sep 14, 2012 at 5:28 PM, Romain Manni-Bucau > > >> >> >> > wrote: > > >> >> >> > > > >> >> >> > > BTW you didnt put @Path on the class (impl), i think that's > > the > > >> >> issue > > >> >> >> (i > > >> >> >> > > currently have some envrt issues but will try to test asap) > > >> >> >> > > > > >> >> >> > > > > >> >> >> > >
Re: CXF and CDI injection
Hmm weird, maybe you need to configure custom providers, i dont think we have example but i could provide one next week. Fyi here a sample of jaxws config http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/webservice-ws-with-resources-config/(use cxf.jaxrs.providers for your case) and here default providers http://svn.apache.org/repos/asf/openejb/trunk/openejb/server/openejb-cxf-rs/src/main/java/org/apache/openejb/server/cxf/rs/CxfRsHttpListener.java(last method) Le 15 sept. 2012 10:41, "Luca Merolla" a écrit : > I have tried last build snapshot from the 15th September, and with this > build I don't get the 404 but I get "415 Unsupported Media Type" > > Sep 15, 2012 10:36:10 AM org.apache.cxf.jaxrs.utils.JAXRSUtils > readFromMessageBody > WARNING: No message body reader has been found for request class > SecurityContext, ContentType : application/json > > I had @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) > in the interface class, and I have moved them as well in the impl class but > it does not change anything. > When I'm sending the request I put these headers: > -Content-Type: application/json > -Accept: application/json > > > On Sat, Sep 15, 2012 at 1:19 AM, Luca Merolla >wrote: > > > I have tried to use @ApplicationPath and remove the cxf servlet, then i > > moved @Path from the interface to the impl classes and my URI are not > > accessible anymore... I get 404 errors. > > > > I'll try tomorrow with the new build from the repository to see if > changes > > fixed it. > > > > On Fri, Sep 14, 2012 at 8:50 PM, Romain Manni-Bucau < > rmannibu...@gmail.com > > > wrote: > > > >> Just push a little change. If you can build a snapshot (i cant run the > >> deployment now). Btw you shouldnt need cxf servlet if ypu use tomee > jaxrs > >> or tomee plus otherwise disable cxf. > >> > >> Either use OpenEJBRestServlet or use @applicationpath on your > application > >> child. > >> Le 14 sept. 2012 19:53, "Romain Manni-Bucau" a > >> écrit : > >> > >> > Hmm maybe i messed my env but simply moving path annotation from > >> interface > >> > to impl worked for me (im rebuilding again to check if i didnt have > >> local > >> > modif) > >> > Le 14 sept. 2012 18:25, "Luca Merolla" a > >> écrit : > >> > > >> >> My interface and implementation class are following somehow this > >> schema, > >> >> especially about the JAX-RS annotations. I have @Path @GET @Produces > in > >> >> the > >> >> interface and this lead to the NPE inside the impl class > >> >> > >> >> > >> >> > >> > http://extreme-java.blogspot.it/2011/04/rest-webservice-using-cxf-first.html > >> >> > >> >> If I move the annotations to the impl class I get the "415 > Unsupported > >> >> Media Type" > >> >> > >> >> On Fri, Sep 14, 2012 at 6:17 PM, Luca Merolla < > luca.mero...@gmail.com > >> >> >wrote: > >> >> > >> >> > Now the request doesn't reach the method and I get: > >> >> > > >> >> > No message body reader has been found for request class > >> SecurityContext, > >> >> > ContentType : application/json > >> >> > > >> >> > > >> >> > On Fri, Sep 14, 2012 at 6:00 PM, Romain Manni-Bucau < > >> >> rmannibu...@gmail.com > >> >> > > wrote: > >> >> > > >> >> >> did it already work? > >> >> >> > >> >> >> honestly i'm not sure you can do it this way, cxf seems to expect > >> the > >> >> impl > >> >> >> to be decorated by jaxrs annotations > >> >> >> > >> >> >> *Romain Manni-Bucau* > >> >> >> *Twitter: @rmannibucau* > >> >> >> *Blog: http://rmannibucau.wordpress.com* > >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> >> 2012/9/14 Luca Merolla > >> >> >> > >> >> >> > I have the @Path on the interface implemented by the class. > Anyway > >> >> I'll > >> >> >> > give a try with it, but the NPE is getting at > >> >> >> > > >> >> >> > Caused by: java.lang.NullPointerException at > >> >> >> > > >> >> >> > > >> >> >> > >> >> > >> > org.pokernuvola.portone.service.LobbyResourceImpl.getUserCash(LobbyResourceImpl.java:35 > >> >> >> > > >> >> >> > where I have: > >> >> >> > > >> >> >> > userBO.getUserCash(sec.getUserPrincipal().getName()); > >> >> >> > > >> >> >> > and userBO is injected in this way: > >> >> >> > > >> >> >> > @Inject private UserBO userBO; > >> >> >> > > >> >> >> > On Fri, Sep 14, 2012 at 5:28 PM, Romain Manni-Bucau > >> >> >> > wrote: > >> >> >> > > >> >> >> > > BTW you didnt put @Path on the class (impl), i think that's > the > >> >> issue > >> >> >> (i > >> >> >> > > currently have some envrt issues but will try to test asap) > >> >> >> > > > >> >> >> > > > >> >> >> > > *Romain Manni-Bucau* > >> >> >> > > *Twitter: @rmannibucau* > >> >> >> > > *Blog: http://rmannibucau.wordpress.com* > >> >> >> > > > >> >> >> > > > >> >> >> > > > >> >> >> > > > >> >> >> > > 2012/9/14 Luca Merolla > >> >> >> > > > >> >> >> > > > Tested on a "vanilla" tomee, sorry again. > >> >> >> > > > > >> >> >> > > > * > >> >> >> > > > > >> >> >> > > > > >> >> >> > > > >> >> >> > > >> >> >> > >> >> > >> > http://www.fileconvoy.com/dfl.php?id=g99869b3ea6
Re: CXF and CDI injection
I have tried last build snapshot from the 15th September, and with this build I don't get the 404 but I get "415 Unsupported Media Type" Sep 15, 2012 10:36:10 AM org.apache.cxf.jaxrs.utils.JAXRSUtils readFromMessageBody WARNING: No message body reader has been found for request class SecurityContext, ContentType : application/json I had @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) in the interface class, and I have moved them as well in the impl class but it does not change anything. When I'm sending the request I put these headers: -Content-Type: application/json -Accept: application/json On Sat, Sep 15, 2012 at 1:19 AM, Luca Merolla wrote: > I have tried to use @ApplicationPath and remove the cxf servlet, then i > moved @Path from the interface to the impl classes and my URI are not > accessible anymore... I get 404 errors. > > I'll try tomorrow with the new build from the repository to see if changes > fixed it. > > On Fri, Sep 14, 2012 at 8:50 PM, Romain Manni-Bucau > wrote: > >> Just push a little change. If you can build a snapshot (i cant run the >> deployment now). Btw you shouldnt need cxf servlet if ypu use tomee jaxrs >> or tomee plus otherwise disable cxf. >> >> Either use OpenEJBRestServlet or use @applicationpath on your application >> child. >> Le 14 sept. 2012 19:53, "Romain Manni-Bucau" a >> écrit : >> >> > Hmm maybe i messed my env but simply moving path annotation from >> interface >> > to impl worked for me (im rebuilding again to check if i didnt have >> local >> > modif) >> > Le 14 sept. 2012 18:25, "Luca Merolla" a >> écrit : >> > >> >> My interface and implementation class are following somehow this >> schema, >> >> especially about the JAX-RS annotations. I have @Path @GET @Produces in >> >> the >> >> interface and this lead to the NPE inside the impl class >> >> >> >> >> >> >> http://extreme-java.blogspot.it/2011/04/rest-webservice-using-cxf-first.html >> >> >> >> If I move the annotations to the impl class I get the "415 Unsupported >> >> Media Type" >> >> >> >> On Fri, Sep 14, 2012 at 6:17 PM, Luca Merolla > >> >wrote: >> >> >> >> > Now the request doesn't reach the method and I get: >> >> > >> >> > No message body reader has been found for request class >> SecurityContext, >> >> > ContentType : application/json >> >> > >> >> > >> >> > On Fri, Sep 14, 2012 at 6:00 PM, Romain Manni-Bucau < >> >> rmannibu...@gmail.com >> >> > > wrote: >> >> > >> >> >> did it already work? >> >> >> >> >> >> honestly i'm not sure you can do it this way, cxf seems to expect >> the >> >> impl >> >> >> to be decorated by jaxrs annotations >> >> >> >> >> >> *Romain Manni-Bucau* >> >> >> *Twitter: @rmannibucau* >> >> >> *Blog: http://rmannibucau.wordpress.com* >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> 2012/9/14 Luca Merolla >> >> >> >> >> >> > I have the @Path on the interface implemented by the class. Anyway >> >> I'll >> >> >> > give a try with it, but the NPE is getting at >> >> >> > >> >> >> > Caused by: java.lang.NullPointerException at >> >> >> > >> >> >> > >> >> >> >> >> >> org.pokernuvola.portone.service.LobbyResourceImpl.getUserCash(LobbyResourceImpl.java:35 >> >> >> > >> >> >> > where I have: >> >> >> > >> >> >> > userBO.getUserCash(sec.getUserPrincipal().getName()); >> >> >> > >> >> >> > and userBO is injected in this way: >> >> >> > >> >> >> > @Inject private UserBO userBO; >> >> >> > >> >> >> > On Fri, Sep 14, 2012 at 5:28 PM, Romain Manni-Bucau >> >> >> > wrote: >> >> >> > >> >> >> > > BTW you didnt put @Path on the class (impl), i think that's the >> >> issue >> >> >> (i >> >> >> > > currently have some envrt issues but will try to test asap) >> >> >> > > >> >> >> > > >> >> >> > > *Romain Manni-Bucau* >> >> >> > > *Twitter: @rmannibucau* >> >> >> > > *Blog: http://rmannibucau.wordpress.com* >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > > 2012/9/14 Luca Merolla >> >> >> > > >> >> >> > > > Tested on a "vanilla" tomee, sorry again. >> >> >> > > > >> >> >> > > > * >> >> >> > > > >> >> >> > > > >> >> >> > > >> >> >> > >> >> >> >> >> >> http://www.fileconvoy.com/dfl.php?id=g99869b3ea67bb42614697354a49a4dafb6f061 >> >> >> > > > * >> >> >> > > > >> >> >> > > > >> >> >> > > > On Fri, Sep 14, 2012 at 4:55 PM, Romain Manni-Bucau >> >> >> > > > wrote: >> >> >> > > > >> >> >> > > > > no big luck neither : java.lang.ClassNotFoundException: >> >> >> > > > > org.pokernuvola.common.exceptions.WebException >> >> >> > > > > >> >> >> > > > > *Romain Manni-Bucau* >> >> >> > > > > *Twitter: @rmannibucau* >> >> >> > > > > *Blog: http://rmannibucau.wordpress.com* >> >> >> > > > > >> >> >> > > > > >> >> >> > > > > >> >> >> > > > > >> >> >> > > > > 2012/9/14 Luca Merolla >> >> >> > > > > >> >> >> > > > > > Sorry, I forgot to remove the dependecy from an external >> >> >> library. >> >> >> > > > > > This will work: >> >> >> > > > > > >> >> >> > > > > > * >> >> >> > > > > > >> >> >> > > > > > >> >> >> > > > > >> >> >> > > > >> >> >> > > >> >> >> > >> >> >> >> >>
Re: OpenEJB Mockito unit test
Zeeman, 'change-jaxws-url' is one such example which uses Arquillian for testing. Also we have https://svn.apache.org/repos/asf/openejb/trunk/openejb/arquillian/arquillian-tomee-moviefun-example in the arquillian module. (probably should be moved to examples module) -Vishwa On Sat, Sep 15, 2012 at 1:16 PM, Romain Manni-Bucau wrote: > Hmm maybe look for arquillian here > http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/ > Le 15 sept. 2012 07:07, "zeeman" a écrit : > > > Romain, > > > > Is there a simple project with Tomee that has a unit test with Arquillian > > working? > > So far I have not been able to find a complete example of an integration > > test using Tomee. > > > > > > > > -- > > View this message in context: > > > http://openejb.979440.n4.nabble.com/OpenEJB-Mockito-unit-test-tp4657142p4657433.html > > Sent from the OpenEJB User mailing list archive at Nabble.com. > > >
Re: OpenEJB Mockito unit test
Hmm maybe look for arquillian here http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/ Le 15 sept. 2012 07:07, "zeeman" a écrit : > Romain, > > Is there a simple project with Tomee that has a unit test with Arquillian > working? > So far I have not been able to find a complete example of an integration > test using Tomee. > > > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/OpenEJB-Mockito-unit-test-tp4657142p4657433.html > Sent from the OpenEJB User mailing list archive at Nabble.com. >