New schema issue

30 views
Skip to first unread message

Simon Doran

unread,
Jan 5, 2016, 2:30:37 PM1/5/16
to xnat_discussion
Hi Rick and Tim,

  I am trying to replace an existing (working) schema with a modified version. When I try to incorporate it into XNAT via bin/update.sh, the build process goes absolutely fine until I arrive at the deployment stage, at which point, I obtain the following error:

SOURCE: /Users/xnat/Tomcat/Home/webapps/XNAT_104012cmrdt/

[Thread-5] ERROR db.PoolDBUtils  - SELECT pg_get_serial_sequence('icr_genericImageAssessmentData_scan_slice','icr_genericimageassessmentdata_scan_slice_id') AS col_name

[Thread-5] ERROR db.PoolDBUtils  - SELECT * FROM icr_genericImageAssessmentData_scan_slice_icr_genericimageassessmentdata_scan_slice_id_seq

[Thread-5] ERROR db.PoolDBUtils  - SELECT * FROM icr_genericImageAssessmentData_icr_genericimageassessmentdata_seq

[Thread-5] ERROR db.PoolDBUtils  - SELECT * FROM icr_genericImageAssessmentDat_icr_genericimageassessmentdat_seq

[Thread-5] ERROR db.PoolDBUtils  - SELECT MAX(icr_genericimageassessmentdata_scan_slice_id) AS MAX_COUNT from icr_genericImageAssessmentData_scan_slice

org.postgresql.util.PSQLException: ERROR: relation "icr_genericimageassessmentdata_scan_slice" does not exist

  Position: 76

        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)

        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)

        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)

        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)

        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)

        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)

        at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)

        at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)

        at org.nrg.xft.db.PoolDBUtils.executeQuery(PoolDBUtils.java:867)

        at org.nrg.xft.db.PoolDBUtils.returnStatisticQuery(PoolDBUtils.java:355)

        at org.nrg.xft.db.PoolDBUtils.ReturnStatisticQuery(PoolDBUtils.java:378)

        at org.nrg.xft.db.DBAction.AdjustSequences(DBAction.java:3692)

        at org.nrg.xdat.servlet.XDATServlet$DelayedSequenceChecker.run(XDATServlet.java:81)




  The two schemata are attached. I know exactly what I have done and why the error is occurring, but the question is: is there anything I can do to mitigate this while maintaining my new schema design.

  Specifically, the problem is that, in the old schema, the complex types roiSetData and roiData both inherited from xnat:qcAssessmentData, which, in turn, extends xnat:mrAssessorData. My assessor might relate to MR images, but there is no reason why it has to, so I really need something that extends xnat:imageAssessorData. You will see that I have created an analogue of xnat:qcAssessmentData called icr:genericImageAssessmentData.

  As far as I can tell, the way that I have done this should mean that all the postgres tables have exactly the same names under the new and old systems. I haven't quite figured out which bit I'm missing.

  Is what I'm trying to do actually do-able. I do not want to have to change the name of the roiData and roiSetData complex types (and their associated elements) because this would make the new schema incompatible with a lot of previous code that I have written.

  Best wishes,

Simon


icr_old.xsd
icr_new.xsd

Simon Doran

unread,
Jan 5, 2016, 3:59:41 PM1/5/16
to xnat_discussion
Belay that: I just realised driving back home that I hadn't run the psql after updating. So let me do that and get back to you.

Simon 

Herrick, Rick

unread,
Jan 5, 2016, 4:20:13 PM1/5/16
to xnat_di...@googlegroups.com
You need to pay more attention to the road :)

-- 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

(314) 740-5961


--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To post to this group, send email to xnat_di...@googlegroups.com.
Visit this group at https://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/d/optout.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Simon Doran

unread,
Jan 5, 2016, 6:19:59 PM1/5/16
to xnat_discussion
All good. I got home safely and XNAT now works with the new schema. :-)
Reply all
Reply to author
Forward
0 new messages