From: Seref A. <ser...@ku...> - 2011-11-22 17:39:54
|
Funny, this type appears in google searches under the jaxrs provider api, but the jars I get via maven does not seem to contain this type. Using Eclipse, I search for the type and it does not appear to be under any other jar either. Where would it normally be? On Tue, Nov 22, 2011 at 5:06 PM, Bill Burke <bb...@re...> wrote: > Sry, thought "compile" meant something different. The testsuite passes so > I'm not sure what your problem is. Maybe try manually registering the Yaml > provider? > > org.jboss.resteasy.plugins.**providers.YamlProvider > > Then we can figure it out from there. BTW, I think I do need to change > the JAXB matching parameters and will fix it for 2.3: > > https://issues.jboss.org/**browse/RESTEASY-626<https://issues.jboss.org/browse/RESTEASY-626> > > > > On 11/22/11 12:00 PM, Seref Arikan wrote: > >> Yes, I've added that, but that is the default anyway. All the other >> dependencies for resteasy have the same scope. Should this be something >> else? From >> http://maven.apache.org/**guides/introduction/** >> introduction-to-dependency-**mechanism.html#Dependency_**Scope<http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope> >> : >> "*compile* >> >> This is the default scope, used if none is specified. Compile >> dependencies are available in all classpaths of a project. Furthermore, >> those dependencies are propagated to dependent projects." >> >> Many thanks for your kind feedback Bill, I'm sure I must be missing >> something obvious here. >> >> >> On Tue, Nov 22, 2011 at 4:56 PM, Bill Burke <bb...@re... >> <mailto:bb...@re...>> wrote: >> >> Your scope is "compile" for your dependency. >> >> >> On 11/22/11 11:33 AM, Seref Arikan wrote: >> >> I have >> >> <!-- YAML SUPPORT --> >> <dependency> >> <groupId>org.yaml</groupId> >> <artifactId>snakeyaml</__**artifactId> >> >> <version>1.8</version> >> <type>jar</type> >> <scope>compile</scope> >> </dependency> >> >> in my pom. Based on documentation, is there anything else I need >> to do? >> Both json and xml work fine by only adding their dependency >> sections to >> pom. I'm doing what >> http://docs.jboss.org/__**resteasy/docs/2.2.1.GA/__** >> userguide/html_single/#Built__**_in_YAML_Provider<http://docs.jboss.org/__resteasy/docs/2.2.1.GA/__userguide/html_single/#Built___in_YAML_Provider> >> >> <http://docs.jboss.org/**resteasy/docs/2.2.1.GA/** >> userguide/html_single/#Built_**in_YAML_Provider<http://docs.jboss.org/resteasy/docs/2.2.1.GA/userguide/html_single/#Built_in_YAML_Provider> >> > >> tells me to do. (Or so I hope) >> >> On Tue, Nov 22, 2011 at 4:28 PM, Bill Burke <bb...@re... >> <mailto:bb...@re...> >> <mailto:bb...@re... <mailto:bb...@re...>>> wrote: >> >> Now it looks like you don't have the yaml provider included. >> >> >> On 11/22/11 11:19 AM, Seref Arikan wrote: >> >> Hi Bill, >> removing jaxb provider bit results with the following >> error: >> >> *type* Status report >> >> *message* _Could not find MessageBodyWriter for response >> object >> of type: >> uk.ac.ucl.chime.bosphorus.____**messages.ArchetypesList of >> >> media type: >> >> >> text/x-yaml_ >> >> *description* _The server encountered an internal error >> (Could >> not find >> MessageBodyWriter for response object of type: >> uk.ac.ucl.chime.bosphorus.____**messages.ArchetypesList of >> >> media type: >> >> text/x-yaml) that prevented it from fulfilling this >> request._ >> >> >> >> Does it make any sense? >> >> Regards >> Seref >> >> >> >> On Tue, Nov 22, 2011 at 4:04 PM, Bill Burke >> <bb...@re... <mailto:bb...@re...> >> <mailto:bb...@re... <mailto:bb...@re...>> >> <mailto:bb...@re... <mailto:bb...@re...> >> <mailto:bb...@re... <mailto:bb...@re...>>>> wrote: >> >> Hmm, its probably conflicting with the JAXB >> provider. If >> you remove the >> resteasy-jaxb-provider it will probably work, but that >> probably not the >> behavior you want. Thats something that will have >> to be fixed. >> >> On 11/22/11 10:05 AM, Seref Arikan wrote: >> > Greetings, >> > I am using RestEasy 2.2.1.GA <http://2.2.1.GA> <http://2.2.1.GA >> > >> <http://2.2.1.GA> <http://2.2.1.GA> >> >> and both json and xml >> > serialization works just fine. However, I wanted to see the yaml >> output >> > today, and based on the documentation, I've added the necessary >> > dependency to my .pom file. >> > >> > I'm getting the following exception when I try to call a test >> method: >> > >> > *type* Status report >> > >> > *message* _Could not find JAXBContextFinder for media type: >> text/x-yaml_ >> > >> > *description* _The server encountered an internal error (Could >> not find >> > JAXBContextFinder for media type: text/x-yaml) that prevented >> it from >> > fulfilling this request._ >> > >> > >> > The method I'm calling is defined as: >> > >> > @GET >> > @Path("getarchetypeslistyaml") >> > @Produces("text/x-yaml") >> > public ArchetypesList getArchetypesListyaml(){ >> > return getArchetypesListJAXB(); >> > } >> > >> > If I change the Produces to json or xml it works just fine. >> Dependencies >> > section of my pom.xml is given below. I'd appreciate if you >> could >> point >> > out what I'm missing here. >> > >> > Kind regards >> > Seref >> > >> > Dependency section : >> > >> > <dependency> >> > <groupId>org.jboss.resteasy</_**___groupId> >> > <artifactId>resteasy-jaxrs</__**__artifactId> >> >> >> > <version>2.2.1.GA <http://2.2.1.GA> <http://2.2.1.GA> >> <http://2.2.1.GA> >> <http://2.2.1.GA></version> >> >> > <type>jar</type> >> > <scope>compile</scope> >> > </dependency> >> > <!-- resteasy JAXB support --> >> > <dependency> >> > <groupId>org.jboss.resteasy</_**___groupId> >> > <artifactId>resteasy-jaxb-____**provider</artifactId> >> >> >> > <version>2.2.1.GA <http://2.2.1.GA> <http://2.2.1.GA> >> <http://2.2.1.GA> >> <http://2.2.1.GA></version> >> >> > </dependency> >> > <!-- resteasy Jackson support --> >> > <dependency> >> > <groupId>org.jboss.resteasy</_**___groupId> >> > <artifactId>resteasy-jackson-_**___provider</artifactId> >> >> >> > <version>2.2.1.GA <http://2.2.1.GA> <http://2.2.1.GA> >> <http://2.2.1.GA> >> <http://2.2.1.GA></version> >> >> > <type>jar</type> >> > <scope>compile</scope> >> > </dependency> >> > >> > <!-- YAML SUPPORT --> >> > <dependency> >> > <groupId>org.yaml</groupId> >> > <artifactId>snakeyaml</____**artifactId> >> > <version>1.8</version> >> > </dependency> >> > >> > >> > >> > >> > >> >> >> ------------------------------**____--------------------------** >> --__--__------------------ >> >> >> > All the data continuously generated in your IT infrastructure >> > contains a definitive record of customers, application >> performance, >> > security threats, fraudulent activity, and more. Splunk takes >> this >> > data and makes sense of it. IT sense. And common sense. >> > http://p.sf.net/sfu/splunk-___**_novd2d<http://p.sf.net/sfu/splunk-____novd2d> >> <http://p.sf.net/sfu/splunk-__**novd2d<http://p.sf.net/sfu/splunk-__novd2d> >> > >> <http://p.sf.net/sfu/splunk-__**novd2d<http://p.sf.net/sfu/splunk-__novd2d> >> <http://p.sf.net/sfu/splunk-**novd2d<http://p.sf.net/sfu/splunk-novd2d> >> >> >> > >> > >> > >> > ______________________________**_____________________ >> > Resteasy-developers mailing list >> > Resteasy-developers@lists.__so**__urceforge.net<http://so__urceforge.net> >> <http://sourceforge.net> >> <mailto:Resteasy-developers@__**lists.sourceforge.net<http://lists.sourceforge.net> >> <mailto:Resteasy-developers@**lists.sourceforge.net<Res...@li...> >> >> >> <mailto:Resteasy-developers@ >> <mailto:Resteasy-developers@>_**___lists.sourceforge.net >> <http://lists.sourceforge.net> >> <mailto:Resteasy-developers@__**lists.sourceforge.net<http://lists.sourceforge.net> >> <mailto:Resteasy-developers@**lists.sourceforge.net<Res...@li...> >> >>> >> >> > >> https://lists.sourceforge.net/**____lists/listinfo/resteasy-__** >> __developers<https://lists.sourceforge.net/____lists/listinfo/resteasy-____developers> >> <https://lists.sourceforge.**net/__lists/listinfo/resteasy-** >> __developers<https://lists.sourceforge.net/__lists/listinfo/resteasy-__developers> >> > >> >> <https://lists.sourceforge.__**net/lists/listinfo/resteasy-__** >> developers >> >> <https://lists.sourceforge.**net/lists/listinfo/resteasy-** >> developers<https://lists.sourceforge.net/lists/listinfo/resteasy-developers> >> >> >> >> -- >> Bill Burke >> JBoss, a division of Red Hat >> http://bill.burkecentral.com >> >> >> >> ------------------------------**____--------------------------** >> --__--__------------------ >> >> >> All the data continuously generated in your IT >> infrastructure >> contains a definitive record of customers, application >> performance, >> security threats, fraudulent activity, and more. Splunk >> takes this >> data and makes sense of it. IT sense. And common sense. >> http://p.sf.net/sfu/splunk-___**_novd2d<http://p.sf.net/sfu/splunk-____novd2d> >> <http://p.sf.net/sfu/splunk-__**novd2d<http://p.sf.net/sfu/splunk-__novd2d> >> > >> <http://p.sf.net/sfu/splunk-__**novd2d<http://p.sf.net/sfu/splunk-__novd2d> >> <http://p.sf.net/sfu/splunk-**novd2d<http://p.sf.net/sfu/splunk-novd2d> >> >> >> ______________________________**_____________________ >> Resteasy-developers mailing list >> Resteasy-developers@lists.__so**__urceforge.net<http://so__urceforge.net> >> <http://sourceforge.net> >> <mailto:Resteasy-developers@__**lists.sourceforge.net<http://lists.sourceforge.net> >> <mailto:Resteasy-developers@**lists.sourceforge.net<Res...@li...> >> >> >> <mailto:Resteasy-developers@ >> <mailto:Resteasy-developers@>_**___lists.sourceforge.net >> <http://lists.sourceforge.net> >> <mailto:Resteasy-developers@__**lists.sourceforge.net<http://lists.sourceforge.net> >> <mailto:Resteasy-developers@**lists.sourceforge.net<Res...@li...> >> >>> >> https://lists.sourceforge.net/**____lists/listinfo/resteasy-__** >> __developers<https://lists.sourceforge.net/____lists/listinfo/resteasy-____developers> >> <https://lists.sourceforge.**net/__lists/listinfo/resteasy-** >> __developers<https://lists.sourceforge.net/__lists/listinfo/resteasy-__developers> >> > >> >> <https://lists.sourceforge.__**net/lists/listinfo/resteasy-__** >> developers >> >> <https://lists.sourceforge.**net/lists/listinfo/resteasy-** >> developers<https://lists.sourceforge.net/lists/listinfo/resteasy-developers> >> >> >> >> >> >> -- >> Bill Burke >> JBoss, a division of Red Hat >> http://bill.burkecentral.com >> >> >> >> -- >> Bill Burke >> JBoss, a division of Red Hat >> http://bill.burkecentral.com >> >> >> > -- > Bill Burke > JBoss, a division of Red Hat > http://bill.burkecentral.com > |