×
We value your feedback! Please click here to access our 2024 Client Survey.
The survey will remain open until November 1st. Your perspective will help guide our product/service planning and goals for the upcoming year and beyond!

parse rrors for deleteURL and importURL elements in table metadata XML

LabKey Support Forum
parse rrors for deleteURL and importURL elements in table metadata XML Anthony Corbett  2013-02-15 13:14
Status: Closed
 
Even though deleteURL and importURL are in the xsd for the tableInfo schema:

  https://www.labkey.org/download/schema-docs/xml-schemas/index.html?schemas/tableInfo_xsd/elements/deleteUrl.html
  https://www.labkey.org/download/schema-docs/xml-schemas/index.html?schemas/tableInfo_xsd/elements/importUrl.html

I'm getting parse errors when I try to add those to my list's metadata XML:

<tables xmlns="http://labkey.org/data/xml">
  <table tableName="Specimens Submitted to GRC" tableDbType="TABLE">
    <insertUrl></insertUrl> <!-- works -->
    <updateUrl></updateUrl> <!-- works -->
    <tableUrl></tableUrl> <!-- works -->
    <deleteUrl></deleteUrl> <!-- parse error -->
    <importUrl></importUrl> <!-- parse error, though the documentation doesn't say it can be blank -->
  </table>
</tables>


I'm really trying to remove all way to modify the list in the GUI. Admins can go to the schema browser.
 
 
kevink responded:  2013-02-15 13:33
Anthony,

I'm not able to reproduce the errors you're seeing. I created a list on a 12.3 server and trunk and applied the xml metadata override, but it saved cleanly without errors. After the save, the insert/update/delete/import links and buttons were removed.

Are there errors in the server log?
 
Anthony Corbett responded:  2013-02-15 14:39
Title: parse errors for deleteURL and importURL elements in table metadata XML
Kevin,

No errors in the log file. I'm seeing inconsistent behavior on save. First I saved it with only the tableUrl, insertUrl, and updateUrl defined as blank.

The inital save worked. Once I tried adding importUrl and deleteUrl I got the saved with parse errors. I removed them to go back to the initial xml and then got the saved with parse errors message again. Then, I removed all xxxxUrl elements and it saved fine. I put back updateUrl, tableUrl, and insertUrl and it saved fine again.

I can add in deleteUrl and importUrl and save with parse errors. When I go to view the list it is behaving correctly, no import or delete buttons. So it seems to be working but the save still says it is having parse errors.

Here is the full XML:

<tables xmlns="http://labkey.org/data/xml">
  <table tableName="Specimens Submitted to GRC" tableDbType="TABLE">
    <insertUrl></insertUrl>
    <updateUrl></updateUrl>
    <tableUrl></tableUrl>
    <importUrl></importUrl>
    <deleteUrl></deleteUrl>
    <columns>
      <column columnName="Key">
        <datatype>integer</datatype>
        <columnTitle>Key</columnTitle>
        <nullable>false</nullable>
        <isKeyField>true</isKeyField>
      </column>
      <column columnName="GlobalUniqueId">
        <datatype>varchar</datatype>
        <columnTitle>Global Unique Id</columnTitle>
        <fk>
          <fkDbSchema>study</fkDbSchema>
          <fkTable>SpecimenDetail</fkTable>
          <fkColumnName>GlobalUniqueId</fkColumnName>
        </fk>
      </column>
      <column columnName="Participant Id">
        <datatype>varchar</datatype>
        <columnTitle>Participant Id</columnTitle>
        <fk>
          <fkDbSchema>study</fkDbSchema>
          <fkTable>Participant</fkTable>
          <fkColumnName>ParticipantId</fkColumnName>
        </fk>
      </column>
    </columns>
    <pkColumnName>Key</pkColumnName>
  </table>
</tables>


On a related note, I just tried to create a new query using the above mentioned list with custom table XML metadata and I'm getting an Exception (I've attached screenshots and the full log of this error):

org.labkey.api.query.QueryException: Illegal URL expression:
       at org.labkey.api.data.AbstractTableInfo.parseDetailsURL(AbstractTableInfo.java:731)
       at org.labkey.api.data.AbstractTableInfo.loadFromXML(AbstractTableInfo.java:801)
       at org.labkey.api.query.FilteredTable.loadFromXML(FilteredTable.java:115)
       at org.labkey.api.data.AbstractTableInfo.overlayMetadata(AbstractTableInfo.java:1019)
       at org.labkey.api.data.AbstractTableInfo.overlayMetadata(AbstractTableInfo.java:1010)
       at org.labkey.api.query.UserSchema._getTableOrQuery(UserSchema.java:178)
       at org.labkey.query.sql.Query.resolveTable(Query.java:594)
       at org.labkey.query.sql.QuerySelect.initializeSelect(QuerySelect.java:257)
       at org.labkey.query.sql.QuerySelect.<init>(QuerySelect.java:122)
       at org.labkey.query.sql.Query.createQueryRelation(Query.java:264)
       at org.labkey.query.sql.Query._parse(Query.java:231)
       at org.labkey.query.sql.Query.parse(Query.java:194)
       at org.labkey.query.sql.Query.parse(Query.java:210)
       at org.labkey.query.QueryDefinitionImpl.getQuery(QueryDefinitionImpl.java:296)
       at org.labkey.query.QueryDefinitionImpl.getQuery(QueryDefinitionImpl.java:281)
       at org.labkey.query.QueryDefinitionImpl.getTable(QueryDefinitionImpl.java:358)
       at org.labkey.api.query.UserSchema.getTable(UserSchema.java:131)
       at org.labkey.api.query.UserSchema.getTable(UserSchema.java:115)
       at org.labkey.api.query.UserSchema.getTable(UserSchema.java:208)
       at org.labkey.query.controllers.QueryController$ExecuteQueryAction.appendNavTrail(QueryController.java:872)
       at org.labkey.api.action.SpringActionController.appendNavTrail(SpringActionController.java:543)
       at org.labkey.api.action.SpringActionController.getTemplate(SpringActionController.java:499)
       at org.labkey.api.action.SpringActionController.renderInTemplate(SpringActionController.java:460)
       at org.labkey.api.action.SpringActionController.handleRequest(SpringActionController.java:361)
       at org.labkey.api.module.DefaultModule.dispatch(DefaultModule.java:921)
       at org.labkey.api.view.ViewServlet.service(ViewServlet.java:164)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.labkey.api.data.TransactionFilter.doFilter(TransactionFilter.java:36)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.labkey.core.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:118)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.labkey.api.module.ModuleLoader.doFilter(ModuleLoader.java:791)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.labkey.api.security.AuthFilter.doFilter(AuthFilter.java:170)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
       at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
       at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
       at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:775)
       at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:704)
       at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:897)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
       at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.IllegalArgumentException: Failed to parse url ''.
Supported url formats:
       /controller/action.view?id=${RowId}
       org.labkey.package.MyController$ActionAction.class?id=${RowId}
       at org.labkey.api.query.DetailsURL.parse(DetailsURL.java:180)
       at org.labkey.api.query.DetailsURL.fromString(DetailsURL.java:96)
       at org.labkey.api.data.AbstractTableInfo.parseDetailsURL(AbstractTableInfo.java:727)
       ... 53 more