Developer Forum

Showing: limited to 100 messages
End session via API
WayneH 2019-09-13 08:30

Good afternoon,

just wondering if there was a way to end a session or logout via the server api .. It doesn't seem to be described in the documentation..

Thanks,

Wayne.

view message
Create Project through Python API
David Owen 2019-09-12 07:51

Is it possible to dynamically create a project through the Python API? I couldn't find much information in the documentation. If not, are there any other tools I can use to programmatically create projects?

Thanks,
Dave

view message
Duplicate rows query
(1 response) fcf 2019-06-24 16:12

I am working off a list and trying to duplicate rows to allow editing of the duplicates. It is for an order book where people can re-order supplies, making changes to the previous orders as necessary. I am modeling the code after a bulk edit, but I am having trouble selecting data to be edited and inserted. Here is the bulk edit code:

                var url = LABKEY.ActionURL.buildURL('query', 'updateQueryRows.view', null, {
                       schemaName: dataRegion.schemaName,
                       'query.queryName': dataRegion.queryName,
                       dataRegionSelectionKey: dataRegion.selectionKey
                   });
                   var form = dataRegion.form;
                   console.log(typeof form);
                   if (form && verifySelected.call(this, form, url, 'POST', 'rows')) {
                       submitForm(form);
                   }
                   return false;

I thought it would be appropriate to change updateQueryRows to some form of a select statement, but cannot get it to work. Is there a duplicate rows query function? Any ideas?

view message
XML Schema error on manual entry of dataset with NUMERIC datatype
(1 response) Georgia Mayfield 2019-06-24 15:10

Hello,

I got an XMLSchema error on implementing a dataset in LabKey running on Postgres 9.5 regarding the NUMERIC datatype. The dataset was implemented with a required column of type NUMERIC, without a precision or scale specified. This is a valid datatype is Postgresql, and according to the LabKey SQL documentation is a LabKey defined valid datatype.

Our users have specifically requested the numeric datatype as it allows both integer and decimal values without padding zeroes after the decimal point, unlike the INTEGER or DOUBLE datatypes, the concern being that padded zeroes may appear to add degrees of certainty to an assay result which may or may not be true.

The dataset is able to instantiate with the datatype fine, and bulk upload with both integer and decimal values completes successfully and can be repeated.

However, on single entry I get a error related to the type. I am able to load one record without error, and the second time I click on the INSERT button the attached error takes place. This happens regardless of whether or not I insert an integer or decimal In the NUMERIC column during single entry. Seems like single entry is treating the NUMERIC datatype like the INTEGER datatype, and bulk upload is handling it appropriately.

Thanks!

Best, GM

 single_entry_failure.png 
view message
Remove avatar field in user details
(1 response) WayneH 2019-06-17 08:30

Good morning,
not sure if anyone else has had this issue or question but we wanted to remove the avatar field from the user profile/user details view for a project and can't seem to find a way to do so.. The field is hidden in the default user view but this seems to have no impact on what shows when users edit their profile..

We welcome any ideas..

Thanks,

view message
Row not updating using updateRows()
(1 response) la27 2019-06-05 09:38
Hello,

I have Java script code that says this:

 LABKEY.Query.updateRows({
        schemaName:"lists",
        queryName :"Reagent Requests",
        rows: [{"Key": 3,
            "ClientId": "123",
        }]
    });

I am trying to update the Reageant Requests Tutorial Form's row 3's cell named ClientId with 123. I have made sure the keyname is Key but it will not update. It gives me "existing row not found." I put this function in the submitRequest() function found in the tutorial code.

   function submitRequest() {

        // Insert form data into the list.
       LABKEY.Query.insertRows({
           schemaName: 'lists',
           queryName: 'Reagent Requests',
           rowDataArray: [{
               "Name": document.ReagentReqForm.DisplayName.value,
               "Email": document.ReagentReqForm.Email.value,
               "UserID": document.ReagentReqForm.UserID.value,
               "Reagent": document.ReagentReqForm.Reagent.value,
               "Quantity": parseInt(document.ReagentReqForm.Quantity.value),
               "Date": new Date(),
               "Comments": document.ReagentReqForm.Comments.value,
               "Fulfilled": 'false'
           }],
           success: function(data) {
               // The set of URL parameters.
               var params = {
                   "name": 'confirmation', // The destination wiki page. The name of this parameter is not arbitrary.
                   "userid": LABKEY.Security.currentUser.id // The name of this parameter is arbitrary.
               };

                // This changes the page after building the URL. Note that the wiki page destination name is set in params.
               var wikiURL = LABKEY.ActionURL.buildURL("wiki", "page", LABKEY.ActionURL.getContainer(), params);
               window.location = wikiURL;
           }
       });
   
    LABKEY.Query.updateRows({
        schemaName:"lists",
        queryName :"Reagent Requests",
        rows: [{"Key": "3",
            "ClientId": "123",
               }]
               });
               
}


 </script>
view message
Scheduled Maintenance: artifactory.labkey.com Friday May 31, 2019 7 AM - 10 AM PDT
(1 response) stuartm 2019-05-30 11:40

We will be performing scheduled maintenance on LabKey's artifactory server ( https://artifactory.labkey.com/ ) on Friday May 31 2019 between 7AM and 10 AM PDT.

This will affect build artifacts during this maintenance period.

While Artifactory is unavailable, you should use the --offline flag for gradle when building.

We are performing this maintenance to install the latest security patches for Artifactory and its underlying operating system.

view message
Git Migration: Test and customModules
Trey 2019-05-29 14:59

We just finished the next step in our effort to migrate our source code from SVN to Git. The previous step was the creation of the platform and commonAssays repositories.

This time, we are migrating our central automated test code (from server/test) and all of the modules from server/customModules. The bulk of this change happed in SVN revision 63845.

Steps for updating your local enlistment to the new structure:

  1. Before syncing SVN, create a patch with any pending changes to server/test, server/customModules, externalModules/onprcEHRModules, externalModules/maccoss, or sampledata/qc
  2. Get rid of the dependencies.txt files that are generated in some of the resources/credits directories for modules that have moved. You can do this manually or with the gradle command: './gradlew cleanWriteDependenciesList'
  3. Do an SVN update
    • You may encounter tree conflicts if you skipped the previous step. Delete the directories manually and resolve the tree conflicts to continue.
  4. Clone 'https://github.com/LabKey/testAutomation.git' into the 'server' directory
    • Optional - only necessary if you wish to run automated tests
  5. Clone any, all, or none of the new module repositories into 'server/modules'
  6. Update any customizations to your settings.gradle file to use the new module locations
view message
500: Unexpected server error when deleting folders
(2 responses) eva pujadas 2019-05-24 07:31

We are running LabKey 18.3 and have realized that project users (non site admin users), users with "Project Administrator" and "Folder Administrator" can not delete the folders (or sub-folders) which were created by themselves.

That is the error message:

500: Unexpected server error

java.lang.NullPointerException
at org.labkey.pipeline.api.PipelineManager.purge(PipelineManager.java:240)
at org.labkey.pipeline.PipelineModule.containerDeleted(PipelineModule.java:237)
at org.labkey.api.data.ContainerManager.fireDeleteContainer(ContainerManager.java:2108)
at org.labkey.api.data.ContainerManager.delete(ContainerManager.java:1573)
at org.labkey.core.admin.AdminController$DeleteFolderAction.handlePost(AdminController.java:6823)
at org.labkey.core.admin.AdminController$DeleteFolderAction.handlePost(AdminController.java:6784)
at org.labkey.api.action.FormViewAction.handleRequest(FormViewAction.java:101)
at org.labkey.api.action.FormViewAction.handleRequest(FormViewAction.java:80)
at org.labkey.api.action.BaseViewAction.handleRequest(BaseViewAction.java:177)
at org.labkey.api.action.SpringActionController.handleRequest(SpringActionController.java:482)
at org.labkey.api.module.DefaultModule.dispatch(DefaultModule.java:1266)
at org.labkey.api.view.ViewServlet._service(ViewServlet.java:204)
at org.labkey.api.view.ViewServlet.service(ViewServlet.java:131)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.labkey.api.data.TransactionFilter.doFilter(TransactionFilter.java:38)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.labkey.api.module.ModuleLoader.doFilter(ModuleLoader.java:1241)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.labkey.api.security.AuthFilter.doFilter(AuthFilter.java:215)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.labkey.core.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:118)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:800)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1471)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
request attributes
LABKEY.OriginalURL = http://labkey.scicore.unibas.ch/labkey/Handschin Group/test3/admin-deleteFolder.view?
LABKEY.StartTime = 1558707176893
LABKEY.action = deleteFolder
org.springframework.web.servlet.DispatcherServlet.CONTEXT = Root WebApplicationContext: startup date [Thu Feb 21 09:56:07 CET 2019]; parent: Root WebApplicationContext
LABKEY.controller = admin
LABKEY.Counter = 0
org.labkey.api.util.ExceptionUtil$exception = java.lang.NullPointerException
X-LABKEY-CSRF = 5013174ea2e084d8241882c5d776835a
LABKEY.container = /Handschin Group/test3
LABKEY.RequestURL = /labkey/Handschin%20Group/test3/admin-deleteFolder.view?
LABKEY.OriginalURLHelper = /labkey/Handschin%20Group/test3/admin-deleteFolder.view?

core schema database configuration
Server URL jdbc:postgresql://127.0.0.1/labkey
Product Name PostgreSQL
Product Version 9.6.6
Driver Name PostgreSQL JDBC Driver
Driver Version 42.2.5

Do you have any idea about which could be the error cause?

Thank you very much for your support,
Eva

view message
Webpart permissions per user or group
(1 response) Matt V 2019-05-14 09:59

Hello,
I'm creating a few new webparts and we need to limit who can see them. The permissions matrix (https://www.labkey.org/Documentation/wiki-page.view?name=webpartPermissions) has usually done the trick, but in this case it would be incredibly useful (borderline necessary) to be able to limit their display to groups or even specific users if groups aren't an option.

Is there a way to do this, even at a code level?

view message
list permissions
(1 response) WayneH 2019-05-08 11:29

looking for some suggestions regarding how to configure permissions such that project users are able to submit/edit data in a list via a js coded wiki page. I want to give them editor permissions over data content but not over wiki or other content..

thanks,

view message
Assign and manage folder permissions for containers..
(2 responses) WayneH 2019-04-29 08:59

Hi Jon,
kind of in follow up to previous but hopefully asking the question a bit more clearly what we have is a list of about 1000 folders that are to received uploaded files from collaborators that they also need to have access to.. We have recreated these folders as containers and now need to assign permissions to control access to data to specific users. And hoping to find a way to have those users access their folder directly without seeing other extraneous data. (minimized view) We just want them to see the folders that we are pushing the users to. Basically we need to add group permissions to containers at scale using the javascript api for over 1000 folders/containers.
Just a project that I am working with someone on and trying to help them figure out how to manage these folders and data access via the js API. It's tough because we are dealing with such a large number of folders..

