upgrading labkey server to 16.3 version

LabKey Support Forum
upgrading labkey server to 16.3 version hilariagrieve  2017-02-02 06:19
Status: Closed
 
Hi, I am trying to upgrade labkey server from 16.2 to 16.3 version.
I got an error:

500: Unexpected server error

A failure occurred during LabKey Server startup.

org.labkey.api.data.SqlScriptRunner$SqlScriptException: study-16.20-16.30.sql : Can't invoke method updatePKAndContainer(ModuleContext moduleContext) on class org.labkey.study.StudyUpgradeCode
       at org.labkey.api.data.SqlScriptManager.runScript(SqlScriptManager.java:211)
       at org.labkey.api.data.SqlScriptRunner.runScripts(SqlScriptRunner.java:82)
       at org.labkey.api.module.DefaultModule.versionUpdate(DefaultModule.java:327)
       at org.labkey.api.module.ModuleUpgrader.upgrade(ModuleUpgrader.java:82)
       at org.labkey.api.module.ModuleUpgrader.lambda$upgrade$0(ModuleUpgrader.java:94)
       at java.lang.Thread.run(Thread.java:745)


the last upgrade from 15.3 to 16.2 version I haven't get any problem.

Can you help me?
 
 
martyp responded:  2017-02-07 09:13
Hello,

It seems that at least one of your datasets is not in the expected state while this upgrade is taking place. I can't tell from the attached logs how it got in this state, possibly due to a server reboot while the upgrade was taking place.

Your best option to correct, if you have a server backup from prior to the upgrade, restore that backup and perform the upgrade again.

If you don't have a backup, you'll need to manually add the container column to that dataset in your Postgres db. You may need to do this in other datasets as well if they do not have it.

ALTER TABLE studydataset.c19d733_demographics ADD COLUMN container entityid

This upgrade is reorganizing the indexes on study datasets so it can take a while if you have a lot of datasets.
 
hilariagrieve responded:  2017-02-08 04:41
Hi Martyp,

I have a server backup from prior to the upgrade, I will restore it and perform the upgrade again.
I will tell you if everything is ok after doing that.

many thanks.

Hilaria
 
hilariagrieve responded:  2017-02-08 06:25
Hi Martip.

I restore the backup, and came back to the 16.2 version. When I started up labkey, It resturns me an error in a study query:

An error occurred trying to load: java.lang.NullPointerException.
I can't delete this query, because the sistems doesn't show me any query.

Can you help me?
Thanks
 
jeckels responded:  2017-02-08 12:57
Hi Hilaria,

Can you share the labkey.log file from Tomcat's ./logs directory? It will hopefully contain more details about the NullPointerException error you're seeing.

Thanks,
Josh
 
hilariagrieve responded:  2017-02-09 03:50
Hi Josh, I am sending the labkey.log file.
It is an SQL query, that I need to do some R Report. It worked fine before to perform the upgrade.

I don't know how to solve it. Now I returned to the 16.2 version.

Thanks.
Hilaria
 
hilariagrieve responded:  2017-02-09 03:50
 
hilariagrieve responded:  2017-02-09 07:28
Hi Josh,
I had backup the proyect study, so, I deleted the current study and created a new study from the study I had saved before upgrade.

Now, The platform and the study proyect is working fine. I need to upgrade to the 16.3 version because I made a R mardown report, and I need that the sistems creates a word document with this report, and someone in the support team told me that this issue was solve in the new version 16.3.

I don't know what Iam going to do, Now I am afraid that everything broke again if I tryied to upgrade again.
Hilaria
 
martyp responded:  2017-02-10 16:54
Hi Hilaria,

What you're seeing is consistent with version 16.2 running on a partially upgraded 16.3 database. Are you certain your database backup that you restored was from prior to the 16.3 upgrade? Can you run the following queries against your db and attach the results.

SELECT * FROM core.Modules

SELECT * FROM core.SqlScripts

Thanks,
Marty