Issues while migrating to V8.3

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
bondicoffee
Posts: 130
Joined: Tue Dec 03, 2013 10:19 pm

Issues while migrating to V8.3

Post by bondicoffee »

Hi,

Currently, we are testing a live application to migrate from V8.2 to V8.3 in new server. We are also migrating database from MySql v5.5 to MySQL v8.0.

We are getting following bugs in Awareim :
1)
Rule :
IF Asset.ob_Customer.NumberOfVehicles IS UNDEFINED OR Asset.AssetType WAS CHANGED TO 'Motor Vehicle' OR OLD_VALUE(Asset.AssetType) ='Motor Vehicle' Then
FIND Customer WHERE Customer IN Asset.ob_Customer
Customer.NumberOfVehicles = COUNT Asset WHERE (Asset IN Customer.om_Asset AND Asset.AssetType = 'Motor Vehicle')

Error log :
com.bas.shared.domain.operation.BuildQueryException: Unable to convert query condition OLD_VALUE(Asset.AssetType)='Motor Vehicle' in query FIND Asset WHERE OLD_VALUE(Asset.AssetType)='Motor Vehicle' to SQL
at com.bas.shared.domain.operation.SQLQueryStringBuilder.handlePredicate(SQLQueryStringBuilder.java:1643)
at com.bas.shared.domain.operation.SQLQueryStringBuilder.handleQueryCondition(SQLQueryStringBuilder.java:825)
at com.bas.shared.domain.operation.SQLQueryStringBuilder.buildSelectString(SQLQueryStringBuilder.java:589)
at com.bas.shared.domain.operation.SQLQueryStringBuilder.buildQueryString(SQLQueryStringBuilder.java:395)
at com.bas.basserver.persistence.EntityDBPersister.buildQueryString(Unknown Source)
at com.bas.basserver.persistence.PersistenceManager.A(Unknown Source)

2)

Error logs:
com.bas.shared.domain.operation.BuildQueryException: Undefined expression for list AStage.om_Tasks is not supported. Try to use COUNT expression instead
at com.bas.shared.domain.operation.SQLQueryStringBuilder.getUndefinedStringForList(SQLQueryStringBuilder.java:1936)
at com.bas.shared.domain.operation.SQLQueryStringBuilder.getUndefinedString(SQLQueryStringBuilder.java:1867)
at com.bas.shared.domain.operation.SQLQueryStringBuilder.access$7(SQLQueryStringBuilder.java:1836)
at com.bas.shared.domain.operation.SQLQueryStringBuilder$SQLHelper.getUndefinedExpression(SQLQueryStringBuilder.java:2635)
at com.bas.shared.ruleparser.ASTIsDefinedExpr.toSQL(ASTIsDefinedExpr.java:191)
at com.bas.shared.domain.operation.SQLQueryStringBuilder.handlePredicate(SQLQueryStringBuilder.java:1618)
at com.bas.shared.domain.operation.SQLQueryStringBuilder.handleQueryCondition(SQLQueryStringBuilder.java:825)
at com.bas.shared.domain.operation.SQLQueryStringBuilder.buildSelectString(SQLQueryStringBuilder.java:589)
at com.bas.shared.domain.operation.SQLQueryStringBuilder.buildQueryString(SQLQueryStringBuilder.java:395)
at com.bas.basserver.persistence.EntityDBPersister.buildQueryString(Unknown Source)


Can someone please confirm if these are known issues or bugs in AwareIm? If these are not bugs, how can this be fixed?

Thanks!
PointsWell
Posts: 1458
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Issues while migrating to V8.3

Post by PointsWell »

I don't think that MySQL 8 is supported. I would suggest trying with 5.7 and see if the upgrade proceeds. I had to downgrade my DB initially.
bondicoffee
Posts: 130
Joined: Tue Dec 03, 2013 10:19 pm

Re: Issues while migrating to V8.3

Post by bondicoffee »

Hi,

Thank you for your response.