view message
WebDAV views
(1 response) WayneH 2019-04-10 10:05

Hey everyone, Is there any way to configure the labkey webDAV/webfiles client user view or functionality?
we would love to hide the folder tree from some users as well as the home folder in the tree in instances where we are showing the tree we would prefer to not show the home folder... Not at all familiar with this aspect so any help would be appreciated.

Thanks,

view message
Modules Restart
(1 response) marcia hon 2019-03-21 11:21

Hello,

Currently, when I have a new module, I end up restarting the whole LabKey application.

Is there a way for updating/adding modules without restarting the whole LabKey system?

Thanks,
Marcia

view message
Core migration to Git
(1 response) avital 2019-03-20 15:00

Hello -

LabKey is in the process of migrating our source code from SVN to GitHub. This Friday evening we will be migrating the server/ api, internal and modules directories to Git. This change will only affect SVN Trunk. After the migration the new repos will be found here: https://github.com/LabKey/platform, https://github.com/LabKey/commonassays. Once the migration is finished, we will announce the all-clear with final instructions on enlistment.

Thank you,
Avital

view message
Assign group permissions via js api
(2 responses) WayneH 2019-03-06 06:28

Good morning,

We see in the javascript API reference methods for creating containers, user accounts and groups and adding members to the groups.. We are unclear on how we set permissions/security policy on the groups we create in order to define roles and permissions for users in the project. Can you point us in the right direction for this.. Our aim is to manage groups and users profiles and permissions programmatically.

Thanks,

WH

view message
Error with Foreign Keys
(1 response) marcia hon 2019-02-28 11:44

This issue happens sometimes with different values, and I don't understand why this happens:

I have a custom table created via ETL. It has a column that references a lookup table.

When I put legitimate data into this column, I get the following error:

SqlExecutor.execute(); SQL []; ERROR: insert or update on table "samples_samplesnotreceived" violates foreign key constraint "fk_samsamnotrecdiagnosis1"
Detail: Key (diagnosis1)=(Hallucinogen Persisting Perception Disorder) is not present in table "diagnosis".; nested exception is org.postgresql.util.PSQLException: ERROR: insert or update on table "samples_samplesnotreceived" violates foreign key constraint "fk_samsamnotrecdiagnosis1"
Detail: Key (diagnosis1)=(Hallucinogen Persisting Perception Disorder) is not present in table "diagnosis".

"Hallucinogen Persisting Perception Disorder" is indeed in the "diagnosis" table but it is unable to recognize it.

Please let me know how to correct this.

Thanks,
Marcia

view message
Auditing Custom Tables
(5 responses) marcia hon 2019-02-28 10:34

Hello,

I created a custom Schema and corresponding custom tables.

How would I enable auditing of these tables? Is there some special commands in XML?

Thanks,
Marcia

view message
Name Checker Pipeline
(1 response) marcia hon 2019-02-28 10:13

Hello,

We have demographics tables with participantIDs that must have the following format: AAA##AAA####### .

Is it possible to create a pipeline that will verify that these naming conventions are followed?

Thanks,
Marcia

view message
Dev setup problem - jsp directory not found
(1 response) Will Holtz 2019-02-06 17:14

Hi,

I'm setting up a development machine, which I have done successfully several times before, but I keep running into this error (from catalina.log):

ERROR ExceptionUtil            2019-02-06 16:57:46,724     http-nio-8080-exec-1 : Unhandled exception: 500: Unexpected server error
javac: directory not found: /Users/wholtz/labkey/release18.3/build/modules/core/classes/java/jsp
Usage: javac <options> <source files>
use -help for a list of possible options

INFO  SqlScriptManager         2019-02-06 16:57:46,725           Module Upgrade : start running script : ms2-0.00-16.10.sql
ERROR ExceptionUtil            2019-02-06 16:57:46,734     http-nio-8080-exec-1 : Exception detected
javac: directory not found: /Users/wholtz/labkey/release18.3/build/modules/core/classes/java/jsp
Usage: javac <options> <source files>
use -help for a list of possible options


The full catalina.log is attached. If I create the missing jsp directory, this process gets further but stops whenever another module tries to display jsp.

I'm running:
Labkey 18.3
Apache Tomcat 8.5.37
Mac OS X 10.14.3
Oracle JDK 1.8.0_191-b12
Postgres 10.4

any ideas would be appreciated.

thanks,
-Will

 catalina.out 
view message
Labkey Server on development environment is not working
(1 response) dhanya sathyan 2019-02-01 14:41

I have been following the instructions on the Labkey website https://www.labkey.org/Documentation/wiki-page.view?name=devMachine accurately to set up my development environment. I also might have to tell you the Build from gradlew worked to completion showing me no errors. But after deploying it into Tomcat, the Lab key server shows the below error when we browse to : http://localhost:8080/labkey .

Configuration Error Detected at LabKey Server Startup
This server does not appear to be compiled for production mode
There is a problem with your configuration. Please contact your organization's server administrator for assistance or visit the LabKey Support Portal to view additional support options.
org.labkey.api.util.ConfigurationException: This server does not appear to be compiled for production mode
at org.labkey.api.module.ModuleLoader.verifyProductionModeMatchesBuild(ModuleLoader.java:476)
at org.labkey.api.module.ModuleLoader.doInit(ModuleLoader.java:344)
at org.labkey.api.module.ModuleLoader.init(ModuleLoader.java:249)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:266)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4657)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5304)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:629)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)

So, then I build the code in production mode, which also ran smoothly . But again, after deploying it into Tomcat, the Lab key server shows the below error when we browse to : http://localhost:8080/labkey :

500: Unexpected server error. If contacting support regarding this error, please refer to error code: 2M8ESF
org.labkey.jsp.compiled.org.labkey.core.login.setPassword_jsp
java.lang.ClassNotFoundException: org.labkey.jsp.compiled.org.labkey.core.login.setPassword_jsp
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.labkey.api.jsp.JspClassLoader.loadClass(JspClassLoader.java:71)
at org.labkey.api.jsp.JspLoader.createPage(JspLoader.java:62)
at org.labkey.api.view.JspView.<init>(JspView.java:90)
at org.labkey.api.view.JspView.<init>(JspView.java:99)
at org.labkey.core.login.LoginController$AbstractSetPasswordAction.getView(LoginController.java:1490)
at org.labkey.core.login.LoginController$InitialUserAction.getView(LoginController.java:1785)

Your help in this regard is much appreciated.

view message
Resources to learn survey implementation?
(1 response) bjorn vandewalle 2019-01-30 05:37

Hello,

I am trying to better understand the different ways surveys can be implemented in LabKey Server. Besides the Electronic Data Capture documentation available on the site, are there any other resources available to better understand the mechanics behind the surveys, especially related to the JSON coding and its links to lists?

Kind regards,

Björn Vandewalle

view message
Labkey Teamcity Server Scheduled Maintenance Sunday January 20th, 2019 1300 PST
stuartm 2019-01-17 22:00

Hello,

We will be preforming scheduled maintenance on the LabKey TeamCity build server this Sunday January 20th starting at 13:00 PST.

During this maintenance window the TeamCity build queue will be paused and no builds will be processed.

We expect this maintenance work to take approximately 3 to 4 hours.

view message
Custom Demographics Table
(1 response) marcia hon 2019-01-08 08:29

Hello,

I have built a custom demographics table in LabKey using ETL scripts.

I would like to leverage the demographics option that populates participants into study.participants.

How could I make my custom demographics table automatically populate study.participants?

Thanks,
Marcia

view message
Running into ClassNotFoundException for Dev Labkey setup
(1 response) Manoj Ramakrishnan 2019-01-07 10:30

Hi,
I am following the setup as provided by this link :https://www.labkey.org/Documentation/wiki-page.view?name=devMachine

When I start the LabKey Dev start config I am running into this error. Any help is appreciated. AS notes I am on Tomcat, 8.5.37 and OpenJDK 11.

Thanks,
Manoj

Jan 06, 2019 7:45:24 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor [/Users/mramakrishnan/Tomcat/Labkey/8.5.37/libexec/conf/Catalina/localhost/labkey.xml]
Jan 06, 2019 7:45:24 PM org.apache.catalina.loader.WebappLoader startInternal
SEVERE: LifecycleException
java.lang.ClassNotFoundException: org.labkey.bootstrap.LabKeyBootstrapClassLoader
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at org.apache.catalina.loader.WebappLoader.createClassLoader(WebappLoader.java:507)
at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:392)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5124)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:629)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)

Jan 06, 2019 7:45:24 PM org.apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/labkey]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:629)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [WebappLoader[/labkey]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5124)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 10 more
Caused by: org.apache.catalina.LifecycleException: start:
at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:417)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 12 more
Caused by: java.lang.ClassNotFoundException: org.labkey.bootstrap.LabKeyBootstrapClassLoader

 labkey.xml 
view message
Custom Tables built via XML modules
(1 response) marcia hon 2019-01-03 12:53

Hello,

I have several custom tables that each have a column called "participantid".

Is it possible to link these tables by participantid?

Thanks,
Marcia

view message
Editable Queries
(1 response) marcia hon 2019-01-03 09:18

Hello,

Is it possible to create queries whose values are editable?

Thanks,
Marcia

view message
Lookup Dropdown Widget for Dataset to Dataset FKs
(1 response) Matt V 2018-12-12 15:47

Hello,
I have a handful of datasets with FKs (lookups) out to lists and other datasets. On the insert/edit forms, the list lookups render as dropdown widgets with available options included. However, the dataset-->dataset lookups continue to render as plain text input boxes.

Is this expected behavior, or is there some way to force the dropdown widget type? I've played around with query.xml, the gui, and even manually added FKs to the table with no luck.

Thanks.

view message
Selenium 3 upgrade
(1 response) Trey 2018-12-10 14:12

LabKey uses Selenium to drive our functional UI test automation. The LabKey test team has been migrating our test code to Selenium 3 over the past few months. This will, among other things, allow our tests to run tests against more current releases of Firefox and protect us from incompatibilities with new versions of Java.

We've fixed most of the major issues we've encountered and are close to the home stretch. We have been performing the migration in a separate branch and we will merge our changes back to trunk on Tuesday, December 11.

This update is almost exclusively to test code and the following steps are necessary only if you currently run UI tests locally against trunk with Firefox 45. Selenium tests running under Chrome should continue to work, though there may be new failures due to minor performance variation in the newer version of Selenium. JavaScript test frameworks such as Jest should be unaffected.

After the merge

  • Install a current version of Firefox if you don't have it. We've been validating with 62.0.2 on TeamCity. Geckodriver claims to support 57+ but we hit some pretty significant issues with versions as late as 60. We generally recommend using the latest ESR release but there will not be a reliable (for testing) ESR release until next July.
  • Make sure server/test/test.properties is up-to-date
    • selenium.firefox.binary should point at a new version of Firefox instead of ESR 45
    • Make sure webtest.webdriver.logging=false. You'll get an unreasonable amount of logging if that isn't set
    • Run a test and make sure it works for you. Nothing in-depth, just make sure it works.

