0
votes

I am developing an app with JAX-RS. The app is running fine on my local Liberty 8.5 Server. It fails when I package and push the server to bluemix. When I try to access my method I get the error:
"NetworkError: 415 Unsupported Media Type"

The system cannot find any method in the class that consumes null media type.

My web.xml looks like the following:

<!-- Enable features -->
<featureManager>
    <feature>jsp-2.2</feature>
    <feature>localConnector-1.0</feature>
    <feature>jdbc-4.0</feature>
    <feature>cdi-1.0</feature>
    <feature>json-1.0</feature>
    <feature>jaxrs-1.1</feature>
    <feature>jpa-2.0</feature>
</featureManager>

I searched a lot. Somebody had the same question said it's problem about jaxrs-1.1 which should be updated to jaxrs-2.0, but I don't know how to update it. It's default in Liberty 8.5 Server.

Can anybody help me? It's the first time I ask in stackover

1
Cam you please post the code for your resource? - Jeff Sloyer

1 Answers

0
votes

Sorry, I'm not good at English.

Somebody had the same question said it's problem about jaxrs-1.1 which should be updated to jaxrs-2.0, but I don't know how to update it. It's default in Liberty 8.5 Server.

I hope this will be useful for you.

Using JAX-RS 2 Client API in Liberty and Bluemix Removing JAX-RS feature from Websphere Application Server 8.5