hibernate - Jhipster upgrade -


in our organization have several jhipster generated projects, done version 3.0.0 , haven't upgraded them since.

i've been working on upgrading 1 of them past 5 days, please find breakdown below:

i have tried 3 different approaches:

1.- use jhipster:upgrade tool

steps:

this process break down several steps such as:

1.- creating local npm folder able install generators different jhipster versions no persmission issues

2.- erasing old installations of yo , jhipster

3.- cloning project , creating dev branches

4.- erase .jhipster folder entities not affected upgrade

5.- once upgrade code runs, need tweak several files/dependencies mvn clean/install works

complications

after applying these steps, find 2nd level cache hibernate refuses work, asking me include classes in cache, try several fixes/workarounds such as:

1.- deleting liquibase project

2.- configuring databaseconfiguration.java old settings , downloading old versions of libraries this

3.- configuring dev.yml file start in old version

4.- disable 2nd level cache

after doing cache , liquibase not represent problem, however, go complication, time involving rememberme services, jhipsterproperties parameter constructor comes in empty, debugged while, finding no relevant information on , decided drop , try method 2

2.- re-create upgrade steps manually.

for method follow script found in github: https://github.com/jhipster/generator-jhipster/issues/3761

i installed locally 3.4.0 version of jhipster try , make smooth transition , not erase entities in method 1, project files won’t load, upgrade_branch becomes resilient , whatever do, end needing erase project , re-clone it

3.- use jhipster command in project root folder

i use version 3.4.0 too

the upgrade process runs smooth, changes version in package.json file , links fine database first attempt (except having delete liquibase again, recreates during upgrade)

however face new issue rememberme tokens: custom persistence remembermeservices]: constructor threw exception; nested exception java.lang.illegalargumentexception: key cannot empty or null

a little bit of research:

there number of reports , git-hub tickets stating jhipster upgrade doesn't work and, in fact, @ time, on latest version, users told may need upgrade in manual way per ticket: https://github.com/jhipster/generator-jhipster/issues/5883

i consulted ex-colleague tried , reckoned easier make new project , copy necessary code rather trying manually migrate conflicting pieces of code arouse after doing upgrade

now, read in git hub tickets plenty of users seem upgrade projects seamlessly, questions have be:

1.- facing same issues other developers fail know technologies enough able solve them?

2.- there solution @ these kind of issues (2nd level cache , jhipsterproperties not holding key/not being passed variable constuctor)?

edit

i have found answer missing key in jhipsterproperties. when running yo jhipster asks if want overwrite series of files, marked yes , overwrote application.yml key stored properties, not restoring or creating new one. tried running again after cloning project master , worked fine choosing not overwrite application.yml (but overwriting rest of files)

edit 2

i managed sort hibernate cache issue by:

1.- manually adding cache entities in cacheconfiguration.java file, such this:

cm.createcache(org.wwarn.drugquality.domain.antiretroviralsurveydata.class.getname(), jcacheconfiguration);             cm.createcache(org.wwarn.drugquality.domain.country.class.getname(), jcacheconfiguration); 

and on (48) entities

2.- jhipster team defaults cache region jhipster config properties looking this:

hibernate.cache.region.factory_class: io.github.jhipster.config.jcache.nodefaultjcacheregionfactory 

i had change this:

hibernate.cache.region.factory_class: org.hibernate.cache.jcache.jcacheregionfactory 

and works fine

front end broken , many customized code need modified/replaced, managed upgrade project v3.0.0 v4.0.8 (using yo jhipster command, upgrade tool doesn't work me) application rolling smooth on backend, , ready slow migration angular 2-4

most of issues of upgrade related windows , yarn. if use linux or osx , npm < 5, you're in better shape.

also, if run often, issues easier solve big version leap experienced.

this tool useful it's still relatively new, things better on time.

you can run manually steps upgrade reading its code, it's quite easy follow , read its documentation.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -