Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct migration from 3.x to 4.3.0 and onwards #3495

Open
BLasan opened this issue Jan 6, 2025 · 4 comments
Open

Direct migration from 3.x to 4.3.0 and onwards #3495

BLasan opened this issue Jan 6, 2025 · 4 comments
Assignees

Comments

@BLasan
Copy link

BLasan commented Jan 6, 2025

Current Limitation

Currently, there's no automated way to migrate apim from 3.2.0 to 4.3.0 (and higher). After migrating to 4.2.0, 4.2.0 to 4.3.0 migration scripts need to be run manually.

Suggested Improvement

Automate the apim 3.2.0 to 4.3.0 (and higher) migration

Version

No response

@BLasan
Copy link
Author

BLasan commented Jan 8, 2025

[Update 07/01/2025]

  • Implemented the V430Migration class for the migration client tool in order to automate the 4.3.0 migration from 3.2.0.
  • Added the relevant sql files into the pre-migration-scripts which will be executed during the migration process.

@BLasan
Copy link
Author

BLasan commented Jan 8, 2025

[Update 08/01/2025]

  • Started testing the tool on 4.2.0 migration. Working on the data population for apim 3.2.0 and found some issues with the jmeter scripts.

@BLasan
Copy link
Author

BLasan commented Jan 9, 2025

[Update 09/01/2025]

  • Manually populated 3.2.0 pack with data used in the scripts since it gives an Auth Header missing error.
  • Setup APIM 3.2.0 with MySQL 8.4/8.0 and tried the same script. It gives the following error when creating tenants.
    Caused by: java.sql.SQLSyntaxErrorException: Unknown column 'TENANT_DOMAIN' in 'where clause'

@BLasan
Copy link
Author

BLasan commented Jan 9, 2025

Getting the following error during the server startup after connecting to mysql.

[2025-01-09 16:35:11,858] ERROR - SubscriptionValidationDAO Error in loading Applications for tenantDomain : carbon.super
java.sql.SQLSyntaxErrorException: Unknown column 'ATTRIBUTES.VALUE' in 'field list'
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:121) ~[mysql-connector-j-8.0.33.jar:8.0.33]
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-j-8.0.33.jar:8.0.33]
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916) ~[mysql-connector-j-8.0.33.jar:8.0.33]
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:972) ~[mysql-connector-j-8.0.33.jar:8.0.33]
	at jdk.internal.reflect.GeneratedMethodAccessor63.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:118) ~[jdbc-pool_9.0.76.wso2v1.jar:?]
	at com.sun.proxy.$Proxy55.executeQuery(Unknown Source) ~[?:?]
	at org.wso2.carbon.apimgt.impl.dao.SubscriptionValidationDAO.getAllApplications_aroundBody38(SubscriptionValidationDAO.java:599) [org.wso2.carbon.apimgt.impl_6.7.206.547.jar:?]
	at org.wso2.carbon.apimgt.impl.dao.SubscriptionValidationDAO.getAllApplications(SubscriptionValidationDAO.java:588) [org.wso2.carbon.apimgt.impl_6.7.206.547.jar:?]
	at org.wso2.carbon.apimgt.internal.service.impl.ApplicationsApiServiceImpl.applicationsGet(ApplicationsApiServiceImpl.java:45) [classes/:?]
	at org.wso2.carbon.apimgt.internal.service.ApplicationsApi.applicationsGet(ApplicationsApi.java:48) [classes/:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant