stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Udara Liyanage <ud...@wso2.com>
Subject Re: [Testing] Stratos 4.1.0 Alpha - database error deploying cartridge - Table 'userstore.IDN_OAUTH_CONSUMER_APPS' doesn't exist -schema change ?
Date Mon, 15 Dec 2014 05:17:36 GMT
Hi,

You have to secute below database queries
within tools/stratos-installer/resources in addition to mysql.sql in the
under the same directory.
application-mysql.sql
security-mysql.sql

I have added them to setup.sh also. Please take an update from the
4.1.0-test branch.

On Mon, Dec 15, 2014 at 10:05 AM, Udara Liyanage <udara@wso2.com> wrote:
>
> Hi Martin,
>
> This is due to that you have not executed databases related to oAuth added
> recently. I will point you to the database location soon.
>
> On Mon, Dec 15, 2014 at 9:50 AM, Martin Eppel (meppel) <meppel@cisco.com>
> wrote:
>>
>>  [Resending it with a slightly different Subject]
>>
>>
>>
>> I run into the following issue when I tried to deploy a cartridge (based
>> on Friday’s code from master):
>>
>>
>>
>> - looks like the database schema has changed and a new field was added.
>>
>> *My question is, how is this supposed to work, do we need to apply the
>> new schema when stratos is installed or is it applied automatically when
>> stratos starts up the first time ? *
>>
>> *TID: [0] [STRATOS] [2014-12-12 22:45:38,977] DEBUG
>> {org.apache.stratos.autoscaler.client.oAuthAdminServiceClient} -  Trying to
>> register oAuth application [test_app_10.6391721987360338]
>> {org.apache.stratos.autoscaler.client.oAuthAdminServiceClient}*
>>
>> *TID: [0] [STRATOS] [2014-12-12 22:45:39,038]  INFO
>> {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} -
>> 'admin@carbon.super [-1234]' logged in at [2014-12-12 22:45:39,037+0000]
>> {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil}*
>>
>> *TID: [0] [STRATOS] [2014-12-12 22:45:39,061] ERROR
>> {org.wso2.carbon.identity.oauth.dao.OAuthAppDAO} -  Error when executing
>> the SQL : SELECT * FROM IDN_OAUTH_CONSUMER_APPS WHERE USERNAME=? AND
>> TENANT_ID=? AND APP_NAME=? {org.wso2.carbon.identity.oauth.dao.OAuthAppDAO}*
>>
>> *TID: [0] [STRATOS] [2014-12-12 22:45:39,061] ERROR
>> {org.wso2.carbon.identity.oauth.dao.OAuthAppDAO} -  Table
>> 'userstore.IDN_OAUTH_CONSUMER_APPS' doesn't exist
>> {org.wso2.carbon.identity.oauth.dao.OAuthAppDAO}*
>>
>> *com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table
>> 'userstore.IDN_OAUTH_CONSUMER_APPS' doesn't exist*
>>
>> *        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)*
>>
>> *        at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)*
>>
>> *        at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)*
>>
>> *        at
>> java.lang.reflect.Constructor.newInstance(Constructor.java:526)*
>>
>> *        at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)*
>>
>> *        at com.mysql.jdbc.Util.getInstance(Util.java:384)*
>>
>> *        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:105*
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *From:* Reka Thirunavukkarasu [mailto:reka@wso2.com]
>> *Sent:* Friday, December 12, 2014 8:42 PM
>> *To:* dev
>> *Subject:* Re: [Testing] Stratos 4.1.0 Alpha - error deploying cartridge
>>
>>
>>
>> Hi Martin,
>>
>>
>>
>> You can find the latest updated samples in
>> https://github.com/rekathiru/grouping-samples.git
>>
>>
>>
>> Thanks,
>>
>> Reka
>>
>>
>>
>> On Sat, Dec 13, 2014 at 9:58 AM, Lakmal Warusawithana <lakmal@wso2.com>
>> wrote:
>>
>> Yes, its is used in the UI constructions. This was there earlier with
>> under property called provider, and it has changed it to category and looks
>> like made it mandatory.
>>
>>
>>
>> On Sat, Dec 13, 2014 at 8:24 AM, Imesh Gunaratne <imesh@apache.org>
>> wrote:
>>
>> AFAIK still cartridge category is still not used for any decision making.
>> This might be useful in the UI when constructing an application.
>>
>>
>>
>> On Sat, Dec 13, 2014 at 5:49 AM, Martin Eppel (meppel) <meppel@cisco.com>
>> wrote:
>>
>> How is it (field category) being used ?
>>
>>
>>
>> *From:* Dakshika Jayathilaka [mailto:dakshika@wso2.com]
>> *Sent:* Friday, December 12, 2014 4:17 PM
>> *To:* dev
>> *Subject:* Re: [Testing] Stratos 4.1.0 Alpha - error deploying cartridge
>>
>>
>>
>> Hi Martin,
>>
>>
>>
>> Cartridge category is use to identify types of the cartridge. Currently
>> there are four types of cartridges.
>>
>>
>>
>>    1. Application
>>    2. Framework
>>    3. Data
>>    4. LB
>>
>>  Thank you,
>>
>>
>>
>> Regards,
>>
>>
>>
>> *Dakshika Jayathilaka*
>>
>> Software Engineer
>>
>> WSO2, Inc.
>>
>> lean.enterprise.middleware
>>
>> 0771100911
>>
>>
>>
>> On Sat, Dec 13, 2014 at 4:46 AM, Martin Eppel (meppel) <meppel@cisco.com>
>> wrote:
>>
>> Adding “category” : “Application” to the cartridge definition fixed the
>> cartridge exception.
>>
>>
>>
>> Now I am hitting the next one - looks like the database schema has
>> changed and a new field was added.
>>
>>
>>
>> My question is, how is this supposed to work, do we need to apply the new
>> schema when stratos is installed or is it applied when stratos starts up
>> the first time ?
>>
>>
>>
>> Thanks
>>
>>
>>
>> Martin
>>
>>
>>
>>
>>
>> TID: [0] [STRATOS] [2014-12-12 22:45:38,977] DEBUG
>> {org.apache.stratos.autoscaler.client.oAuthAdminServiceClient} -  Trying to
>> register oAuth application [test_app_10.6391721987360338]
>> {org.apache.stratos.autoscaler.client.oAuthAdminServiceClient}
>>
>> TID: [0] [STRATOS] [2014-12-12 22:45:39,038]  INFO
>> {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} -
>> 'admin@carbon.super [-1234]' logged in at [2014-12-12 22:45:39,037+0000]
>> {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil}
>>
>> TID: [0] [STRATOS] [2014-12-12 22:45:39,061] ERROR
>> {org.wso2.carbon.identity.oauth.dao.OAuthAppDAO} -  Error when executing
>> the SQL : SELECT * FROM IDN_OAUTH_CONSUMER_APPS WHERE USERNAME=? AND
>> TENANT_ID=? AND APP_NAME=? {org.wso2.carbon.identity.oauth.dao.OAuthAppDAO}
>>
>> TID: [0] [STRATOS] [2014-12-12 22:45:39,061] ERROR
>> {org.wso2.carbon.identity.oauth.dao.OAuthAppDAO} -  Table
>> 'userstore.IDN_OAUTH_CONSUMER_APPS' doesn't exist
>> {org.wso2.carbon.identity.oauth.dao.OAuthAppDAO}
>>
>> com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table
>> 'userstore.IDN_OAUTH_CONSUMER_APPS' doesn't exist
>>
>>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)
>>
>>         at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>>
>>         at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>
>>         at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>>
>>         at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
>>
>>         at com.mysql.jdbc.Util.getInstance(Util.java:384)
>>
>>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:105
>>
>>
>>
>> *From:* Martin Eppel (meppel)
>> *Sent:* Friday, December 12, 2014 12:55 PM
>> *To:* dev@stratos.apache.org
>> *Subject:* RE: [Testing] Stratos 4.1.0 Alpha - error deploying cartridge
>>
>>
>>
>> With the latest code from the master I get the exception below when I try
>> to deploy a cartridge, what is “Category is not specified” -  what is
>> missing ?
>>
>>
>>
>> Also, seems like RestAPI’s got changed again (autoscaler) – it would be
>> great if we could stabilize and freeze them,
>>
>>
>>
>> Thanks
>>
>>
>>
>> Martin
>>
>>
>>
>> TID: [0] [STRATOS] [2014-12-12 20:49:52,607]  INFO
>> {org.apache.stratos.rest.endpoint.api.StratosApiV41Utils} -  Starting to
>> deploy a cartridge [type] cisco-sample-vm
>> {org.apache.stratos.rest.endpoint.api.StratosApiV41Utils}
>>
>> TID: [0] [STRATOS] [2014-12-12 20:49:52,608] ERROR
>> {org.apache.stratos.rest.endpoint.handlers.CustomExceptionMapper} *-
>> Category is not specified, cartridge deployment failed*
>> {org.apache.stratos.rest.endpoint.handlers.CustomExceptionMapper}
>>
>> org.apache.stratos.rest.endpoint.exception.RestAPIException: Category is
>> not specified, cartridge deployment failed
>>
>>         at
>> org.apache.stratos.rest.endpoint.api.StratosApiV41Utils.createCartridgeDefinition(StratosApiV41Utils.java:98)
>>
>>         at
>> org.apache.stratos.rest.endpoint.api.StratosApiV41.createCartridgeDefinition(StratosApiV41.java:147)
>>
>>
>>
>>
>>
>>
>> --
>>
>> Imesh Gunaratne
>>
>>
>>
>> Technical Lead, WSO2
>>
>> Committer & PMC Member, Apache Stratos
>>
>>
>>
>>
>> --
>>
>> Lakmal Warusawithana
>>
>> Vice President, Apache Stratos
>>
>> Director - Cloud Architecture; WSO2 Inc.
>>
>> Mobile : +94714289692
>>
>> Blog : http://lakmalsview.blogspot.com/
>>
>>
>>
>>
>> --
>>
>> Reka Thirunavukkarasu
>> Senior Software Engineer,
>> WSO2, Inc.:http://wso2.com,
>>
>> Mobile: +94776442007
>>
>>
>>
>
>
> --
>
> 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

Mime
View raw message