Bad SQL grammar error when deleting project

LabKey Support Forum (Inactive)
Bad SQL grammar error when deleting project martin lague  2015-12-18 07:51
Status: Closed
 
Hi,
I'm getting a Bad SQL grammar error when I try to delete a project. To test, I created a new project and went to Admin->Folder->Management, selected the new project and clicked on the delete button.
Here is the error I got:
-------
500: Unexpected server error

SqlExecutor.execute(); bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: relation "gw_labkey.x_lk_outbd_specimens" does not exist Position: 13
-------

I've attache the complete error message.
I have LabKey 15.3 build 41379.34
 
 
Jon (LabKey DevOps) responded:  2015-12-18 11:12
Hi Martin,

It appears that you have the HDRL module enabled on that specific project or one of the sub-folders underneath that project.

Can you go into the Project and then click Admin > Folder > Management and go to the Folder Type tab and verify if the HDRL module is enabled? If it is, please uncheck the box next to it and then click Update. After you do this, please attempt to delete your project again.

Regards,

Jon
 
martin lague responded:  2015-12-18 11:41
Hi Jon,

HDRL isn't enabled on that project. This project is empty. I created it to test deleting a project after I had the same problem deleting another test project. I tried enabling HDRL, updating the folder and disabling before deleting the project but I still get that error message. Thanks Jon for helping.

Martin
 
Jon (LabKey DevOps) responded:  2015-12-18 12:29
Hi Martin,

That's interesting.

Can you try deleting it with the HDRL enabled?

Regards,

Jon
 
martin lague responded:  2015-12-22 10:00
Hi Jon,

I tried to delete the project with HDRL enabled for this project with the same result (exactly the same error message).

Martin
 
Jon (LabKey DevOps) responded:  2015-12-22 13:37
Hi Martin,

Thanks for trying that. It was a long shot. I have made a bug on this issue for further investigation.

https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=25217

In order for us to investigate this issue effectively, please supply us with the following:

1. The version of LabKey and build you're running. You can find this information by going to Admin > Site > Admin Console, then scroll down to the Module Information list in the middle of the page and click the + sign next to Core to get the details. Take a screenshot of this information.

2. On the left-hand side of the Admin Console screen, there is a link for SQL Scripts. Click that and take a screenshot of the entire page (note: This page maybe a little long, so a few screenshots will be required to get everything).

Once I get this information, I can add that to the bug.

Regards,

Jon
 
martin lague responded:  2015-12-23 19:39
Hi Jon,
I've attached the screenshots.

Martin
 
Jon (LabKey DevOps) responded:  2015-12-24 22:49
Hi Martin,

Thank you for providing that to us. We will investigate this further and follow up with you if we need any additional information or have any new updates.

Regards,

Jon
 
Jon (LabKey DevOps) responded:  2016-01-06 16:38
Hi Martin,

Out of curiosity, can you provide me with the original link you used to obtain the version of LabKey you installed?

According to our developers, the HDRL module doesn't come with the standard distribution and requires the labware data source to be configured/available.

Regards,

Jon
 
martin lague responded:  2016-01-11 10:32
The last update I did was using this link:
http://teamcity.labkey.org/guestAuth/repository/download/LabkeyRelease153_Installers/.lastSuccessful/discvr/LabKey15.3-%7Bbuild.number%7D-discvr-bin.tar.gz

I'm not sure if I had this problem before this update as I didn't report this problem when I saw it the first time. I wanted to test a few things before.

All other updates and the original setup where from copies I picked on labkey.com

Martin
 
Jon (LabKey DevOps) responded:  2016-01-12 19:56
Hi Martin,

Thanks for providing that link. So the discvr version you installed definitely doesn't carry that HDRL module, so this would mean that a previous install that was done on the server with an older version of LabKey would have had that HDRL build attached to it.

I'm trying to figure out the best course of action here (e.g. backup of the database, backup of the existing files in the @files directory, then doing a fresh install of the build and then restore the files from the @files directory).

Regards,

Jon
 
Jon (LabKey DevOps) responded:  2016-01-13 11:58
Hi Martin,

After discussing this issue with our developers, we feel that it's best to do a clean install/upgrade of LabKey.

Essentially, you would be doing the following:

1. Unpacking the tar.gz install file you downloaded before
2. Finding your existing labkey installation
3. Stopping Tomcat, then MOVING the LABKEY_HOME/labkeywebapp and LABKEY_HOME/modules directories to a backup folder
4. COPYING the tomcat_home/lib and tomcat_home/conf directories to the backup folder
5. Creating new LABKEY_HOME/labkeywebapp and LABKEY_HOME/modules directories that are empty (this ensures that no old modules interfere with the upgrade).
6. Accessing that unpacked tar.gz and copying the contents from its labkeywebapp and modules directories into the same named directories you made in Step 5.
7. Copy the contents of the tomcat-lib directory from the unpacked tar.gz and put that into the tomcat_home/lib directory and overwrite any existing files.
8. Restart Tomcat and check LabKey to see if the changes went through and whether the error still appears.

Note: Although technically we recommend making a fresh new labkey.xml file within the tomcat directory under tomcat-home/conf/Catalina/localhost/, I think that won't be necessary here.

Full instruction is in the article below:

https://www.labkey.org/home/Documentation/wiki-page.view?name=manupgrade

I think if you go through this clean upgrade, this should remove that error you were seeing.

Give this a try and let us know if you run into any issues or have any further questions.

Regards,

Jon
 
martin lague responded:  2016-01-14 10:13
Thanks Jon.

I'll do the clean upgrade and let you know if I have any issues or questions.

Martin