I have a few concerns in implementing this process:
1) Did you face any issues while downgrading MySQL version?
2) Was any data lost in this process?
3) Is there any workaround to fix in awareIm so that we can make MySQL v8.0 or future versions compatible with AwareIm?

Thanks Again
PointsWell
Posts: 1458
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Issues while migrating to V8.3

Post by PointsWell »

You won’t like my response. I used fresh environment with test data. So when I say downgrade I dropped the server and reinstalled a new one. Sorry that doesn’t help you.
bondicoffee
Posts: 130
Joined: Tue Dec 03, 2013 10:19 pm

Re: Issues while migrating to V8.3

Post by bondicoffee »

Your response is saving us lot of time. Thank you for responding.

To conclude, we are stuck with our testing as the risks to downgrade db are unknown. :cry:
customaware
Posts: 2400
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Issues while migrating to V8.3

Post by customaware »

I had an issue upgrading from MySQL 5.7 to 8.

When I started with a new MySQL V8 and then imported the data all was fine.

However, sisnce then am now slowly moving everything to MariaDB with no issues.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
intra
Posts: 279
Joined: Thu Oct 11, 2012 1:30 pm
Location: Australia

Re: Issues while migrating to V8.3

Post by intra »

Assuming you have a .SQL schema backup, can't you re-import the data onto a clean 5.7 instance?

Maybe just mysqldump the data as it sits now and then re-import as per previous suggestion, might get you out of a bind.
Avid Linux user....
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Issues while migrating to V8.3

Post by aware_support »

The original problem has nothing to do with MySQL 8.0 - it shouldn't work in any version of MySQL.
You are using the OLD_VALUE function somewhere in one of your queries - obviously not the ones that you have attached. This function CANNOT be used in queries.

If anyone has specific problems with MySQL version 8.0 please report them.
Aware IM Support Team
bondicoffee
Posts: 130
Joined: Tue Dec 03, 2013 10:19 pm

Re: Issues while migrating to V8.3

Post by bondicoffee »

@Aware_support :
How is it possible that this "query" works in MYSQL v5.1,v5.5,v5.7 and not in V8.0? Is there anything we are supposed to know that we don't know?

Secondly, if what you are saying is correct, then OLD_VALUE function cannot be used to check the value in an attribute, it can only be used to update an attribute with the previous value. If that's the case, why there is no documentation on this as we are using this function for many years?

Just so you know OLD_VALUE used in below rule in a B.O worked fine in version MYSQL v5.x. I am just mentioning the rule again causing this exception:
Rule :
IF Asset.ob_Customer.NumberOfVehicles IS UNDEFINED OR Asset.AssetType WAS CHANGED TO 'Motor Vehicle' OR OLD_VALUE(Asset.AssetType) ='Motor Vehicle' Then
FIND Customer WHERE Customer IN Asset.ob_Customer
Customer.NumberOfVehicles = COUNT Asset WHERE (Asset IN Customer.om_Asset AND Asset.AssetType = 'Motor Vehicle')
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Issues while migrating to V8.3

Post by aware_support »

Code: Select all

Just so you know OLD_VALUE used in below rule in a B.O worked fine in version MYSQL v5.x. I am just mentioning the rule again causing this exception:
Rule : 
IF Asset.ob_Customer.NumberOfVehicles IS UNDEFINED OR Asset.AssetType WAS CHANGED TO 'Motor Vehicle' OR OLD_VALUE(Asset.AssetType) ='Motor Vehicle' Then
FIND Customer WHERE Customer IN Asset.ob_Customer
Customer.NumberOfVehicles = COUNT Asset WHERE (Asset IN Customer.om_Asset AND Asset.AssetType = 'Motor Vehicle')
Here OLD_VALUE is used in the condition of the rule, NOT in a query. A query uses FIND or aggregate expressions (COUNT, SUM etc). The exception you are referring to must come from somewhere else. So find where it is coming from. There is no way OLD_VALUE works differently in different versions of MySQL.
Aware IM Support Team
Post Reply