Please bear with us as we iron out the last few kinks over the next couple of weeks. Let us know immediately if you have any concerns or if you have any difficulty after the merge.

view message
LabKey Artifactory Maintenance 12/10/2018 7 AM PST - 10 AM PST
(1 response) stuartm 2018-12-10 07:05

Hello,

Hello,

We will be performing scheduled maintenance on LabKey's artifactory server ( https://artifactory.labkey.com/ ) on Monday 12/10 between 7AM and 10 AM.

This will affect build artifacts during this maintenance period.

While Artifactory is unavailable, you should use the --offline flag for gradle when building.

We are performing this maintenance to install the latest security patches for Artifactory and its underlying operating system.

view message
Linking between custom tables
(1 response) marcia hon 2018-12-03 12:45

Hello,

I have table_a with column "participant"

and

table_b with column "participant".

I would like for these columns to be linked.

I know I can do foreign/primary key.

In the attached screenshot, I would like the Participantid to link both tables.

In my second screenshot, this is what I would like to have. A location with all the links.

I look forward to your expertise.

Thanks,

 test.png  test1.png 
view message
Batch creation of file sets
(1 response) WayneH 2018-11-26 12:20

Hi everyone

we have a file repository that will have a somewhat complicated structure because it is meant to facilitate incoming data from multiple sites and we would like to create fillesets for each of these so that we can expose only specific folders to users via the file web part. Creating these individually is doable but it would be much more preferable to create some automated/batch scripted process to generate these? Is there some way to do this in labkey? I don't see any where in the schema that we can list/add/update fillesets... that might be a path to a solution?

thanks,

Wayne H

view message
File Repository
(1 response) marcia hon 2018-11-21 11:11

Hello,

With regards to the File Repository, in your documentation, you state:

A launching point for structured data files like Excel files, that can be imported into the LabKey Server database for more advanced analysis.

Please could you clarify what this means?

Does it mean that I can create datasets that link to these excel files on the fly? How does this work?

Thanks,
Marcia

view message
Trunk builds now require Java 11 (or 12)
adam 2018-11-20 08:27

We made a change yesterday so that trunk now requires Java 11, no longer supporting Java 8. This is in preparation for our 19.1 release, which will support only Java 11 and 12. If you build LabKey Server from trunk, or build Java modules that need to run on trunk builds, you will need to install Java 11 on your development machine: https://jdk.java.net/11 You will also need to upgrade test, staging, and production servers before deploying any post-18.3 build. You can run Java 11 and 8 side-by-side in case you still need to run 18.2 or older versions.

For more information, see the 18.3 Release Notes, our Supported Technologies page, or this post on the LabKey blog:

https://www.labkey.com/the-java-shake-up-what-it-means-to-labkey-and-you/

Let us know if you have any questions.

Thanks,
Adam

view message
Filter By Group in SQL Query Views
(1 response) Matt V 2018-11-16 14:09

We're currently using the "Filter by Group" functionality (https://www.labkey.org/Documentation/wiki-page.view?name=filteringData#group) for datasets and it's great. However, we have a few external schema sql queries with qviews that combine multiple datasets and would like to be able to use this same functionality.

I created a <module>/resources/queries/myview.query.xml file, the corresponding qview, and attempted to add the "filter" option or simply set includeStandardButtons to true, but it appears "Filter" doesn't exist for views.

Is this correct or is there a way to replicate/enable that functionality for queries?

Thanks!

view message
16.3 to 18.2 Upgrade - Issue Tracker Differences
(2 responses) slatour 2018-11-12 07:08

Hi LabKey,

When running a User acceptance test after upgrading to 18.2 from 16.3 we noticed that the issue tracker is no longer populated from all project users. We noticed that the assigned users list is populated only if a user belongs to a project group AND has an editor or higher role. What was the reasoning behind this change? As of current, some users are editors but since they do not belong to a specific project group we have added them ad hoc in an editor role, therefore they will no longer be populated in the assigned list for issue tracking in version 18.2.

Please advise,

-Sara

view message
Default value for boolean list field can not be set to false
(2 responses) eva pujadas 2018-11-12 05:12

Dear LabKey,

We are running LabKey 18.2.
We have observed that it is not possible to set a boolean type field to default value "false" through the "Edit Design" menu.

To reproduce this bug:

  • from a list click "Design"
  • "Edit design"
  • Select the "Boolean" type field and go the the "Advanced" tab
  • In "Default Value" select "SET VALUE"
  • Enable the checkbox for the boolean field and save
    As a result the default value for this boolean field will be set to "true", instead of "[none]", as expected.

But, if you want to have a default value "false", repeating the steps and setting it to "false" will not work, it will permanently stay to default value "true".

Thanks for your support,
Eva

view message
Revoke delete sample set permissions
(1 response) eva pujadas 2018-11-01 07:15

Dear LabKey developers,

Is there a way to disable the "Delete Set" button in the "Sample Set Properties" view (see attached screenshot) or to revoke delete permissions to a user while still allowing him/her to edit sample sets?

Thanks in advance,
Eva

 sample_set_revoke_delete_permissions.png 
view message
401 unauthorized error... using deleterows query
(6 responses) WayneH 2018-10-31 09:40

Good morning,

we have been testing a workflow that we have currently running on a project in 16.3 pro+ and tested same on 17.3 community now testing on 18.2 community. The process here includes a perl script that reads existing data in a dataset (specifically the LSID) and is supposed to use that to delete the rows of data in that dataset via deleterows api function and then write new data to that table. We are able to read the data no problem to get the LSID but when we try to delete the rows we get a 401 error. If we delete the data manually we get a 401 error when we try to write the new data to the table... This worked in testing v17.3.. Not sure why we are not getting it to work now.. Is there any change in the api in v 18 that may be causing this? Or are we missing some detail..?

thanks

Wayne H

view message
Email notification when adding an existing user to a new project
(1 response) sofia g 2018-10-30 03:08

Hello all,

I know there is the possibility to add a new person to a project, and send an email notifying them about it, by adding them as new members to a group and including a message in folder permissions. However, for users that are already existing, no email is sent when they are added to the new goup.

I was wondering if there is such a functionality, to inform users by email whenever they are added to a new project. Is this something you would consider developing?

Best regards,
Sofia

view message
Python API - How do we view the names of all the Datasets in a given study using an API call?
(1 response) Chidi 2018-10-29 08:27

How do we view the names of all the datasets in a study? Thank you very much.

view message
SQL javascript API How to quickly delete all rows in a list and/or create temporary tables/lists to do SQL Operations
(4 responses) dabaker3 2018-10-24 08:07

• We are using Javascript + SQL
• We are trying to check for duplicates (with a algorithm since we have paired data). Then we want add the data if certain columns changed data for a give ID (ID Column, not unique column)
••• We do not want to update the rows, if the row data changes we want to create a new row.

Here are the questions:
1.). Is there a way to use drop/create temp tables and then remove these temp tables?
• Here are the operations I would typically use: CREATE, INSERT, DELETE, DROP, RANK which are all unavailable since they are not read only.
2.) Is there a way to direct insert rows from one table/list to another without first downloading the data?
3.) Is there a way to delete all rows of a table in Javascript quickly? It takes me 29 seconds to delete 3000 rows using the deleteRows() javascript API

Here is the current process:
1.) I am selecting all keys from the temp table (pre-made as a list) and downloading them the script as a data object using labkey.query.selectRows(): <1 seconds (also can have a problem with multiple users accessing the temp table at the same time)
2.) Deleting all rows using labkey.query.deleteRows()
3. ) Inserting the new data as a labkey.query.importData() JSON row object (~3000 rows x 14 columns, 328kb as a text file)
4.) SQL Operation to find duplicates (Based on stored queries/views)
5.) Get new/unique rows and download to javascript
6.) Insert new rows

view message
Schemas directory moved - action required
Susan Hert 2018-10-22 07:27

With r60757 in trunk, the schemas directory (<labkeyRoot>/schemas) has been moved into the api module (<labkeyRoot>/server/api/schemas). This consolidation makes for one less special part of the build, which should allow a bit of clean up in a later release of the gradle plugins.

To avoid having two jars for these XSDs if you are building from source, you will need to do some special cleaning. For those who prefer a ham-fisted approach, you can accomplish this with

  gradlew cleanBuild
   gradlew deployApp

and a little patience. (And if you're picking up this change along with the update of the Gradle Plugins version, which happened with r60731, you'll essentially be rebuilding everything anyway, so you might as well use this option.)

If you prefer a more delicate cleaning, you can do:

  rm -r build/modules/schemas/
   rm build/deploy/labkeyWebapp/WEB-INF/lib/schemas-18.3-SNAPSHOT-schemas.jar 
   gradlew deployApp

In either case, you'll want to follow this cleaning with a Gradle refresh in IntelliJ so it will pick up the new location of the XSDs in its build as well.

Thanks!

Susan

view message
Insert User Data
(1 response) WayneH 2018-10-09 06:40
Is it possible to bulk insert user data to the core user schema?

thanks

Wayne H
view message
Announcement: DataIntegration module move from svn to git
tgaluhn 2018-09-25 16:26

As previously announced, in the upcoming 18.3 release of LabKey Server, the DataIntegration (ETL) module will be a premium feature to support LabKey continued investment in its development. To support this, effective with SVN trunk commit r60372, the module has been moved from LabKey’s SVN server into a private, LabKey-managed GitHub repository.

This will impact you if:

  • You have a local development box
  • You are pulling source code from the trunk in SVN, or will be pulling source code for 18.3 or subsequent releases
  • And at least one of the following is true on your development machine:
    • You are writing ETL xml definitions in a module
    • You are running ETLs defined by any module
    • You are writing user defined ETLs in the application

If you will be affected by this change and have not already been contacted, or if you have any other questions or concerns, please contact your LabKey representative.

Thank you!

view message
A helper for using the python API
Brian Connolly (Proteinms.net) 2018-09-20 16:10

One of the big annoyances when using it the LabKey python api is that I need to define the URL for the LabKey server as a bunch of different variables. This makes it hard to write scripts/tools for non programmers to use.

This problem has gotten so annoying lately that I wrote a little function to help me The function simply takes a LabKey URL and breaks it into it's component parts. It has been so useful I figured I would share it.

The function which will take a URL and

  1. Check if it for a LabKey Server
  2. Rip the URL apart and find the hostname, port, protocol, context path and container path.
