You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Jon Anstey <ja...@gmail.com> on 2009/06/08 16:13:48 UTC

Re: Jersey Usage: how to generate the resourcedoc.xml file for Jersey RS app

The extra resource files should be generated by the maven-wadl-plugin in the
compile phase. So, running mvn compile should generate it for you. Does this
work?

Note that when running the web console with mvn jetty:run (as shown in the
wiki) this is invoked automatically.

On Sat, Jun 6, 2009 at 12:12 AM, alloyer <al...@gmail.com> wrote:

>
> When I deploy the camel-web app by running the org.apache.camel.web.Main
> class , it throws an exception:
>
> java.lang.RuntimeException: Could not load WadlGeneratorConfiguration,
> check
> the configuration of com.sun.jersey.config.property.WadlGeneratorConfig
> ...
> Caused by: java.lang.RuntimeException: Could not load wadl generators from
> wadlGeneratorDescriptions.
>        at
>
> com.sun.jersey.api.wadl.config.WadlGeneratorConfig.getWadlGenerator(WadlGeneratorConfig.java:155)
>        at
>
> com.sun.jersey.api.wadl.config.WadlGeneratorConfigLoader.loadWadlGeneratorsFromConfig(WadlGeneratorConfigLoader.java:76)
>        ... 23 more
> Caused by: java.lang.RuntimeException: The file '/resourcedoc.xml' does not
> exist in the classpath. It's loaded by the generator class, so if you use a
> relative filename it's relative to the generator class, otherwise you might
> want to load it via an absolute classpath reference like
> classpath:/somefile.xml
>
> I know it lost the resourcedoc.xml, so I copy one from a camel-web.war into
> the camel-web module in my workspace and it really works. But I don't know
> how to generate it?
> I saw in the camel-web war file there are four files:
> application-doc.xml
> application-grammars.xml
> resourcedoc.xml
> application.wadl
> But in my workspace, there are only two:
> application-doc.xml
> application-grammars.xml
>
> How are the other two generated?
> I deploy it through eclipse IDE, if I do by using Maven command, is there
> some command line that can be helpful for it?
> --
> View this message in context:
> http://www.nabble.com/Jersey-Usage%3A-how-to-generate-the-resourcedoc.xml-file-for-Jersey-RS-app-tp23898176p23898176.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Jon

http://janstey.blogspot.com/

Re: Jersey Usage: how to generate the resourcedoc.xml file for Jersey RS app

Posted by alloyer <al...@gmail.com>.
When runing it with mvn jetty:run, it really generate the other two files.
When I execute mvn jetty:run for the first time, another small problem
occurs, but I found it has described on:
http://www.nabble.com/Building-camel-failing-td22656916.html
I reset the development enviroment as the colleagues said on that page and
then it runs well. Thanks too all=)

Cheers,


janstey wrote:
> 
> The extra resource files should be generated by the maven-wadl-plugin in
> the
> compile phase. So, running mvn compile should generate it for you. Does
> this
> work?
> 
> Note that when running the web console with mvn jetty:run (as shown in the
> wiki) this is invoked automatically.
> 
> On Sat, Jun 6, 2009 at 12:12 AM, alloyer <al...@gmail.com> wrote:
> 
>>
>> When I deploy the camel-web app by running the org.apache.camel.web.Main
>> class , it throws an exception:
>>
>> java.lang.RuntimeException: Could not load WadlGeneratorConfiguration,
>> check
>> the configuration of com.sun.jersey.config.property.WadlGeneratorConfig
>> ...
>> Caused by: java.lang.RuntimeException: Could not load wadl generators
>> from
>> wadlGeneratorDescriptions.
>>        at
>>
>> com.sun.jersey.api.wadl.config.WadlGeneratorConfig.getWadlGenerator(WadlGeneratorConfig.java:155)
>>        at
>>
>> com.sun.jersey.api.wadl.config.WadlGeneratorConfigLoader.loadWadlGeneratorsFromConfig(WadlGeneratorConfigLoader.java:76)
>>        ... 23 more
>> Caused by: java.lang.RuntimeException: The file '/resourcedoc.xml' does
>> not
>> exist in the classpath. It's loaded by the generator class, so if you use
>> a
>> relative filename it's relative to the generator class, otherwise you
>> might
>> want to load it via an absolute classpath reference like
>> classpath:/somefile.xml
>>
>> I know it lost the resourcedoc.xml, so I copy one from a camel-web.war
>> into
>> the camel-web module in my workspace and it really works. But I don't
>> know
>> how to generate it?
>> I saw in the camel-web war file there are four files:
>> application-doc.xml
>> application-grammars.xml
>> resourcedoc.xml
>> application.wadl
>> But in my workspace, there are only two:
>> application-doc.xml
>> application-grammars.xml
>>
>> How are the other two generated?
>> I deploy it through eclipse IDE, if I do by using Maven command, is there
>> some command line that can be helpful for it?
>> --
>> View this message in context:
>> http://www.nabble.com/Jersey-Usage%3A-how-to-generate-the-resourcedoc.xml-file-for-Jersey-RS-app-tp23898176p23898176.html
>> Sent from the Camel Development mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Jon
> 
> http://janstey.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Jersey-Usage%3A-how-to-generate-the-resourcedoc.xml-file-for-Jersey-RS-app-tp23898176p23935671.html
Sent from the Camel Development mailing list archive at Nabble.com.


