You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Udara Liyanage <ud...@wso2.com> on 2014/12/11 07:16:49 UTC

Can not create tenants from REST API

Hi,

I got errors when creating a tenant using REST API. I remember this kind of
error is fixed sometime back.

 curl -X POST -H "Content-Type: application/json" -d @request -k -v -u
admin:admin https://localhost:9443/api/tenants

{"Error":{ "errorCode": " 500", "errorMessage": " Internal server error"}}

Backend Error log :

[2014-12-11 11:43:39,865]  WARN {org.apache.cxf.jaxrs.utils.JAXRSUtils} - * No
message body reader has been found for request class TenantInfoBean,
ContentType : application/json.*


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: Can not create tenants from REST API

Posted by Udara Liyanage <ud...@wso2.com>.
Hi Manula.

{
      "admin":"admin",
      "firstname":"Frank",
      "lastname":"Myers",
      "adminPassword":"admin123",
      "tenantDomain":"udara.com",
      "email":"foo@bar.com",
      "active":"true"
}


On Thu, Dec 11, 2014 at 11:56 AM, Manula Chathurika Thantriwatte <
manulac@wso2.com> wrote:

> Hi Udara,
>
> Can you post the request JSON which you are using here.
>
> Thanks !
>
> On Thu, Dec 11, 2014 at 11:46 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi,
>>
>> I got errors when creating a tenant using REST API. I remember this kind
>> of error is fixed sometime back.
>>
>>  curl -X POST -H "Content-Type: application/json" -d @request -k -v -u
>> admin:admin https://localhost:9443/api/tenants
>>
>> {"Error":{ "errorCode": " 500", "errorMessage": " Internal server error"}}
>>
>> Backend Error log :
>>
>> [2014-12-11 11:43:39,865]  WARN {org.apache.cxf.jaxrs.utils.JAXRSUtils} - * No
>> message body reader has been found for request class TenantInfoBean,
>> ContentType : application/json.*
>>
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>
>
> --
> Regards,
> Manula Chathurika Thantriwatte
> Software Engineer
> WSO2 Inc. : http://wso2.com
> lean . enterprise . middleware
>
> email : manulac@wso2.com / manula@apache.org
> phone : +94 772492511
> blog : http://manulachathurika.blogspot.com/
>
>
>
>


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: Can not create tenants from REST API

Posted by Manula Chathurika Thantriwatte <ma...@wso2.com>.
Hi Udara,

Can you post the request JSON which you are using here.

Thanks !

On Thu, Dec 11, 2014 at 11:46 AM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi,
>
> I got errors when creating a tenant using REST API. I remember this kind
> of error is fixed sometime back.
>
>  curl -X POST -H "Content-Type: application/json" -d @request -k -v -u
> admin:admin https://localhost:9443/api/tenants
>
> {"Error":{ "errorCode": " 500", "errorMessage": " Internal server error"}}
>
> Backend Error log :
>
> [2014-12-11 11:43:39,865]  WARN {org.apache.cxf.jaxrs.utils.JAXRSUtils} - * No
> message body reader has been found for request class TenantInfoBean,
> ContentType : application/json.*
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
Regards,
Manula Chathurika Thantriwatte
Software Engineer
WSO2 Inc. : http://wso2.com
lean . enterprise . middleware

email : manulac@wso2.com / manula@apache.org
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/

Re: Can not create tenants from REST API

Posted by Dakshika Jayathilaka <da...@wso2.com>.
Hi Udara,

are you using 4.1.0- test branch ?

*Dakshika Jayathilaka*
Software Engineer
WSO2, Inc.
lean.enterprise.middleware
0771100911

On Thu, Dec 11, 2014 at 12:06 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi Dakshika,
>
> Still the same fate.
>
> On Thu, Dec 11, 2014 at 12:00 PM, Dakshika Jayathilaka <da...@wso2.com>
> wrote:
>
>> Try with this
>>
>> curl -X POST -H "Content-Type: application/json" -d @request -k -v -u
>> admin:admin https://localhost:9443/api/v4.1/tenants
>>
>> *Dakshika Jayathilaka*
>> Software Engineer
>> WSO2, Inc.
>> lean.enterprise.middleware
>> 0771100911
>>
>> On Thu, Dec 11, 2014 at 11:46 AM, Udara Liyanage <ud...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> I got errors when creating a tenant using REST API. I remember this kind
>>> of error is fixed sometime back.
>>>
>>>  curl -X POST -H "Content-Type: application/json" -d @request -k -v -u
>>> admin:admin https://localhost:9443/api/tenants
>>>
>>> {"Error":{ "errorCode": " 500", "errorMessage": " Internal server
>>> error"}}
>>>
>>> Backend Error log :
>>>
>>> [2014-12-11 11:43:39,865]  WARN {org.apache.cxf.jaxrs.utils.JAXRSUtils}
>>> - * No message body reader has been found for request class
>>> TenantInfoBean, ContentType : application/json.*
>>>
>>>
>>> --
>>>
>>> Udara Liyanage
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> lean. enterprise. middleware
>>>
>>> web: http://udaraliyanage.wordpress.com
>>> phone: +94 71 443 6897
>>>
>>
>>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>

Re: Can not create tenants from REST API

Posted by Udara Liyanage <ud...@wso2.com>.
Hi Dakshika,

Still the same fate.

On Thu, Dec 11, 2014 at 12:00 PM, Dakshika Jayathilaka <da...@wso2.com>
wrote:

> Try with this
>
> curl -X POST -H "Content-Type: application/json" -d @request -k -v -u
> admin:admin https://localhost:9443/api/v4.1/tenants
>
> *Dakshika Jayathilaka*
> Software Engineer
> WSO2, Inc.
> lean.enterprise.middleware
> 0771100911
>
> On Thu, Dec 11, 2014 at 11:46 AM, Udara Liyanage <ud...@wso2.com> wrote:
>
>> Hi,
>>
>> I got errors when creating a tenant using REST API. I remember this kind
>> of error is fixed sometime back.
>>
>>  curl -X POST -H "Content-Type: application/json" -d @request -k -v -u
>> admin:admin https://localhost:9443/api/tenants
>>
>> {"Error":{ "errorCode": " 500", "errorMessage": " Internal server error"}}
>>
>> Backend Error log :
>>
>> [2014-12-11 11:43:39,865]  WARN {org.apache.cxf.jaxrs.utils.JAXRSUtils} - * No
>> message body reader has been found for request class TenantInfoBean,
>> ContentType : application/json.*
>>
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: Can not create tenants from REST API

Posted by Dakshika Jayathilaka <da...@wso2.com>.
Try with this

curl -X POST -H "Content-Type: application/json" -d @request -k -v -u
admin:admin https://localhost:9443/api/v4.1/tenants

*Dakshika Jayathilaka*
Software Engineer
WSO2, Inc.
lean.enterprise.middleware
0771100911

On Thu, Dec 11, 2014 at 11:46 AM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi,
>
> I got errors when creating a tenant using REST API. I remember this kind
> of error is fixed sometime back.
>
>  curl -X POST -H "Content-Type: application/json" -d @request -k -v -u
> admin:admin https://localhost:9443/api/tenants
>
> {"Error":{ "errorCode": " 500", "errorMessage": " Internal server error"}}
>
> Backend Error log :
>
> [2014-12-11 11:43:39,865]  WARN {org.apache.cxf.jaxrs.utils.JAXRSUtils} - * No
> message body reader has been found for request class TenantInfoBean,
> ContentType : application/json.*
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>