def read_url(url):
    """
    Break apart URL provided into protocol, hostname and context path
    :param url: LabKey Server url
    """
    url_config = {}

    # Parse the url
    o = urlparse(url)

    # Verify URL is a URL
    if not o.scheme:
        raise ExitCommandWithMessage("URL specified is not valid. Please enter valid URL")
    if not o.netloc:
        raise ExitCommandWithMessage("URL specified is not valid. Please enter valid URL")

    # Check if URL includes a context path
    test_url = o.scheme + '://' + o.netloc + '/project-getContainers.view'
    response = requests.get(test_url)
    if response.status_code == 200:
        context_path = None
    else:
        context_path = o.path.split('/')[1]
        test_url = o.scheme + '://' + o.netloc + '/' + context_path + '/project-getContainers.view'
        response = requests.get(test_url)
        if response.status_code != 200:
            raise ExitCommandWithMessage("URL specified is not running a LabKey Server. Please enter valid URL")

    # Determine if URL includes a container path
    # This assumes using new style LabKey URLs
    if context_path is None:
        if len(o.path.split('/')) < 3:
            # The url does not contain a container path
            url_config['container_path'] = None
        else:
            url_config['container_path'] = o.path.rsplit('/', 1)[0]
    else:
        urlpath = o.path.split('/', maxsplit=2)
        if len(urlpath) < 4:
            # The url does not contain a container path
            url_config['container_path'] = None
        else:
            url_config['container_path'] = urlpath[2].rsplit('/', 1).join('/')

    # Create output for function
    url_config['labkey_server'] = o.netloc
    url_config['context_path'] = context_path
    if o.scheme == 'http':
        url_config['use_ssl'] = False
        url_config['verify_ssl'] = False
        url_config['url'] = "http://" + o.netloc
    elif o.scheme == 'https':
        url_config['use_ssl'] = True
        url_config['verify_ssl'] = True
        url_config['url'] = "https://" + o.netloc
    else:
        raise ExitCommandWithMessage("URL specified is not valid. Please enter valid URL")

    return url_config

To use this function, all you need to do is

from labkey.utils import create_server_context
import urlparse

labkey_url = "https://www.labkey.org/home/Developer/issues/project-begin.view?"
# Validate LabKey Server URL break into component parts
url_config = read_url(labkey_url)
server_context = create_server_context(url_config['labkey_server'],
                                       url_config['container_path'],
                                       url_config['context_path'],
                                       use_ssl=url_config['use_ssl'],
                                       verify_ssl=url_config['verify_ssl']
                                       )
....


I hope this helps.

Brian

PS: I also have some code that can be used to access the server using username/password (via basic auth) instead of relying on a netrc file. I would be happy to share if anyone is interested.

view message
Setting Audit Detail Level
(2 responses) marcia hon 2018-09-17 10:40

Hello,

I created a custom table using modules.

How can I enable auditing of these custom tables.

Thanks,
Marcia

view message
Audit - Granularity
(2 responses) marcia hon 2018-09-12 10:32

Hi,

I would like to ask you if in the Audit Log, we can see what records/variables were added/updated/deleted?

I need to have this very fine granularity.

Thanks,
Marcia

view message
Editing more than one record at a time
(1 response) marcia hon 2018-09-10 09:24

Hello,

In my use-case, we would like the option whereby more than one record is updated at the same time.

Please let me know how this may be achieved as it is a crucial ability in our LabKey project.

Thanks,
Marcia

view message
Joining tables based on Subject Id and Visits/Sequence
(3 responses) Edward 2018-09-05 05:01

Hi,

I have a visit based study where there are multiple observations for a specific subject per visit. I have defined a sequence map (e.g., 1-10 sequence belongs to visit 1). Is there a way to create a data grid by joining the tables not based on visits sequence but by subject ids and any other column?

The reason is because if I try to join the two table where in one table I repeated visits and the second table has only one visit per subject, then the resulting grid has only visit joined and all the other rows are appended as if they belong to a different visit, which is not true.

In database terminology, I am talking about an outer merge of two tables based on subject id and visit ( not by subject id and visit sequence number).
Can anybody help here?

view message
Charts not displaying correctly
(3 responses) bront 2018-09-04 09:44

hi,

After upgrading to 18.2, I notice that charts aren't displaying correctly. Oddly, the data is is being displayed, but there are no graphics representing the bars or pieces of the pie charts (see attachment).

Here are the required files that worked prior to the upgrade:

"clientapi/ext4/Util.js",
"clientapi/ext4/data/Reader.js",
"clientapi/ext4/data/Proxy.js",
"clientapi/ext4/data/Store.js",

Here are the files I am requiring additionally in my efforts to fix the issue:

"vischart.min.js",
"vis/genericChart/genericChartHelper.js",
"vis/lib/crossfilter-1.3.11.min.js",
"vis/vis.min.js"

I am using the following to create the charts:

Ext4.create('Ext4.chart.Chart', { })

Am I missing a CSS file? Should I be using LABKEY.vis or LABKEY.chart? Something else?

Thanks for your help.

bront

 chart_issue.png 
view message
Tables - Change Values for Multiple Rows
(3 responses) marcia hon 2018-08-15 08:31

Hello,

I have a dataset/assay/list table.

There are multiple rows.

I would like to change the value for one of the columns for all of the rows.

I know that I can do this on a row-by-row basis using "edit".

However, is it possible to do this at the same time for multiple rows?

Thanks,
Marcia

view message
ExecutingSelector; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: relation "exp.ObjectPropertiesView" does not exist Position: 714
(1 response) marcia hon 2018-08-10 11:04

Hello,

Another error... how can i solve this?

An unexpected error occurred
ExecutingSelector; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: relation "exp.ObjectPropertiesView" does not exist Position: 714

org.springframework.jdbc.BadSqlGrammarException: ExecutingSelector; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: relation "exp.ObjectPropertiesView" does not exist
Position: 714
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
at org.labkey.api.data.ExceptionFramework$1.translate(ExceptionFramework.java:37)
at org.labkey.api.data.ExceptionFramework$1.translate(ExceptionFramework.java:31)
at org.labkey.api.data.SqlExecutingSelector$ExecutingResultSetFactory.handleSqlException(SqlExecutingSelector.java:450)
at org.labkey.api.data.BaseSelector.handleResultSet(BaseSelector.java:280)
at org.labkey.api.data.BaseSelector.getArrayList(BaseSelector.java:102)
at org.labkey.api.data.BaseSelector.getArrayList(BaseSelector.java:97)
at org.labkey.api.exp.OntologyManager.getPropertyObjects(OntologyManager.java:609)
at org.labkey.api.reports.model.ReportPropsManager.getPropertyValue(ReportPropsManager.java:175)
at org.labkey.api.reports.model.ReportPropsManager.getProperties(ReportPropsManager.java:243)
at org.labkey.api.reports.report.ReportDescriptor.initProperties(ReportDescriptor.java:382)
at org.labkey.query.reports.ReportServiceImpl._getInstance(ReportServiceImpl.java:436)
at org.labkey.query.reports.DatabaseReportCache$ReportCollections.lambda$new$0(DatabaseReportCache.java:63)
at org.labkey.api.data.BaseSelector.lambda$forEach$3(BaseSelector.java:314)
at org.labkey.api.data.BaseSelector.lambda$forEachMap$1(BaseSelector.java:232)
at org.labkey.api.data.BaseSelector.handleResultSet(BaseSelector.java:263)
at org.labkey.api.data.BaseSelector.forEachMap(BaseSelector.java:226)
at org.labkey.api.data.BaseSelector.forEach(BaseSelector.java:316)
at org.labkey.api.data.BaseSelector.forEach(BaseSelector.java:295)
at org.labkey.query.reports.DatabaseReportCache$ReportCollections.<init>(DatabaseReportCache.java:62)
at org.labkey.query.reports.DatabaseReportCache$ReportCollections.<init>(DatabaseReportCache.java:47)
at org.labkey.query.reports.DatabaseReportCache.lambda$static$0(DatabaseReportCache.java:45)
at org.labkey.api.cache.BlockingCache.get(BlockingCache.java:144)
at org.labkey.api.cache.BlockingCache.get(BlockingCache.java:81)
at org.labkey.api.cache.BlockingCache.get(BlockingCache.java:203)
at org.labkey.query.reports.DatabaseReportCache.getReportsByReportKey(DatabaseReportCache.java:122)
at org.labkey.query.reports.ReportServiceImpl.getReports(ReportServiceImpl.java:551)
at org.labkey.api.reports.report.view.ReportUtil.getReportsIncludingInherited(ReportUtil.java:330)
at org.labkey.api.query.QueryView.addReportViews(QueryView.java:1650)
at org.labkey.api.query.QueryView.createReportButton(QueryView.java:1386)
at org.labkey.study.assay.query.AssayListPortalView.populateButtonBar(AssayListPortalView.java:59)
at org.labkey.api.query.QueryView.setupDataView(QueryView.java:2002)
at org.labkey.api.query.QueryView.createDataView(QueryView.java:1990)
at org.labkey.study.assay.query.AssayListQueryView.createDataView(AssayListQueryView.java:95)
at org.labkey.study.assay.query.AssayListPortalView.createDataView(AssayListPortalView.java:51)
at org.labkey.api.query.QueryView.renderDataRegion(QueryView.java:2101)
at org.labkey.api.query.QueryView.renderView(QueryView.java:1854)
at org.labkey.api.view.WebPartView.renderInternal(WebPartView.java:370)
at org.labkey.api.view.HttpView.render(HttpView.java:136)
at org.labkey.api.view.HttpView.render(HttpView.java:121)
at org.labkey.api.view.HttpView.include(HttpView.java:516)
at org.labkey.api.view.HttpView.include(HttpView.java:493)
at org.labkey.api.view.HttpView.include(HttpView.java:481)
at org.labkey.api.view.VBox.renderView(VBox.java:80)
at org.labkey.api.view.WebPartView.renderInternal(WebPartView.java:370)
at org.labkey.api.view.HttpView.render(HttpView.java:136)
at org.labkey.api.view.HttpView.render(HttpView.java:121)
at org.labkey.api.view.HttpView.include(HttpView.java:516)
at org.labkey.api.view.HttpView.include(HttpView.java:493)
at org.labkey.api.view.HttpView.include(HttpView.java:481)
at org.labkey.api.view.VBox.renderView(VBox.java:80)
at org.labkey.api.view.WebPartView.renderInternal(WebPartView.java:370)
at org.labkey.api.view.HttpView.render(HttpView.java:136)
at org.labkey.api.view.HttpView.render(HttpView.java:121)
at org.labkey.api.view.HttpView.include(HttpView.java:516)
at org.labkey.api.view.HttpView.include(HttpView.java:493)
at org.labkey.jsp.compiled.org.labkey.api.view.template.HomeTemplate_jsp._jspService(HomeTemplate_jsp.java:224)
at org.labkey.api.view.JspView.renderView(JspView.java:168)
at org.labkey.api.view.WebPartView.renderInternal(WebPartView.java:370)
at org.labkey.api.view.HttpView.render(HttpView.java:136)
at org.labkey.api.view.HttpView.render(HttpView.java:121)
at org.labkey.api.action.SpringActionController.renderInTemplate(SpringActionController.java:528)
at org.labkey.api.action.SpringActionController.handleRequest(SpringActionController.java:423)
at org.labkey.api.module.DefaultModule.dispatch(DefaultModule.java:1208)
at org.labkey.api.view.ViewServlet._service(ViewServlet.java:190)
at org.labkey.api.view.ViewServlet.service(ViewServlet.java:124)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.labkey.api.data.TransactionFilter.doFilter(TransactionFilter.java:38)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.labkey.core.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:118)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.labkey.api.module.ModuleLoader.doFilter(ModuleLoader.java:1144)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.labkey.api.security.AuthFilter.doFilter(AuthFilter.java:206)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1100)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:687)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.postgresql.util.PSQLException: ERROR: relation "exp.ObjectPropertiesView" does not exist
Position: 714
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2453)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2153)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:286)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:432)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:358)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:171)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:119)
at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:82)
at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:82)
at org.labkey.api.data.dialect.StatementWrapper.executeQuery(StatementWrapper.java:1157)
at org.labkey.api.data.SqlExecutingSelector$ExecutingResultSetFactory.executeQuery(SqlExecutingSelector.java:391)
at org.labkey.api.data.SqlExecutingSelector$ExecutingResultSetFactory.getResultSet(SqlExecutingSelector.java:331)
at org.labkey.api.data.BaseSelector.handleResultSet(BaseSelector.java:261)
... 95 more
DialectSQL = SELECT *
FROM (
SELECT
ObjectPropertiesView.ObjectId AS ObjectId,
ObjectPropertiesView.Container AS Container,
ObjectPropertiesView.ObjectURI AS ObjectURI,
ObjectPropertiesView.OwnerObjectId AS OwnerObjectId,
ObjectPropertiesView.name AS name,
ObjectPropertiesView.PropertyURI AS PropertyURI,
ObjectPropertiesView.RangeURI AS RangeURI,
ObjectPropertiesView.TypeTag AS TypeTag,
ObjectPropertiesView.FloatValue AS FloatValue,
ObjectPropertiesView.StringValue AS StringValue,
ObjectPropertiesView.DatetimeValue AS DatetimeValue,
ObjectPropertiesView.MvIndicator AS MvIndicator,
ObjectPropertiesView.PropertyId AS PropertyId,
ObjectPropertiesView.ConceptURI AS ConceptURI,
ObjectPropertiesView.Format AS Format
FROM exp."ObjectPropertiesView" ObjectPropertiesView ) x
WHERE (ObjectURI = ?) AND (Container = ?)

