Upgrade from 3.3.1 to 3.4.0

32 views
Skip to first unread message

Mail Sender

unread,
Jan 13, 2018, 3:34:40 PM1/13/18
to YesCart - pure eCommerce, platform with open source
Hi, I faced some issue while upgrading from 3.3.0 to 3.3.1 with Angular, so I was suggested to upgrade to master branch - 3.4.0.

I faced a lot of issues while doing this, multiple things has been changed.

I see that lucene search were removed.

Currently I confused about ProductServiceFacade:



How do you map properties for this productServiceFacade? Should I stop using this facade? What to use for product list load?

Mail Sender

unread,
Jan 13, 2018, 3:46:36 PM1/13/18
to YesCart - pure eCommerce, platform with open source
Also, I do not see how I can set the new SearchQueryFactory service as it's bean does not exist in the xml file websupport-services.xml

Yes Cart

unread,
Jan 13, 2018, 6:15:26 PM1/13/18
to YesCart - pure eCommerce, platform with open source
Hi,

Version 3.4.0 was all about removing Hibernate Search and use pure Lucene, so there are lot of changes in this area.
However all example usages can be found in the Wicked storefront application, so you should have plenty of examples.
The actual facade API did not change that much, so it is quite surprising that you are struggling with the upgrade (unless you have some customisations at very low level).

Lucene query factory was NOT removed it is still there defined in core-services.xml
But the interface is now called SearchQueryFactory because we wanted to abstract from the actual implementation (for example if someone wanted to use an alternative implementation for FT search support).

All Full text search (Lucene) related implementation is in search module, everywhere else there were changes in renaming of interfaces and classes to make things more generic.

But you should not be going that low level down, ProductServiceFacade provides "black box" API, so it should just work. The master is 100% functional and tested and is almost prod ready. It could be that you just have a bad merge with master (try to compare your code to clean master copy).

Hope this gives you a start.

Regards,
YC team

P.S. if you want to have another attempt at upgrade to 3.3.1 we would recommend reviewing the package.json as in most cases the problem lies in the incompatible dependencies versions. Make all versions exact and see what happens. 

Mail Sender

unread,
Jan 14, 2018, 3:59:14 PM1/14/18
to YesCart - pure eCommerce, platform with open source

Also, does import export format for product data changed? When I try to import my existing shop data I get following error. It does work on 3.3.0-GA

2018-01-14 17:22:24.976 ERROR o.y.c.b.s.i.ImportDirectorImplService:59 - during import row : CsvImportTupleImpl{sid=categorynames.csv:0, line=[100,CAT001,book,......,2000-01-01 00:00:00,2099-01-01 00:00:00,400,true,false,true,]}
descriptor categorynames.xml
error Insert SQL can only be specified in INSERT_ONLY mode (Current mode: MERGE) ... skipping insert
additional info Insert SQL can only be specified in INSERT_ONLY mode (Current mode: MERGE) ... skipping insert
object is null
master object is org.yes.cart.domain.entity.impl.CategoryEntity10522
java.lang.IllegalArgumentException: Insert SQL can only be specified in INSERT_ONLY mode (Current mode: MERGE) ... skipping insert
        at org.yes.cart.bulkimport.csv.impl.CsvBulkImportServiceImpl.doImportMerge(CsvBulkImportServiceImpl.java:371) [core-module-impex-3.4.0-SNAPSHOT.jar:3.4.0-SNAPSHOT]

Yes Cart

unread,
Jan 14, 2018, 4:15:36 PM1/14/18
to YesCart - pure eCommerce, platform with open source
Hi,

The bean should not be added to StorefrontServiceSpringKeys as it was reserved for facades.


Regards,
YC team

Mail Sender

unread,
Jan 15, 2018, 3:24:30 PM1/15/18
to YesCart - pure eCommerce, platform with open source

Yes Cart

unread,
Jan 15, 2018, 4:46:10 PM1/15/18
to YesCart - pure eCommerce, platform with open source
Hi,

The modes are set as descriptor level in order to control the CRUD behaviour of import service

MERGE - is used when you want to either add new record or update existing one (the selection is done using select-sql)
DELETE - is used to delete records (the selection is done using select-sql)
INSERT_ONLY - used when you want the records to be added if they do not exist, if they exist then they are skipped
UPDATE_ONLY - used when you want only to update existing records, the ones that do not exist are skipped

The insert-sql directive is hence can only be used in INSERT_ONLY mode, which is why exception could be raised if this mode is not specified explicitly and "insert-sql" is used.

All out of the box descriptors should all work correctly. If they do not work for you please specify the descriptor that you are using and provide a short sample import file to replicate the error. And we will try to sort it out.

Regards,
YC team

Mail Sender

unread,
Feb 3, 2018, 1:27:25 PM2/3/18
to YesCart - pure eCommerce, platform with open source
Hi, I solved it.

When I was upgrading to 3.4.0, I had some conflicts in modified import descriptors and forget to add newly added MODE field. That's why it defaulted to MERGE always and conflicted with INSERT_ONLY.

Thanks a lot for quick response and help.
Reply all
Reply to author
Forward
0 new messages