WSO2 IOTS: HTTP Status 500 - Cannot call method "getUIPermissions" of undefined - wso2

when I trying to start WSO2 IoTs Server and go to https://localhost:9443/devicemgt, I'm getting the error
HTTP Status 500 - Cannot call method getUIPermissions of undefined.
I'm using MySQL and run WSO2 IoTs alone on localhost.
Carbon Logs here

This issue is raised when you try to start the pack with a -Dsetup. You can execute the database scripts that are available in the dbscripts folder manually and then run the product. This issue has been fixed after the alpha release.

Related

WSO2 BPS - BPMN API not working

I'm trying to use the REST API for BPMN following the documentation, but even the most basic requests such as
https://localhost:9443/bpmn/repository/deployments
or
https://localhost:9443/bpmn/repository/process-definitions
return the following error
{"statusCode":400,"errorMessage":"javax.ws.rs.InternalServerErrorException.validate(Ljavax/ws/rs/core/Response;Ljavax/ws/rs/core/Response$Status;)Ljavax/ws/rs/core/Response;"}
I'm using BPS server 3.5.1 with Oracle JDK 1.8.0_77, as it was downloaded, with the only addition of a BPMN process to test its dashboard. The service is run as root (via sudo)
What can be done to fix this?
Thanks
I tried it on postman and it works perfectly. Please choose the correct request type (GET, POST, PUT or DELETE), if not the following error will be thrown on the server side:
javax.ws.rs.ClientErrorException.validate(Ljavax/ws/rs/core/Response;Ljavax/ws/rs/core/Response$Status$Family;)Ljavax/ws/rs/core/Response;

Configuring both WSO2 IS and ESB in Linux box and facing errors while starting IS server

Here is a snippet of the exception:
Caused by: org.wso2.carbon.user.core.UserStoreException: Database Error - Database may be already in use: "Locked by another process".
I am trying an example given in this url:
https://docs.wso2.com/display/IS500/2-legged+OAuth+for+Securing+a+RESTful+Service
steps:
copied both wso2 esb and wso2 is to linux box
started wso2 esb using ./wso2Server.sh --start. can access the management console.
trying to start wso2 is using ./wso2server.sh from IS_HOME/bin..And received this error.
Note: Still I can bring up the IS management console.

Error occurred while getting the APIs

I locally installed WSO2 API manager and create API but API list is not coming at WSO2 dashboard . It displaying an error i.e
[2015-11-03 18:47:29,781] ERROR - AsyncDataPublisher Reconnection failed for for tcp://localhost:7614"
index:jag org.wso2.carbon.apimgt.api.APIManagementException: Error occurred while getting the APIs
Version of API manager is 1.9.1
I can't get any API statistics
This issue can be occurred when you have not configured information according to the Port Offset value. As an example if the port offset value of BAM instance is 3,need to configure as follows in property in the api-manager.xml which is in /repository/conf/ folder.
<ThriftPort>7614</ThriftPort>
<BAMServerURL>{tcp://<IP Address>:7614/}</BAMServerURL>
Also make sure to restart both servers.

WSO2 API Key Manager

I am configuring our API Manager, but running into troubles authenticating via OAuth, seems to be an issue with the API Key Manager. I haven't dug into it yet, but does this come with the API Manager (as I have assumed) or is this a separate installation?
I had the same issue when using the wso2 api manager on a Amazon hosted machine, turn out that Thrift was not working correctly because some problem with multicasting and broadcasting.
What I did to get it working was to switch from ThriftClient to WSClient. If you have a huge amount of requests coming in then Thrift is the recommended solution from wso2 but in any "normal" case you will not have any differences between thrift and WS.
Here is how you switch:
Shut down the API Manager
Open up <api manager install dir>\repository\conf\api-manager.xml
Find ThriftClient
Change this to
<KeyValidatorClientType>WSClient</KeyValidatorClientType>
Start the API Manager
You may get some Warnings while starting up but, try it before you jump to the conclusion that it doesn't work.
Hope it helps!
you can use APIM manager product in a distributed setup as keymanger,gateway,store,publisher..but all functionality come in a single distribution.. ..
Go through the documentation for further guides
I was facing the same issue. Everything started when I created my own jks in order to use SSL without a self-signed certificate. I successfully created the jks and changed it in the carbon file. When I started the server, everything seemed ok; but when I used SOAPUI to test an API call, I got this (in the logs of the api manager):
APIAuthenticationHandler API authentication failure due to Unclassified Authentication Failure
I started digging what was the problem by enabling Debug level in the log4j.properties file, and then tried again a tested with SOAPUI and I got:
APISecurityException: Could not connect to <my api ip address> on port 10397
Then, I read the comment of OneMuppet and I checked that file and I found that the Thrift config has a host option, so I uncommented it:
<KeyValidatorClientType>ThriftClient</KeyValidatorClientType>
<ThriftClientPort>10397</ThriftClientPort>
<ThriftClientConnectionTimeOut>10000</ThriftClientConnectionTimeOut>
<ThriftServerPort>10397</ThriftServerPort>
This Line --> <ThriftServerHost>localhost</ThriftServerHost>
<EnableThriftServer>true</EnableThriftServer>
Save, restarted the server and everything start working correctly.
I got the same below issue after my installation, when i try to invoke the api service it is throwing below error:
900900 Unclassified Authentication Failure Error while accessing backend services for API key validation
After some random checks i have seen the axis2.xml file in /repository/conf/axis2 there it is refering a differnt ip's instead. I change these ip's to my local ip and restarted. The issue is resolved now.
I was facing the same issue. when I was trying to setup API Manager as an API Gateway in a different machine as per the steps given here,
https://docs.wso2.com/display/AM250/Publish+through+Multiple+API+Gateways
Once the setup is done and when I am trying to use this gateway URL, I was getting the below response,
{"fault":{"code":900900,"message":"Unclassified Authentication Failure","description":"Error while accessing backend services for API key validation"}}
After changing the KeyValidatorClientType value to WSClient from ThriftClient on the <api manager install dir>\repository\conf\api-manager.xml
It started working fine. And I was able to get the expected response.
If you changed the admin password, then you also have to update the repository/conf/api-manager.xml file with the new password. The 2 places I have changed (so far) are:
<AuthManager>
and
<APIKeyManager>
but there are other admin usernames in that file. No doubt, I'll get to them....

Add service reference to ESB toolkit and BizTalk

I have installed BizTalk together with ESB toolkit and ESB services are up and running according to IIS. I want to connect to these services from a simple WinForm application.
When I try to add this service reference in my project in visual studio
localhost/ESB.BizTalkOperationsService/Operations.asmx
I get the following error message:
There was an error downloading 'localhost/ESB.BizTalkOperationsService/Operations.asmx/_vti_bin/ListData.svc/$metadata'.
The request failed with HTTP status 404: Not Found.
Metadata contains a reference that cannot be resolved: 'localhost/ESB.BizTalkOperationsService/Operations.asmx'.
The remote server returned an unexpected response: (405) Method Not Allowed.
The remote server returned an error: (405) Method Not Allowed.
If the service is defined in the current solution, try building the solution and adding the service reference again."
I can browse to:
localhost/ESB.BizTalkOperationsService
but not to the service directly:
localhost/ESB.BizTalkOperationsService/Operations.asmx
How do I communicate with this ESB service?
The problem was that the webservice had been incorrectly installed. I managed to fix this problem by unistalling and reinstalling according to this tutorial
http://geekswithblogs.net/BizTalkUnleashed/archive/2012/11/07/biztalk-server-2013-beta-on-windows-8-visual-studio-2012.aspx