...

view message
ExecutingSelector; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: relation "comm.Threads" does not exist Position: 681
(1 response) marcia hon 2018-08-10 10:54

Hello,

How is this error created? How can I fix it?

An unexpected error occurred
ExecutingSelector; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: relation "comm.Threads" does not exist Position: 681

org.springframework.jdbc.BadSqlGrammarException: ExecutingSelector; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: relation "comm.Threads" does not exist
Position: 681
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
at org.labkey.api.data.ExceptionFramework$1.translate(ExceptionFramework.java:37)
at org.labkey.api.data.ExceptionFramework$1.translate(ExceptionFramework.java:31)
at org.labkey.api.data.SqlExecutingSelector$ExecutingResultSetFactory.handleSqlException(SqlExecutingSelector.java:450)
at org.labkey.api.data.BaseSelector.handleResultSet(BaseSelector.java:280)
at org.labkey.api.data.BaseSelector.getArrayList(BaseSelector.java:102)
at org.labkey.api.data.BaseSelector.getArrayList(BaseSelector.java:97)
at org.labkey.announcements.model.AnnouncementManager.getAnnouncements(AnnouncementManager.java:115)
at org.labkey.announcements.AnnouncementsController$AnnouncementWebPart$MessagesBean.<init>(AnnouncementsController.java:2316)
at org.labkey.announcements.AnnouncementsController$AnnouncementWebPart$MessagesBean.<init>(AnnouncementsController.java:2306)
at org.labkey.announcements.AnnouncementsController$AnnouncementWebPart.<init>(AnnouncementsController.java:2255)
at org.labkey.announcements.AnnouncementsController$AnnouncementWebPart.<init>(AnnouncementsController.java:2286)
at org.labkey.announcements.AnnouncementsController$AnnoucementWebPartFactory.getWebPartView(AnnouncementsController.java:2348)
at org.labkey.api.view.Portal.getWebPartViewSafe(Portal.java:1208)
at org.labkey.api.view.Portal.populatePortalView(Portal.java:995)
at org.labkey.api.view.Portal.populatePortalView(Portal.java:959)
at org.labkey.core.portal.ProjectController$BeginAction.getView(ProjectController.java:327)
at org.labkey.core.portal.ProjectController$BeginAction.getView(ProjectController.java:280)
at org.labkey.api.action.SimpleViewAction.handleRequest(SimpleViewAction.java:80)
at org.labkey.api.action.BaseViewAction.handleRequest(BaseViewAction.java:177)
at org.labkey.api.action.SpringActionController.handleRequest(SpringActionController.java:415)
at org.labkey.api.module.DefaultModule.dispatch(DefaultModule.java:1208)
at org.labkey.api.view.ViewServlet._service(ViewServlet.java:190)
at org.labkey.api.view.ViewServlet.service(ViewServlet.java:124)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.labkey.api.data.TransactionFilter.doFilter(TransactionFilter.java:38)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.labkey.core.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:118)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.labkey.api.module.ModuleLoader.doFilter(ModuleLoader.java:1144)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.labkey.api.security.AuthFilter.doFilter(AuthFilter.java:206)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1100)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:687)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.postgresql.util.PSQLException: ERROR: relation "comm.Threads" does not exist
Position: 681
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2453)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2153)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:286)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:432)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:358)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:171)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:119)
at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:82)
at org.apache.tomcat.dbcp.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:82)
at org.labkey.api.data.dialect.StatementWrapper.executeQuery(StatementWrapper.java:1157)
at org.labkey.api.data.SqlExecutingSelector$ExecutingResultSetFactory.executeQuery(SqlExecutingSelector.java:391)
at org.labkey.api.data.SqlExecutingSelector$ExecutingResultSetFactory.getResultSet(SqlExecutingSelector.java:331)
at org.labkey.api.data.BaseSelector.handleResultSet(BaseSelector.java:261)
... 53 more
DialectSQL = SELECT *
FROM (
SELECT
Threads.RowId AS RowId,
Threads.EntityId AS EntityId,
Threads.CreatedBy AS CreatedBy,
Threads.Created AS Created,
Threads.ResponseCreatedBy AS ResponseCreatedBy,
Threads.ResponseCreated AS ResponseCreated,
Threads.AssignedTo AS AssignedTo,
Threads.Container AS Container,
Threads.Title AS Title,
Threads.Body AS Body,
Threads.RendererType AS RendererType,
Threads.Expires AS Expires,
Threads.Status AS Status,
Threads.LatestId AS LatestId,
Threads.discussionsrcidentifier AS discussionsrcidentifier,
Threads.discussionsrcurl AS discussionsrcurl,
Threads.ResponseCount AS ResponseCount,
Threads.Modified AS Modified,
Threads.LastIndexed AS LastIndexed
FROM comm."Threads" Threads ) x
WHERE (Container = ?)
ORDER BY Created DESC
LIMIT 101

...

view message
Downloading Files from Labkey Server
(1 response) jin 2018-08-08 16:30

I'm wondering if there's a way to download files from Labkey using a shell script or something similar. Is it possible using the WebDav functionality of Labkey?

Thanks!

view message
Full text search over hard table
(3 responses) Will Holtz 2018-08-06 17:19

Is there a mechanism I can utilize in a file-based module to get a hard tabled indexed by the full-text search indexer?

thanks,
-Will

view message
RLabkey: makeFilter on non-existant column returns all values
(1 response) Will Holtz 2018-08-06 13:52

Hi,

I was surprised to see that the following R code returns the total number of users and not zero:

library(Rlabkey)
nrow(labkey.selectRows(
baseUrl="http://localhost:8080/labkey/",
folderPath="/",
schemaName="core",
queryName="users",
colFilter=makeFilter(c("foo", "EQUAL", "bar")),
) )

Perhaps that is an 'undefined' operation and therefore this output is valid. I would find it more useful to get zero back as that is more likely to break my code and make me realize I made a typo in my column name. This is with LabKey v18.2 and Rlabkey v2.2.2.

thanks,
-Will

view message
assayFileUpload: larger file from JS variable
(1 response) Tim Holland 2018-08-01 08:12

Hi,

I'm attempting to use LABKEY.Ajax.request to create an assay file with assayFileUpload using the contents of a Javascript variable, but when the fileContents parameter gets too big (even just on the order of a few hundred lines) the request fails. It uses the method described in the documentation here: https://www.labkey.org/download/clientapi_docs/javascript-api/symbols/LABKEY.Exp.Data.html, with something like the following:

LABKEY.Ajax.request({
    url: LABKEY.ActionURL.buildURL("assay", "assayFileUpload", LABKEY.ActionURL.getContainer()),
    params: { protocolId: assay.id, fileName: name, fileContent: lines },
    success: function(response) {
        // ...do something...
    },
    failure: formFailed
});

Is there a recommended way to create a larger file from the contents of a Javascript variable that gets around this limitation? I'd prefer not to have to edit the Tomcat configuration files to do this.

view message
Can't declare foreign key relationship in module schemas/<schema>.xml metadata
(1 response) Will Holtz 2018-07-30 18:47

Hi,

I made a hard table that contains a foreign key to a Labkey userid (beyond the standard userid fields of createdby, modifiedby, owner). In the module schemas/<schema>.xml metadata I declared the foreign key. In my grid views, I could not get the userid lookup to occur; the integer value was displayed, not the displayname field. I know there are a lot of restrictions on access to core.users and related tables and I thought I was just not getting some of that right. However, I eventually realized that by declaring the foreign key in the module queries/<schema>/<query>.query.xml metadata, I was able to get the lookup to work. It is unclear to me if there is some reason why the foreign key declaration in the schema/<schema>.xml file did not work or if this behavior is unexpected.

I made a minimal reproduction that is contained in the attached module file. In this module, two identical hard tables are created. UserMetadata.SchemaMetadata has the foreign key declared in schemas/UserMetadata.xml. UserMetadata.QueryMetadata has the foreign key declared in queries/UserMetadata/QueryMetadata.query.xml. In both tables, "associateduser" is the userid field I am trying to get the foreign key metadata applied to such that the lookup of displayname occurs. In the Labkey query browser, the associateduser field in UserMetadata.SchemaMetadata does not show a lookup column, while the same field in the UserMetadata.QueryMetadata table has "core.Users.UserId (DisplayName)" as the Lookup column.

