Liberty App runs fine on local machine and throws 415 Unsupported Media Type on Bluemix - ibm-cloud

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

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

Related

Error when deploying legacy application to Websphere Liberty

I'm having issues when trying to deploy a somewhat legacy application to Websphere Liberty to facilitate development.
The application runs fine in regular Websphere Server 8.5.5 but won't start in Websphere Liberty. We have another legacy application based on mostly the same technologies/frameworks that runs ok. Unfortunatelöy we won't move to a newer platform anytime soon.
I have the following features configured for my server:
<featureManager>
<feature>localConnector-1.0</feature>
<feature>jpa-2.0</feature>
<feature>jsf-2.0</feature>
<feature>jdbc-4.0</feature>
<feature>servlet-3.0</feature>
<feature>ejbLite-3.1</feature>
<feature>cdi-1.0</feature>
<feature>appSecurity-1.0</feature>
</featureManager>
When I try to start it I get an exception during annotation processing:
[VARNING ] CWNEN0047W: Resource annotations on the fields of the xxx.xxx.EditCardGroupBacking class will be ignored. The annotations could not be obtained because of the exception : java.lang.NoClassDefFoundError: javax.resource.spi.IllegalStateException
whiich seems strange since this would be a part of the JRE?
I have searched various forums/pages for an answer but can't faind the answer. Hopefully someone here can be of assistance.
I'm happy to provide more details of configuration and setup if needed.
javax.resource.spi.IllegalStateException is part of the JCA (Java EE Connector Architecture) specification (see JavaDoc here). You do not get it automatically from Java. Try enabling the jca-1.6 feature,
<feature>jca-1.6</feature>
FYI - if anyone else hits this who has newer level Java EE features, they would instead need:
<feature>jca-1.7</feature>

How to test SAPUI5 apps locally in apache tomacat installed in eclipse?

I am working on SAPUI5 app which was created long back and running successfully. Now I need to do some enhancements and for that I downloaded the app and uploaded in eclipse.
Now when I am running this app locally - It is not working as the XMLHTTP Request says 404 (Not Found) when accessing the backend OData service.
URI is : /sap/opu/odata/sap/Z****SRV";
I understand that I need to add http://<host>:<port> before URI.
But I cannot change it in all the places. I found out that we can write <param-value> in web.xml file but I did and still it is not working
Can someone guide me how?

Mule IDE plugin for Eclipse url not working (http://dist.muleforge.org/mule-ide/updates-2.1.x/)

Mule id plugin Url is not working. Can any one help to get an alternate url for the same plugin.
http://dist.muleforge.org/mule-ide/updates-2.1.x/
This url is also mentioned in the below tutorial.
http://www.mulesoft.org/documentation-3.2/display/32X/Installing+Mule+ESB+3+and+the+Mule+IDE
Below is the error which i am receiving after accessing this url in browser.
Network Error (tcp_error)
A communication error occurred: "Connection refused"
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.
For assistance, contact your network support team.
Mule version 2X uses the url :- http://dist.muleforge.org/mule-ide/updates-2.1.x/ and for Mule version 3X the url :- http://www.mulesoft.org/documentation-3.2/display/32X/Installing+Mule+ESB+3+and+the+Mule+IDE is being used.
You need to check the version of Mule you are using and need to use the url that matches your Mule version.
If you are using Mule Enterprise edition you can take support from the MuleSoft Support, else if you are not using Enterprise you can post the issue in their forum
I seriously doubt there is still support for the Mule IDE, it was deprecated in favour of Mule Studio (that then became Anypoint Studio).
Do you really need to do a new development on Mule 2.x? If not, please consider using the much better Anypoint studio. If you need to stick to the 2.x version, you could just use a vanilla version of eclipse that will take care of the the autocompletion and then export to the apps directory of a running mule container for a hot deployment.

Error Parsing WSDL - Worklight 6.1 - Backend Discovery Service

Testing the new backend discovery feature in WL6.1 used for a web service (SOAP) connection, we found a wrong import procedures from WSDL parsing. In particular, for each procedure offered by the SOAP server and exposed in the related WSDL the backend discovery service found only one input/output parameter although the procedures are composed of more than one input parameter. The problem seems to be a misinterpretation of the WSDL associated with the SOAP server.
thanks,
Here the WSDL:
https://dl.dropboxusercontent.com/u/15425546/Ws_StoreSurfer.xml
Is seems that WL v6.1 indeed has a problem with muli-parts and showing only one part of the input/output of a procedure.
Tested it with a new version of WL (not yet released) and it seems like the problem has already been addressed (see below). You will therefore get it solved in the next update of your Worklight Studio.
If you are an IBM business partner or customer you can open a PMR and request an intermittent iFix.

Netbeans Web Service Client not found

I've always used eclipse before, but I'm using Netbeans for the first time because of it's integration with Web Service clients.
However, after following multiple tutorials, the way to add a web service client is to:
https://netbeans.org/kb/docs/websvc/flower_swing.html
Make a new project
Right click on your project, New->Other->Other->Web Service Client
However, I do not have the web service client option available, not sure what I am doing wrong.
Please mention the net beans version you have. You should use newer version of the IDE to use latest features.
For other developers who will face this problem like me, I will leave my answer here.
I'm currently using Apache NetBeans IDE 11.0 and it's in Web Services -> Web Service Client. If you still cannot find it, just use filter feature. I found it with filter.