cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

JDBC errors for non-existing models

Former Member
0 Likes
1,942

Hello experts,

Revently we removed the BTG extension from project. But logs still contan lot of warnings about JDBCValueMapping for non-existing models, for example:

[JDBCValueMappings] Error while resolving a class for value de.hybris.platform.btg.model.BTGLastOrdersOperandModel: de.hybris.platform.btg.model.BTGLastOrdersOperandModel

Project does not conatin any BTG models at all. Maybe I forgot to make a specific cleanup? Need your help, thanks in advance. Platform version - 6.5

A.

Accepted Solutions (1)

Accepted Solutions (1)

arvind-kumar_avinash
Active Contributor

Please try hAC > Maintenance > Cleanup (i.e. https://localhost:9002/maintain/cleanup ) and clear all orphaned types.

If it still appears, please check all the items.xml in your project for any reference to the itemtypes appearing in the log, remove them if found, and perform ant clean all updatesystem.

Please check https://wiki.hybris.com/display/accdoc50to56/Removing+Advanced+Personalization if you find something which you are missing.

Former Member
0 Likes

Cleanup already done. There are no links to btg in items.xml for whole project. Any other solutions?

arvind-kumar_avinash
Active Contributor
0 Likes

Any breakthrough? Was the link that I added later in the answer of any help?

Former Member
0 Likes

Your recommendations were implemented and transfered to QA system, now I'm monitoring situation and write update ASAP.

Former Member
0 Likes

After long time test system runs ok and no BTG data in logs. Thank you for the answer.

arvind-kumar_avinash
Active Contributor
0 Likes

You are most welcome.

Answers (1)

Answers (1)

rseidl
Explorer

Since these steps didn't fix our issue I did some investigation in the JDBCValueMappings.class in line 1084.

INFO   | jvm 1    | main    | 2020/12/09 02:58:13.267 | WARN  [localhost-startStop-1] [JDBCValueMappings:1084] Error while resolving a class for value de.hybris.platform.btg.model.BTGLastOrdersOperandModel: de.hybris.platform.btg.model.BTGLastOrdersOperandModel

The String value which contains the invalid Class name(s) is handed over to the convertValueToJava(String value) Class within the JDBCValueMappings Class and produces the warning in the logfile. These invalid Class names in our case were comming from this query "SELECT * FROM validationconstraints WHERE PK IN (?,?,?,?..........)" and within the validationconstraints table there were a few old values from the BTG Extension stored. Entries like:

  • NumberOfLastOrders - MinConstraint
  • CartTotalSum - TypeConstraint
  • RegExpList - AttributeConstraint
  • etc....

I just downloaded an old accelerator (6.6.0.0) and found an impex which contains exactly these entries. I just created an impex for removing those and the warnings during startup were gone:

# Remove items which were impexed by the already removed BTG extension. This impex will fix a few warnings during commerce startup.


REMOVE MinConstraint;id[unique=true];
;NumberOfLastOrders;


REMOVE SizeConstraint;active[allownull=true];annotation;id[unique=true,allownull=true];
;true;javax.validation.constraints.Size:countries;SizeConstraintBtgNumberOfCountries;


REMOVE TypeConstraint;id[unique=true];
# Cart total sum must be greater than or equal to zero.
;CartTotalSum;
# Size of products in cart must be greater than or equal to zero
;ProductsInCart;
# Quantity of product in cart must be greater than or equal to zero
;QuantityOfProductInCart;
# Number of orders must be greater than zero.
;NumberOfOrders;
# Number of products in specified orders must be greater than or equal to zero
;ProductsInLastOrders;
# Number of orders in a selected date - from < to
;NumberOfOrdersDateRange;


REMOVE AttributeConstraint;id[unique=true];
;RegExpList;
;KeyValuePair;

HTH

0 Likes

Thank you, this worked perfectly to prevent these warnings.