I did my testing on Labkey v18.2, Postgres v10.4, Tomcat v8.5.24.

thanks,
-Will

 UserMetadata-18.2.module 
view message
Limited number of records in executeSql
(1 response) zoya_pasha 2018-07-20 02:00
Hello,

I am using JavaScript API of Labkey 17.1. On using the function LABKEY.Query.executeSql, I am able to fetch records up to 100000. I checked the documentation. The default value for the same is 'All rows'. However, the maximum number of rows I am able to get in one transaction is limited. Please help!

Regards
Zoya
view message
TeamCity 2018.1 Upgrade
(1 response) Trey 2018-07-16 14:02

We plan on upgrading TeamCity to 2018.1 later this week.
In preparation, we may need to take it offline briefly over the next day or two. We will send out a warning an hour before any such outage. They should last no more than 15 minutes; in-progress builds will be unaffected and the server should pick up right where it left off once it comes back up.

The upgrade itself may take the better part of a day. This thread will be updated at least 24 hours before we start the upgrade process.

view message
Gridviews per User
(1 response) marcia hon 2018-07-03 12:17

Hello,

I have a big table.

Now, I wish to filter it so that only user_x would be able to view the table filtered on x and nothing else.

For example, I have a table :

Name Department Date
Marcia English Nov 21, 2018
Bobby French Aug 12, 2017
John Portuguese Oct 30, 2016

So, I want Marcia to only see data filtered on "English". With Bobby, "French" and with John "Portuguese".

Is this possible and how do you do this?

Thanks,
Marcia

view message
Data Transforms
(1 response) marcia hon 2018-06-28 10:28

Hello,

I have different users who use different parts of a project.

Now, there are around 6 data transformations.

I would like to refine this so that a certain individual will only see 1 data transform.

Is this possible?

Thanks,
Marcia

view message
Rlabkey calls from Transformation script result in 401 - User does not have permission to perform this operation
(1 response) Will Holtz 2018-06-27 16:42

I want to share a workaround to a problem I had. I'm not expecting anyone to follow up on this as I don't know how to reproduce the issue.

I have several file-based modules that contain assays with transformation scripts written in R. These transformation scripts use Rlabkey to read and write data from the Labkey instance. Today, these modules started hanging during the transformation scripts. It appears the Rlabkey calls back to the Labkey instance were failing with a 401 error and the error message ' User does not have permission to perform this operation.' This would even happen when performing the upload as a Labkey admin user. I created a test module that contained a minimal transformation script:

library('Rlabkey')
${rLabkeySessionId}
print(labkey.selectRows(
    baseUrl = '${baseServerURL}',
    folderPath = '/',
    schemaName = 'core',
    queryName = 'users',
))

On my development instance on my laptop, this transformation script worked fine, but on my production server it gave the 401 error. After a few hours of trying to figure out what was going on, I restarted my tomcat instance and everything started working again. Reloading the application within tomcat did not help -- only a full tomcat stop and start worked. So, if you are in a similar situation, try a tomcat restart.

I'm running Labkey v18.1, Tomcat v8.5.30, R v3.4.4, Rlabkey v2.2.1, R package httr v1.3.1 and R package rjson v0.2.19 on Ubuntu v18.04.

-Will

view message
Use trigger script to provide info message
(1 response) Sev 2018-06-25 12:40

Hello

We would like to give users an informational message following a dataset row insert that meets certain criteria. We have trigger scripts setup to check the criteria but it seems the only way to provide messages to the user is via the errors object, which would cancel the insert.

Is there a way we can set a message after an insert into a dataset that wont result in the transaction being cancelled?

Thanks

Sev

view message
Transformation Jobs
(1 response) marcia hon 2018-06-21 08:13

Hello,

I have several Transformation Jobs.

Is it possible to have "Data Transforms" view only show the Transformations we want?

For example,

Let's say I have transformation jobs: T1, T2, T3, T4, T5

I would like the "Data Transforms" webpart to only show : T3, T5

Thanks,
Marcia

view message
File Repository Module write location, etc.
(3 responses) Georgia Mayfield 2018-06-20 12:05

Hi all,

My team is considering using the File Repository module for file upload/storage and has some questions on its functionality/implementation.

First off, where does File Repository actually write the uploaded files (by default)? I'm unable to track uploaded test files on either the machine or in the database. Is there an API into the Webdav repository? Also, is there any sort of built-in backup for File Repository?

Is there's no backup in File Repository itself, then we would need to map the write space to a network drive, such as an RDS repository. What would you estimate to be the complexity/requirements of that?

Additionally, we would be interested in keeping metadata about the uploaded files and clickable links to the files in a database table to retain out current functionality. What sort of metadata capture features like this exist for File Repository, if any? Would it be possible to cap file size, if needed?

System Info

  • OS: rhel 6
  • Version: 17.3

Thanks,
Georgia Mayfield
OHSU Computational Biology

view message
LImit to insertrows query
(9 responses) WayneH 2018-06-20 07:01

Hello all,

we employ a script on our labkey server v16.3 (prof+ edition) that inserts a data array of 10k+ entries via the insertrows api call and it is failing.. it has no issues with smaller chunks of data so it appears that we have crossed a size limit.. a fix is kinda obvious but wanted to confirm with you what those limits are and if chunking things would be the solution or you may have an alternate approach you could recommend.

thanks,
WayneH

view message
Gradle Plugins Version 1.3
(1 response) Susan Hert 2018-06-18 16:55

With r58720 in trunk, the version of gradlePlugins has been updated to 1.3. As always, the full list of changes in this version are available in the README for the gradlePlugin repository. There are a couple of changes here that I wanted to call your attention to, one of which requires action from you for better success in building.

For the impatient, the summary is:

  • The build process will now download and use particular versions of npm and node. To avoid conflicts with node module versions, you need to remove any existing node_modules directories in the LabKey modules' enlistment directories before doing a build with the 1.3 gradlePlugin version. (If using npm from the command line, you should also update your path to reference the downloaded versions.)
  • Local builds will now fail if a conflict in version numbers is detected between two builds of a module (but you can change this behavior if you so desire).

Node and NPM

The build process will download the versions of npm and node that are specified by the properties npmVersion and nodeVersion, respectively, which are defined in the root-level gradle.properties file of the LabKey enlistment.

To avoid potential conflicts with node module versioning, you should remove any existing node_modules directories from your LabKey modules' directories before doing your first build with the 1.3 version. The 1.3 version of gradlePlugin provides a task, cleanNodeModules, that does just this. You can invoke this task at the root level of your enlistment and it will execute the task for all LabKey modules that have a package.json file. Alternatively, you can manually remove the node_module directory for each LabKey module that has one.

When running npm from the command line, you will want to be sure to use the version of npm that the gradle build uses. You can reference the versions for the core module in the <LABKEY_ROOT>/build/modules/core/.node/ directory.

On non-Windows platforms, the deployApp command creates symlinks for both node and npm in the directory .node at the root level of your enlistment:

trunk$ ls -la .node/
total 0
drwxr-xr-x   4 developer  staff   128 Jun 14 14:11 .
drwxr-xr-x  38 developer  staff  1216 Jun 18 10:36 ..
lrwxr-xr-x   1 developer  staff    90 Jun 14 14:11 node -> /Users/developer/Development/labkey/trunk/build/modules/core/.node/node-v8.11.3-darwin-x64
lrwxr-xr-x   1 developer  staff    77 Jun 14 13:58 npm -> /Users/developer/Development/labkey/trunk/build/modules/core/.node/npm-v5.6.0

If on Windows, you can create the symbolic links in the <LABKEY_ROOT>/.node directory manually to point to the node and npm versions in the core module's .node directory, as shown above. You should then put <LABKEY_ROOT>/.node/node/bin and <LABKEY_ROOT>/.node/npm/bin in your path.

If not using npm on the command line, the symbolic links and path changes are not necessary. (Note that the <LABKEY_ROOT>/.node directory won't exist until you run a deployApp command after updating to version 1.3.)

Local Build Version Discrepancies

With the 1.3 version, a feature that was incubating in the last release has now come out of incubation with a slight behavior change. You may have noticed if you did a build after someone updated a version of an external dependency that you would get a warning message something like this about version conflicts that would be produced by the build.

WARNING: Artifact versioning problem(s) in directory /Users/developer/Development/labkey/trunk/build/modules/api/explodedModule/lib:
  Conflicting version of commons-compress jar file (1.14 in directory vs. 1.16.1 from build).
  Conflicting version of objenesis jar file (1.0 in directory vs. 2.6 from build).

Now your build will fail if such version conflicts are detected (because the build would not be in a good state if both versions were included). If you need to, you can change that behavior by setting a value for the versionConflictAction parameter, as described in the Version Conflicts in Local Builds documentation.

view message
How to make a table not be deleteable
(1 response) marcia hon 2018-06-13 08:50

Hello,

I have created a table via module-etl.

Is there a way to force the table to not allow records to be deleted?

Thanks,
Marcia

view message
Stored Procedure and Lists Dropdown List
(1 response) marcia hon 2018-06-13 07:26

Hello,

I have a list that I wish to treat like a lookup table.

I have a foreign key for it via a table i created in etl module.

This linkage works, however, visually, there is no dropdownlist that informs the user of what values are appropriate.

Please could you let me know how to make this dropdownlist appear?

Thanks,
Marcia

view message
Grid button bars and the new UI
(1 response) Will Holtz 2018-06-08 10:53

In a file-based module, Is there a recommended way to add custom buttons with icons instead of text to a grid button bar? I'd like to get my custom buttons to match the look of the standard buttons, but don't see an obvious way of doing this short of hacking around in the DOM.

thanks,
-Will

view message
R Report Error
(4 responses) marcia hon 2018-06-08 10:19

Hello,

I get the following error when trying to run an R Report:

Error executing command
javax.script.ScriptException: javax.script.ScriptException: An error occurred when running the script 'script.R', exit code: 1).

My script is the following:

knitr::opts_chunk$set(echo=FALSE, cache=FALSE, comment=FALSE, comments = "", warning=FALSE, eval = TRUE, encoding = "native.enc")
#knitr::opts_chunk$get();
knitr::pandoc('script.Rmd', format='html')

currentdir <- getwd()
assign("html_filename", paste(currentdir, "/script.html", sep=""))
assign("out_filename", paste("/nip/NRG_Samples/@files/Reports/GenotypingResults_CNR1rs2023239_DRD3rs6280/Report_GenotypingResults_CNR1rs2023239_DRD3rs6280_", format(Sys.time(), "%Y-%m-%d_%H:%M:%S"), ".html", sep=""))

#list.files(path = ".", pattern = NULL, all.files = FALSE,
#           full.names = FALSE, recursive = FALSE,
#           ignore.case = FALSE, include.dirs = FALSE, no.. = FALSE)

file.copy(from = html_filename, to = out_filename)

