December 14, 2019 at 4:21 am #12474
If I try and upgrade a dump file by right clicking and selecting upgrade, I always get an error:
; 03:21:12,447 ERROR [GenericTool] Error executing the tool command
nexj.core.persistence.AvailabilityException: Data source “DefaultRelationalDatabase” is temporarily unavailable. (err.persistence.unavailable)
Caused by: java.lang.IllegalStateException: Fragment “DefaultRelationalDatabase” is disabled
… 8 more
; 03:21:12,460 INFO [GenericTool] Exit code = 2
Error: Data source “DefaultRelationalDatabase” is temporarily unavailable. (err.persistence.unavailable)
Checked the connection pool, looks fine.
Checked the Test Connection button for the relational DB. Works fine.
I can recreate, do a manual upgrade then export.. works fine but another issue pops up.0
December 17, 2019 at 1:12 pm #12502shahzad.qureshiKeymaster
I am not sure what you are doing here as we discontinue using or generating dump file almost 4 years ago and they are not part of 9.2 release.
Please provide the following
1- A screenshot of this dump within the Studio
2- Studio plugin (Help/About Eclipse SDK (or About Studio)/Installation Details
3- Finance version (click on “Set current Model” and provide the number under “Base Revision” and “Base Version”0
December 17, 2019 at 1:53 pm #12519
I’m using the official 9.2 release.
NexJ Studio 13.6.156.000 com.nexjsystems.nexjstudio.feature.group NexJ Systems Inc.
Base: Finance Rev. 18.104.22.168 V. 1085.1307.167.530
December 17, 2019 at 3:53 pm #12538
If I delete the dump and recreate the DB it works but I now get the following issue:
- In my Main.upgrade I add some UserTemplates and remove some.
- If I upgrade via SQL it works correctly (version 1.x to 2.x) and I see the changes
- If I do the recreate (without dump) (version 2.x) then the new templates aren’t there and the old ones aren’t removed but the version is changed to 2.x in the DB
December 17, 2019 at 4:36 pm #12549shahzad.qureshiKeymaster
The recreate does not make use of the Main.upgrade, it simply looks at the .datasource files. When you run your server, SysUpgrade kicks in and fills in templates and such. Main.upgrade only plays a role when you upgrade your database.
At NexJ internally, we prefer to use SysUpgrade for template creation/updates, seeding of some data and perhaps control options blocks and things of that nature. You can create a completely new class to do all the above and call the main function in that class from SysUpgrade, recommended to be the very last “before” step before the main action in seed function. See example below
This is not to say that you can’t use Main.upgrade, however if you are starting out a new project and recreate is needed to be done, Main.upgrade is not the correct option. Main.upgrade is useful especially for when the project is deployed and the database will be upgrade.0
Attachments:You must be logged in to view attached files.
December 17, 2019 at 4:41 pm #12567
Makes sense now. We used Main.upgrade because we were used to updating the dump file.
- You must be logged in to reply to this topic.