cancel
Showing results for 
Search instead for 
Did you mean: 

HOWTO move custom folder to different instance

0 Kudos

I am in the process of learning Hybris so I am taking baby steps.

  1. getting the default powertools site running (check)
  2. get the custom initialdata project to create a new site (as of today, check!)
  3. Figure out how to commit the bin/custom folder to source control to deploy to other developer and production

I am working on #3 right now. I copied the contents of the bin/custom folder, config/local.properties, and config/localextensions.xml to another instance of Hybris I had on my machine. Then I did an 'ant clean all', re-initialized it and when I go to hit the storefront I get the following error:

[AcceleratorAddOnFilter] Hit by URI  [/storefront/]
[RequestLoggerFilter] sG [/storefront/] []  Begin
[RequestLoggerFilter] COOKIE Name: [ JSESSIONID ] Path: [ null ] Value: [ EA43C8331E4694D25C50CA93E932E20E ]
[RequestLoggerFilter] COOKIE Name: [ anonymous-consents ] Path: [ null ] Value: [ %5B%5D ]
[RequestLoggerFilter] COOKIE Name: [ cookie-notification ] Path: [ null ] Value: [ NOT_ACCEPTED ]
[RequestLoggerFilter] COOKIE Name: [ __utma ] Path: [ null ] Value: [ 91599944.933466528.1576081991.1576081991.1576081991.1 ]
[RequestLoggerFilter] COOKIE Name: [ __utmc ] Path: [ null ] Value: [ 91599944 ]
[RequestLoggerFilter] COOKIE Name: [ __utmz ] Path: [ null ] Value: [ 91599944.1576081991.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none) ]
[RequestLoggerFilter] sG [/storefront/] []  13.12 ms  ( 500 )<ScrollWheelLeft>

Any thoughts on what the problem is?

Accepted Solutions (1)

Accepted Solutions (1)

former_member620692
Active Contributor
0 Kudos

If you have already initialized Hybris on the target machine during the setup, you should never do (i.e. initialize) it again because the initialization deletes all the tables and creates them again based on items.xml of the extensions which are in scope (i.e. all the extensions which are there in localextensions.xml plus the ones on which these extensions depend recursively). Imagine the target machine as your production machine. Will you ever risk deleting all the tables (and hence all the data) on the production database?

When you copy the custom extensions, local.properties and localextensions.xml on the target machine, you should run ant all updatesystem or ant clean all updatesystem.

If you have just added new types (and haven't changed/deleted existing types), the first command is just fine; otherwise, you should run the second command.

Let me know if you still have any doubt.

Answers (2)

Answers (2)

0 Kudos

I am really lost here on what the process is to move code/instance from one dev machine to another. I thought I would try moving the local copy from my Mac to my Windows machine to document the process for others, but what I am doing isn't working. In light of the above info I took a little different approach:

stdout.txt2019-12-14t00-36-26-833z-debuglog.txt
Goal: take the custom folder from one dev machine and get it running on another machine that presently does NOT have Hybris running.

Steps that are NOT working:

  1. unzip the CXCOMM181100P_14-70004085.ZIP
  2. setantenv.bat
  3. install -r b2c_acc
  4. extract the hybris\bin\custom and hybris\config from the other machine
  5. ant clean all
  6. ran this list of addon below
  7. ant npminstall

And I am getting the attache error. I am attaching both the stdout and the log file it talks about at the bottom.

addon's that where run:

ant addoninstall -Daddonnames="b2bacceleratoraddon" -DaddonStorefront.yacceleratorstorefront="chdstorefront" 
ant addoninstall -Daddonnames="commerceorgaddon" -DaddonStorefront.yacceleratorstorefront="chdstorefront"
ant addoninstall -Daddonnames="assistedservicestorefront" -DaddonStorefront.yacceleratorstorefront="chdstorefront"
ant addoninstall -Daddonnames="smarteditaddon" -DaddonStorefront.yacceleratorstorefront="chdstorefront"
0 Kudos

Arvind, Let me start with saying thank you for the quick reply!

I would not say I have doubts, just some questions:

I totally get that one should only initialize an instance once time and update it from there on out. But I am a LONG, LONG way from having a system that has data worth saving and am still trying to figure out how to setup a brand new site successfully. Because of this, I have not taken the time to learn which impex files are executed only on initialize vs both initialize & update. For now, in this early learning phase, it seems quickest to simply delete the hsqldb and reinitialize.

Here is an example of what I am working through: I cannot load any page in SmartEdit and through some poking around I discovered that the previewURL was not set correctly. I am 99.9% sure the issue is that while I changed the chdstorefront.website in the local.properties, I failed to also include storefrontContextRoot and update that, too. I updated the local.propreties, deleted the hsqldb, and am initialing as I type this.

So my questions:

  1. Other than it being a bad form and a very bad idea on an actual production system, is there any other harm in the approach I am taking?
  2. What about when I setup a new machine? Once I get things working on my local machine, I have to deploy it on a server. My thinking is I need to do this: unzip the correct version on the server, run the recipe of the source, extract the bin/custom folder, config/local.properties, and config/localextensions.xml, then run ant all initialize. Or should I be also copying over the DB and just doing the ant all updatesystem?