system("rm script.* *.tsv")
#system("rm cache/*.*")
#list.files(path = ".", pattern = NULL, all.files = FALSE,
#           full.names = FALSE, recursive = FALSE,
#           ignore.case = FALSE, include.dirs = FALSE, no.. = FALSE)

<html>...</html>

I look forward to your suggestions.

Thanks,
Marcia

view message
LABKEY.QueryWebPart.standardButtons documentation is out of date
(4 responses) Will Holtz 2018-06-08 10:18

It appears that some of the LABKEY.QueryWebPart.standardButtons no longer work on v18.1.

<div id="ExampleDiv" />
<script>
new LABKEY.QueryWebPart({
        renderTo: 'ExampleDiv',
        schemaName: 'core',
        queryName: 'users',
        containerPath: '/',
        buttonBar: {
            items:[
              LABKEY.QueryWebPart.standardButtons.insertNew,
              LABKEY.QueryWebPart.standardButtons.pageSize
            ]
        },
 });
<script/>

Results in a message at the top of the grid, "WARNING: button bar configuration contains reference to buttons that don't exist. Invalid original text: insert new, paging."

-Will

view message
Error in clicking "EDIT" or "DETAILS" of a ETL created table
(1 response) marcia hon 2018-06-06 08:19

I created a table via ETL module and I populate it via a StoredProcedure module.

However, when I try to Edit / see Details of the records, I get this error:

An unexpected error occurred
ExecutingSelector; uncategorized SQLException for SQL []; SQL state [XX000]; error code [0]; ERROR: failed to find conversion function from unknown to text; nested exception is org.postgresql.util.PSQLException: ERROR: failed to find conversion function from unknown to text

I look forward to your response.

Thanks,
Marcia

view message
Data Grids and updating the URL to reflect current state
(4 responses) Will Holtz 2018-06-04 23:23

executeQuery.view does an excellent job of updating the page URL to keep track of the current filters, sorting and paging, such that if a user follows a link from the data grid and then uses the back button, the page is the same as when they left it. However, executeQuery.view isn't easy to extend without writing Java code. I frequently use javascript QueryWebParts so that I can easily customize and extend data grids, but my users get annoyed that these QueryWebPart data grids do not nicely retain their state like executeQuery.view does.

Is there some simple way to get QueryWebParts to update the URL to capture the current state of the grid? I understand there is the complexity of needing to deal with multiple QueryWebParts on a single page, but that doesn't seem like a show stopper. I likely can build this out using LABKEY.DataRegion events, but I can't imagine I'm the first person with this need and I'd rather not reinvent the wheel.

thanks,
-Will

view message
Deleting record in Assay from Stored Procedure
(1 response) marcia hon 2018-06-04 09:50

Hello,

I have an ETL Stored Procedure that gets data from an Assay.

Now, I would like that once this data has been copied to another table, that the data is erased in the Assay.

How do I do this in the Stored Procedure?

Thanks,
Marcia

view message
Filtering Datasets by row
(2 responses) WayneH 2018-06-01 13:17

Good afternoon,

I just wanted to know if there was a way to filter by row.. For example what we are trying to do is filter datasets to show rows that are not blank rather than applying a notnull filter to each field... But apply a global filter by row..

thanks.

Wayne H

view message
users groups roles for all projects in a single table
(3 responses) celikalper84 2018-05-31 10:27

Hi,

We have a platform that uses labkey community edition among other tools. Each of these tools have their own access regulations user roles etc and we want to combine them into a single location for tracking and auditing purposes.

I have been playing with the core schema of labkey and seems like a combination of principals, members, roleassignments, containers and usersdata should give me what I need. The information I'm trying to extract is as follows:

username, name, last name, email, group, groupid, role, container (path included if possible).

It seems like groups and subgroups are also treated like users, and the column names of these tables are not immediately intuitive to me.
I know that we can get this from view in the GUI but what we want to achieve is a daemon that can query this at certain intervals (every night or twice a day) in an automated fashion.

Is there a SQL query that can achieve this goal or at the very least where can I find information about how these tables are related to one another.

Thanks
Alper

view message
How to make custom tables' rows editable
(1 response) marcia hon 2018-05-30 05:52
Hello,

I created a module that consists of tables with the following definitions:

CREATE TABLE nrg01cmh_samples.Samples_Template (
    SeriesID VARCHAR(50),
    CollaboratorID VARCHAR(50),
    Sex VARCHAR(1),
    DateSampleDrawn DATE,
    DateSampleReceived DATE
);
---
   <ns:table tableName="Samples_Template" tableDbType="TABLE">
    <ns:columns>
      <ns:column columnName="SeriesID" />
      <ns:column columnName="CollaboratorID"/>
      <ns:column columnName="Sex"/>
      <ns:column columnName="DateSampleDrawn"/>
      <ns:column columnName="DateSampleReceived"/>
    </ns:columns>
   </ns:table>

However, when I access these tables in Labkey, I am not able to edit the rows as there is not "Edit" link.

The ability to edit these values is very important to our project.

Please let me know how to correct this issue.

Thanks,
Marcia
view message
Subversion migration complete
(1 response) jeckels 2018-05-23 20:01

The migration of our SVN server from hedgehog.fhcrc.org to svn.mgt.labkey.host is now complete.

As previously announced, the hedgehog.fhcrc.org server is now in read-only mode and it is not mirroring updates that are written to the new server, so you will need to relocate any enlistments you currently have. This is done with the 'svn relocate' command from the root of each enlistment.

For example, at the root of your trunk enlistment, you would use the following command:

svn relocate https://svn.mgt.labkey.host/stedi/trunk

And for an 18.1 enlistment, the command would be:

svn relocate https://svn.mgt.labkey.host/stedi/branches/release18.1

Your svn credentials will stay the same and cpas is still a read-only user on the new server. Note that you may need to include the --username argument to svn to make it use the correct account name. Patterns for the names have varied over the years, but an example would be:

svn relocate https://svn.mgt.labkey.host/stedi/trunk --username jeckels@labkey.com

Thanks,

Josh

view message
Multiple demographics datasets
(5 responses) Sev 2018-05-22 10:38

Hello

Our users have requested that we hide demographics data from all but a small set of admin users for our LabKey instance. To strike a balance between setting up this level of security and still being able to use datasets that refer back to the participantid in the Demographics table, we have created a separate AdminDemographics dataset to supplement the Demographics dataset. AdminDemographics contains PHI such as MRN, Names, Birth dates, etc and the Demographics dataset contains only the participant ID column. We keep these in sync with triggers.

We created the AdminDemographics dataset via:
CREATE TABLE LIKE studydataset.demographics INCLUDING ALL
We registered it with LabKey as a dataset with the additional key column field set to the _key column in the dataset, marked as system managed. When we rolled this out, however, LabKey had assigned the MRN column to this additional key and marked it as System Managed, see attached screenshot.

The impact of this was that MRN was not allowed to be set by users when adding new records, breaking the ability to add new patients to the system. We were able to correct this by manually resetting the additional key column back to none. I also noticed if I select the 'Demographic Data' check box the MRN is settable on insert.

My questions:

  1. Why was MRN assigned to a system managed additional key column? Is 'MRN' some kind of reserved column name that gets auto assigned? The _key column exists distinct of the MRN column in the dataset.
  2. Besides enforcing zero or 1 row per participant as described here, what impact does checking the 'Demographic Data' option have on the system? Apart from making MRN settable when adding new records we want to know what else is going on so we can test thoroughly.

EDIT: I attached csv files for the admindemographics entries in the study.dataset and exp.domaindescriptor tables in case that is helpful

Thanks!

Sev

 Screen Shot 2018-05-22 at 10.22.11 AM.png  exp.domaindescriptor_entry.csv  study.dataset_entry.csv 
view message
Rlabkey: labkey.selectRows with colSelect=c("*") gives error
(4 responses) Will Holtz 2018-05-21 14:36

Hello,

The Rlabkey documentation for the colSelect parameter of labkey.selectRows states, "(optional) a vector of strings specifying which columns of a dataset or view to import. The wildcard character ("*") may also be used here to get all columns including those not in the default view."

On LabKey v18.1:

 labkey.selectRows(
    baseUrl = 'http://localhost:8080/labkey/',
    folderPath = '/',
    schemaName = 'core',
    queryName = 'users',
    colSelect = c("*")
  )

returns:

Error in makeDF(mydata, colSelect, showHidden, colNameOpt) : 
  The column "*" specified in the colSelect variable does not exist in the result set. Be sure you are using the column name for colNameOpt="fieldname" and the column label for colNameOpt="caption". See the documentation for more details.
Called from: makeDF(mydata, colSelect, showHidden, colNameOpt)

This same call without the colSelect parameter defined returns the expected data frame populated with user attributes. Am I messing something up or is this a bug?

thanks,

-Will

view message
Subversion server migration scheduled - Wednesday May 23, 7PM PDT
jeckels 2018-05-21 10:52
As previously [communicated on this forum](https://www.labkey.org/home/Support/Developer%20Forum/announcements-thread.view?rowId=17652), we are switching from our long-standing Subversion server to a new system.

The cutover has now been scheduled for 7PM PDT on Wednesday May 23.

The new server is [https://svn.mgt.labkey.host/](https://svn.mgt.labkey.host/) and is actively mirroring the existing server, hedgehog. It retains full history from the previous repository. TeamCity is already pulling from the new server.

At the moment the new server is a read-only copy, and allows connections using the generic cpas/cpas username/password combination. At 7PM on Wednesday, the previous server will be flipped to be read-only, and accounts will be enabled on the new server. Existing credentials will be retained, so you should continue using whatever account you have been using.

The previous server will continue running for a few weeks in case any problems are found, but will be decommissioned soon.

After the cutover, you will be able to use SVN's "relocate" command to point an existing enlistment to the new server. It takes a few minutes and will retain any local edits you have in progress. More detail will follow at the time of migration.

Thanks,

Josh


Edit: Migration Complete. Please refer to the following post for instructions on using the new SVN repository:

https://www.labkey.org/home/Support/Developer%20Forum/announcements-thread.view?rowId=17762
view message
Intellij 2017 and Gradle build?
(2 responses) Ben Bimber 2018-05-21 09:18
I recently set up a new dev machine and it's been a while since I did much java development, but I'm finding builds/hot swapping to be painfully slow. I am using the latest Intellij, 2017.3. I assume this means I must be doing something out of sync with how most LabKey devs have this set up. I have a couple questions:

1) Are many devs using Intellij 2017 or still 2016?

2) I noticed Intellij and command line gradle seemed to be outputting to different directories (intellij was using paths like server\api\out, I think). This might relate to this issue:

https://youtrack.jetbrains.com/issue/IDEA-175172

Based on what was suggested there, I enabled:

File | Settings | Build, Execution, Deployment | Build Tools | Gradle | Runner => Delegate IDE build/run actions to gradle.