Re: Jersey Usage: how to generate the resourcedoc.xml file for Jersey RS app

Posted by James Strachan <ja...@gmail.com>.
BTW that exception is a PITA; we should probably patch Jersey so that
it just logs a warning, not an error - as the resourcedoc.xml file is
only used to show the documentation of the methods when viewing the
REST API at: http://locahost:8080/api - its not actually used by the
camel-web code per se.


2009/6/8 Jon Anstey <ja...@gmail.com>:
> The extra resource files should be generated by the maven-wadl-plugin in the
> compile phase. So, running mvn compile should generate it for you. Does this
> work?
>
> Note that when running the web console with mvn jetty:run (as shown in the
> wiki) this is invoked automatically.
>
> On Sat, Jun 6, 2009 at 12:12 AM, alloyer <al...@gmail.com> wrote:
>
>>
>> When I deploy the camel-web app by running the org.apache.camel.web.Main
>> class , it throws an exception:
>>
>> java.lang.RuntimeException: Could not load WadlGeneratorConfiguration,
>> check
>> the configuration of com.sun.jersey.config.property.WadlGeneratorConfig
>> ...
>> Caused by: java.lang.RuntimeException: Could not load wadl generators from
>> wadlGeneratorDescriptions.
>>        at
>>
>> com.sun.jersey.api.wadl.config.WadlGeneratorConfig.getWadlGenerator(WadlGeneratorConfig.java:155)
>>        at
>>
>> com.sun.jersey.api.wadl.config.WadlGeneratorConfigLoader.loadWadlGeneratorsFromConfig(WadlGeneratorConfigLoader.java:76)
>>        ... 23 more
>> Caused by: java.lang.RuntimeException: The file '/resourcedoc.xml' does not
>> exist in the classpath. It's loaded by the generator class, so if you use a
>> relative filename it's relative to the generator class, otherwise you might
>> want to load it via an absolute classpath reference like
>> classpath:/somefile.xml
>>
>> I know it lost the resourcedoc.xml, so I copy one from a camel-web.war into
>> the camel-web module in my workspace and it really works. But I don't know
>> how to generate it?
>> I saw in the camel-web war file there are four files:
>> application-doc.xml
>> application-grammars.xml
>> resourcedoc.xml
>> application.wadl
>> But in my workspace, there are only two:
>> application-doc.xml
>> application-grammars.xml
>>
>> How are the other two generated?
>> I deploy it through eclipse IDE, if I do by using Maven command, is there
>> some command line that can be helpful for it?
>> --
>> View this message in context:
>> http://www.nabble.com/Jersey-Usage%3A-how-to-generate-the-resourcedoc.xml-file-for-Jersey-RS-app-tp23898176p23898176.html
>> Sent from the Camel Development mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Cheers,
> Jon
>
> http://janstey.blogspot.com/
>



-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/