You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Thomas Papke <th...@icw.de> on 2016/06/01 12:41:28 UTC

Question regarding jax-rs-catalog.xml

Hello all,

we have very simple JaxRS Service, declared similar to this (build with CXF 3.1.5):
*********

    <jaxrs:server id="abc" address="/" bus="cxfRestBus">
        <jaxrs:serviceBeans>
            <ref bean="abcResource"/>
        </jaxrs:serviceBeans>
        <jaxrs:schemaLocations>
            <jaxrs:schemaLocation>classpath:/schema/my-schema.xsd</jaxrs:schemaLocation>
        </jaxrs:schemaLocations>
        <jaxrs:providers>
            <bean class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">
                <property name="marshallerProperties">
                    <map>
                        <entry key="jaxb.formatted.output">
                            <value type="java.lang.Boolean">true</value>
                        </entry>
                    </map>
                </property>
            </bean>
        </jaxrs:providers>
    </jaxrs:server>

*********

The REST service itself is working fine, but we have the following warning in the logfile:
WARN  [main] org.apache.cxf.jaxrs.utils.ResourceUtils(509) - No resource classpath:META-INF/jax-rs-catalog.xml is available

I have read something regarding the background of the catalog. Our XSD is currently self-contained and does not import external schema's.
So from my understanding I don't have need for a catalog?

Is there a flag to disable catalog usage for this service or shall I add a "empty" catalog file to my application?

Thank you,
Kind regards,
Thomas


InterComponentWare AG:
Vorstand: Peter Kirschbauer (Vors.), Matthias Gl?ck
Aufsichtsratsvors.: Prof. Dr. Christof Hettich
Unternehmenssitz: 69190 Walldorf, Altrottstra?e 31
AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516


Re: Question regarding jax-rs-catalog.xml

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Thomas

The runtime is trying to load a catalog from a default location if a 
custom location is not set. I agree in this case it does not make sense 
to WARN if no catalog can be found, I'll update the code shortly.

Cheers, Sergey
On 01/06/16 13:41, Thomas Papke wrote:
> Hello all,
>
> we have very simple JaxRS Service, declared similar to this (build with CXF 3.1.5):
> *********
>
>      <jaxrs:server id="abc" address="/" bus="cxfRestBus">
>          <jaxrs:serviceBeans>
>              <ref bean="abcResource"/>
>          </jaxrs:serviceBeans>
>          <jaxrs:schemaLocations>
>              <jaxrs:schemaLocation>classpath:/schema/my-schema.xsd</jaxrs:schemaLocation>
>          </jaxrs:schemaLocations>
>          <jaxrs:providers>
>              <bean class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">
>                  <property name="marshallerProperties">
>                      <map>
>                          <entry key="jaxb.formatted.output">
>                              <value type="java.lang.Boolean">true</value>
>                          </entry>
>                      </map>
>                  </property>
>              </bean>
>          </jaxrs:providers>
>      </jaxrs:server>
>
> *********
>
> The REST service itself is working fine, but we have the following warning in the logfile:
> WARN  [main] org.apache.cxf.jaxrs.utils.ResourceUtils(509) - No resource classpath:META-INF/jax-rs-catalog.xml is available
>
> I have read something regarding the background of the catalog. Our XSD is currently self-contained and does not import external schema's.
> So from my understanding I don't have need for a catalog?
>
> Is there a flag to disable catalog usage for this service or shall I add a "empty" catalog file to my application?
>
> Thank you,
> Kind regards,
> Thomas
>
>
> InterComponentWare AG:
> Vorstand: Peter Kirschbauer (Vors.), Matthias Gl?ck
> Aufsichtsratsvors.: Prof. Dr. Christof Hettich
> Unternehmenssitz: 69190 Walldorf, Altrottstra?e 31
> AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516
>
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/