Which made a major difference on build time. However, I dont think classpath is set correctly since when I try to build the project through intellij, the GWT classes give errors. Is this a familiar issue for LK devs, and/or is there something else I should be looking into?

Thanks in advance.
view message
Using ExtJS to create an editable grid in a wiki page
(1 response) olnerdybastid 2018-05-10 14:55

I am looking to build an interface for our users to view & edit a table of sample set properties. Based on the docs I see here, it looks like the LabKey-recommended solution is to use ExtJS to achieve this. I tried to create a quick proof-of-concept example to see how this might work building a very simple interface on a wiki page, but the rendering of the ExtJS grid panel isn't remotely usable in its current form (see attached screenshot). I'm assuming the issue is easily solved by loading an additional stylesheet in my wiki, but I've yet to find one bundled with LabKey that properly renders my ExtJS grids. Is there a step that I'm missing in order to create usable ExtJS components in LabKey?

Below is the code I used to make this example:

<head>
<script type='text/javascript' src='https://mylkserver.brown.edu/labkey/ext-4.2.1/ext-all.js'></script>
<script type='text/javascript'>

LABKEY.requiresExt4ClientAPI(function(){

  var lkstore = Ext.create('LABKEY.ext4.data.Store', {
      containerPath: '/NDDdb',
      schemaName: 'assay.General.NanoDrop QC',
      queryName: 'NanoDropQCSummary',
      parameters: {'runID': 122},
      autoLoad: true
    });

  var panel = Ext.create('Ext.grid.Panel', {
      store: lkstore,
      layout: {
        type: 'vbox',
        align: 'stretch',
        padding: 5
      },
      columns: [{
          id: 'sID',
          header: 'P number',
          dataIndex: 'sID',
          flex: 1,
          editor: {
              allowBlank: false
          }
      }, {
            xtype: 'checkcolumn',
            header: 'QC status',
            dataIndex: 'QCstat',
            width: 60,
            editor: {
                xtype: 'checkbox',
                cls: 'x-grid-checkheader-editor'
            }
        }, {
          header: '# of reads',
          dataIndex: 'nReads',
          width: 20,
          editor: {
              xtype: 'combobox',
              typeAhead: true,
              triggerAction: 'all',
              selectOnTab: true,
              lazyRender: true,
              listClass: 'x-combo-list-small'
          }
      }],
      selModel: {
          selType: 'cellmodel'
      },
      renderTo: 'QCPanel',
      width: 600,
      height: 300,
      title: 'View QC data',
      frame: true
  });
})

</script>
</head>
<body>
  <div id = "QCPanel" /></form>
</body>

 Screen Shot 2018-05-10 at 5.37.14 PM.png 
view message
Automatic Assay Imports
(1 response) slatour 2018-05-09 13:06

Hi,

I am currently required to upload ~500 files and import them into assay. This is tedious for a couple of reasons.

  1. There is no "Select all" button within the repository so I must manually select each file and then select "Import Data" button from the File Repository.

  2. After (1) is completed I still need to click Save and Next Run for each item I want to bring into the Assay

Is there a programmatic way to do this? I have tried using both Python and R APIs with no avail. Python only allows one row updated per call which is not helpful considering each of the 500 files has ~ 1000 rows.

Thanks in advance for any feedback,

  • Sara
view message
Importing updated bulk data
(1 response) harris 2018-05-09 12:21

Hello,
I am using the import bulk data functionality to load data and the initial data load works out nicely. I am looking into operationalizing this and have a couple of questions.

  1. If I want to update a full set of data (i.e., overwrite the existing dataset), the import bulk data option does not allow me to do this. I've only been able to import new rows. Is there a better way to refresh the entire dataset without having to delete first and then re-import?
  2. Does LabKey have a way to keep track of study data snapshot versions? For Phase 1 dose escalation studies, we need to do this weekly and need to refer to data snapshots from previous weeks (i.e., I want to see the data we used for last week's dose escalation decision.).
 Screen Shot 2018-05-09 at 12.11.13 PM.png 
view message
Managing Visits: Visit Import Mapping
(1 response) harris 2018-05-09 12:02

Hello,
I imported custom visit mapping data, per the documentation instructions. It was my understanding that the Visit labels should be updated based on this custom mapping, but that does not seem to be the case. See attached snapshots.

  • Is there something I am missing to allow the visit labels per the custom mapping?
  • Is there a way to populate the visit labels without having to do this manually?
 Screen Shot 2018-05-09 at 11.59.05 AM.png  Screen Shot 2018-05-09 at 11.59.57 AM.png  Screen Shot 2018-05-09 at 11.58.01 AM.png 
view message
Query Selector Checkboxes on JOINED Query
(2 responses) simon buckner 2018-05-09 07:48
Hello,

I came across this post: https://www.labkey.org/home/Support/Developer%20Forum/announcements-thread.view?entityId=0af653dc-8023-1030-aaa0-987439a6474a

...which indicates that selectors are not shown for queries that use JOIN statements. However, it is fives years old, so I figured I would make a new thread.

We have a query view, and we would like to be able to select the rows. This query includes a JOIN statement, and as a result, does not seem to have a primary key. I thought this was because the joined queries might return duplicate primary keys, but it looks like the presence of a JOIN statement at all hides the selectors. Is this the case, and if so, is there a workaround at this time?

Thanks,

Simon
view message
Missing domain kind?
(1 response) eva pujadas 2018-05-07 23:11

Dear LabKey team,

We are running different instances of LabKey server, in version 18.1, and when performing a database check or validation, we always get the error that for a certain database table "audit.XXXXXX_queryloggingauditdomain" its domain kind is not found. E.g.

03 May 2018 09:16:35,236 ERROR: Could not find a domain kind for audit.c3d268_queryloggingauditdomain

Do you know the reason? Is there something to worry about?

Thanks and best,
Eva

view message
Upcoming Subversion server migration
jeckels 2018-05-01 19:19

Later this month, we will be migrating from our long-standing Subversion server, hedgehog.fhcrc.org, to a brand new server.

For automated systems like TeamCity, our automated build and test system, we will be doing a phased migration. We will start synchronizing the new server with the existing server, in a read-only capacity, that lets systems pull from it.

A little later, we will make the new server the system of record, and flip the original server to be a read-only system until it is completely retired. We will be migrating all branches, and retain the full source code history.

Stay tuned for more information, including target dates and instructions for how to migrate any existing enlistments you may have locally. We expect this should be a fairly painless operation for developers.

Thanks,
Josh

view message
Missing Values
(3 responses) harris 2018-05-01 17:24

Hi,
I'm trying to import data in an Assay folder. The file I wish to import has some missing data represented as N/A. For example, a data field called Area is Number(double), but does not allow me to upload the file if there are missing data. I tried following the documentation for Manage Missing Value Indicators, but still doesn't allow me to upload anything with N/A. Perhaps I have misunderstood the Missing Value Indicator functionality. Is there a way to translate specific values to missing so that data can be imported?

view message
Additional Keys
(8 responses) harris 2018-04-30 14:33

The Edit Dataset Properties for the Study folder allows one additional key column. How can we add more than one additional key column? I'm currently using Creating Multiple Dataset Definitions from a TSV File. Is it possible to specify additional keys in this definition file?

view message
upload file sanity check and verification in Labkey
(3 responses) WayneH 2018-04-30 05:43
Good morning all,

We want to verify that a file correctly matches a specific naming convention upon completion of upload.. Via the files web part or javascript. Do you have any insight as to how we may accomplish this?


Thanks,

Wayne H
view message
Querying for median value in LabKey?
(2 responses) olnerdybastid 2018-04-25 08:47

I am writing a query to summarize some assay results with some very basic statistics (std dev, average, and median). The first two are already taken care of using standard LabKey SQL, but calculating median looks to be a bit more difficult unless I'm overlooking something

Our LabKey instance is deployed over Postgres, and I've seen multiple examples of how to do this natively in Postgres (one example here: https://www.periscopedata.com/blog/medians-in-sql). But I don't see anything analogous to to Postgres' ROW_NUMBER() in LabKey SQL, or any way to select an element by its position in a subselect. Is there a way to calculate median in a LabKey SQL query, or has anyone found an acceptable workaround to achieve this?

view message
Custom Schema and Table
(3 responses) marcia hon 2018-04-19 09:20

Hello,

I created a custom schema and table in Labkey via ETL script.

Now, when I am at Labkey GUI and open this table, the option to "delete" is unavailable.

Please is there a way to allow for "delete".

Thanks,
Marcia

view message
Transformation Scripts
(1 response) marcia hon 2018-04-19 08:08

Hello,

I have an assay: assay.general.nrg_assay .

How do I reference this assay in the transformation scripts?

In the ETL structure, where do I put this scirpt?

Is it supposed to be ../queries/assay/general/nrg_assay.sql?

Thanks,
Marcia

view message
Transformation Scripts
(1 response) marcia hon 2018-04-18 12:42

I would like to the following script to be the transformation script:

SELECT
Genotyping_Original."participant id"
FROM study.Genotyping_Original as Genotyping_Original
WHERE NOT EXISTS
(
SELECT *
FROM genotype_etl.genotyping_original as GenoETL
WHERE
Genotyping_Original."participant id" = GenoETL."participant id"
)

However, it is always not giving me the correct results.

I think it's because there are two queries being referenced: study.Genotpying_Original and genotype_etl.genotyping_original . So it seems that it is not able to get information from genotype_etl.genotyping_original .

genotype_etl.genotyping_original is a schema and table that i create in the same transform.module package.

I look forward to your expertise.

Thanks,
Marcia

view message
Error: removing module and delete schema
(1 response) marcia hon 2018-04-17 07:36

At Admin > Site > Admin Console,

I'm trying to delete a custom module/schema.

I go to the screen that has the following and click "OK":

"
Are you sure you want to remove the "genotype_etl" module and delete all data in the "genotype_etl" schema? This operation may render the server unusable and cannot be undone!

Deleting modules on a running server could leave it in an unpredictable state; be sure to restart your server.
"

Unfortunately, it runs for a long time and times out. The module is not removed and the schema is not deleted.

Please let me know how to fix this.

Thanks,
Marcia

view message

Welcome to the LabKey Developer Forum. This forum is for questions about development with LabKey Server

If you have questions regarding general use of LabKey Server, please post to the General Server Forum.

If you have questions regarding installation and configuration of LabKey Server, please post to the Installation Forum.

Posting Questions

Before you post a new question, please search to see if someone has already asked a similar one.

Next, please review the Community Forum Guidelines.

When you post a question, please include the following information:

  • Your operating system.
  • Web browser.
  • Version number of LabKey Server.
  • A detailed description of your problem or question, including instructions for reproducing your issue.
  • Error information. Please attach log files to your message, rather than pasting in long text. Error pages and log files also include an Error Code. Please include this code in your message.

Additional Resources

User Account

In order to post to the community forum, you'll need to register for a user account.  If you already have an account but have forgotten your password, you can reset your password using the link on the Sign in page.