talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

Error on newly-added field: Problem retrieving property for xpath [...] with CSID = null

NK
Nima Khazaei
Thu, Jun 28, 2018 8:52 AM

Hello all,
I'm working on a new tenant profile and just added a field to the Media
Handling record. I'm getting an error message, and I have no idea what it
means or what I did wrong!. Pasted below are the API request where I see
the error message, the entire XML file for the media handling record I
created (all it does is add one field, called filmSubject, and add an
option to the "types"), and a snippet from cspace-services.log.

I would sincerely appreciate any help. Please let me know if there's any
other info I can provide. Thank you very much!

-N

Here is the API request:

nima@dana:~$ curl --user admin@canyoncinema.com:Administrator -H "Accept:
application/json" "http://dev-cs45-2.cancf.com/cspace-services/media"

List request failed:
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException:
Problem retrieving property for xpath { media_canyon:filmSubject } with
CSID = null.

Here is the extension schema file:

<record id="media" is-extension="true" type="procedure,record"> <services-record-path id="canyon">media_canyon: http://collectionspace.org/services/media/local/canyon,media_canyon </services-record-path>
<section id="mediaInformation">
    <repeat id="types">
        <field id="type" ui-search="repeatable">
            <options>
                <option id="" default="yes">Please select a

value</option>
<option id="dataset" >Dataset</option>
<option id="document" >Document</option>
<option id="moving_image" >Moving Image</option>
<option id="still_image" >Still Image</option>
<option id="sound" >Sound</option>
<option id="film_still">Film Still</option>
</options>
</field>
</repeat>

    <field id="filmSubject" section="canyon" mini="search,list,relate"

autocomplete="work-work"/>

</section>
</record>

And here is the log snippet from cspace-services.log:

2018-06-28 08:46:20,886 ERROR [http-bio-8180-exec-4]
[org.collectionspace.services.media.MediaResource:562]
org.collectionspace.services.media.MediaResource detail: ^M
-- Exception:
org.collectionspace.services.common.document.DocumentException^M
-- Message:
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException:
Problem retrieving property for xpath { media_canyon:filmSubject } with
CSID = null.^M
-- Causes:
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException::Problem
retrieving property for xpath { media_canyon:filmSubject } with CSID =
null.^M
org.nuxeo.ecm.core.api.model.PropertyNotFoundException::media_canyon:filmSubject^M
^M
-- Stack Trace: ^M
--      org.collectionspace.services.common.document.DocumentException:
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException:
Problem retrieving property for xpath { media_canyon:filmSubject } with
CSID = null.^M
at
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler.extractCommonPartList(NuxeoDocumentModelHandler.java:321)^M
at
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler.extractCommonPartList(NuxeoDocumentModelHandler.java:75)^M
...first 4 lines. 92 more.^M

Hello all, I'm working on a new tenant profile and just added a field to the Media Handling record. I'm getting an error message, and I have no idea what it means or what I did wrong!. Pasted below are the API request where I see the error message, the entire XML file for the media handling record I created (all it does is add one field, called filmSubject, and add an option to the "types"), and a snippet from cspace-services.log. I would sincerely appreciate any help. Please let me know if there's any other info I can provide. Thank you very much! -N *Here is the API request:* nima@dana:~$ curl --user admin@canyoncinema.com:Administrator -H "Accept: application/json" "http://dev-cs45-2.cancf.com/cspace-services/media" List request failed: org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: Problem retrieving property for xpath { media_canyon:filmSubject } with CSID = null. *Here is the extension schema file:* <record id="media" is-extension="true" type="procedure,record"> <services-record-path id="canyon">media_canyon: http://collectionspace.org/services/media/local/canyon,media_canyon </services-record-path> <section id="mediaInformation"> <repeat id="types"> <field id="type" ui-search="repeatable"> <options> <option id="" default="yes">Please select a value</option> <option id="dataset" >Dataset</option> <option id="document" >Document</option> <option id="moving_image" >Moving Image</option> <option id="still_image" >Still Image</option> <option id="sound" >Sound</option> <option id="film_still">Film Still</option> </options> </field> </repeat> <field id="filmSubject" section="canyon" mini="search,list,relate" autocomplete="work-work"/> </section> </record> *And here is the log snippet from cspace-services.log:* 2018-06-28 08:46:20,886 ERROR [http-bio-8180-exec-4] [org.collectionspace.services.media.MediaResource:562] org.collectionspace.services.media.MediaResource detail: ^M -- Exception: org.collectionspace.services.common.document.DocumentException^M -- Message: org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: Problem retrieving property for xpath { media_canyon:filmSubject } with CSID = null.^M -- Causes: org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException::Problem retrieving property for xpath { media_canyon:filmSubject } with CSID = null.^M org.nuxeo.ecm.core.api.model.PropertyNotFoundException::media_canyon:filmSubject^M ^M -- Stack Trace: ^M -- org.collectionspace.services.common.document.DocumentException: org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: Problem retrieving property for xpath { media_canyon:filmSubject } with CSID = null.^M at org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler.extractCommonPartList(NuxeoDocumentModelHandler.java:321)^M at org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler.extractCommonPartList(NuxeoDocumentModelHandler.java:75)^M ...first 4 lines. 92 more.^M
RM
Richard Millet
Thu, Jun 28, 2018 8:40 PM

Nima,

Your schema extension definition looks ok to me.  Here are a few things to check.  Shutdown your CollectionSpace instance and:

  1. Are you including and merging the extension in your /application/tomcat/src/main/resources/canyon-tenant.xml file?  You should have like like this in that file:
<include src="base-procedure-media.xml, canyon-procedure-media.xml" merge="xmlmerge.properties"/>
  1. Have you rebuilt the application layer?  From the root dir of the /application sources:

man clean install -DskipTests

  1. Have you re-deployed the Services layer?  From /services/services/JaxRsServiceProvider/:

ant deploy

  1. Check that there is a Nuxeo plugin for your schema extension.  Inside the tomcat/nuxeo-server/plugins directory, you should see a file named something like this:

collectionspace.media.schema.media_canyon.jar

Inside that .jar file, you can examine the XML Schema file (*.xsd) to see if extension schema is what you expect -in your case, it should be just one field/element.

Let us know what you learn.

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of Nima Khazaei nimakha@gmail.com
Sent: Thursday, June 28, 2018 1:52 AM
To: CollectionSpace
Subject: [Talk] Error on newly-added field: Problem retrieving property for xpath [...] with CSID = null

Hello all,
I'm working on a new tenant profile and just added a field to the Media Handling record. I'm getting an error message, and I have no idea what it means or what I did wrong!. Pasted below are the API request where I see the error message, the entire XML file for the media handling record I created (all it does is add one field, called filmSubject, and add an option to the "types"), and a snippet from cspace-services.log.

I would sincerely appreciate any help. Please let me know if there's any other info I can provide. Thank you very much!

-N

Here is the API request:

nima@dana:~$ curl --user admin@canyoncinema.com:Administrator -H "Accept: application/json" "http://dev-cs45-2.cancf.com/cspace-services/media"

List request failed: org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: Problem retrieving property for xpath { media_canyon:filmSubject } with CSID = null.

Here is the extension schema file:

<record id="media" is-extension="true" type="procedure,record"> <services-record-path id="canyon">media_canyon:http://collectionspace.org/services/media/local/canyon,media_canyon</services-record-path>
<section id="mediaInformation">
    <repeat id="types">
        <field id="type" ui-search="repeatable">
            <options>
                <option id="" default="yes">Please select a value</option>
                <option id="dataset" >Dataset</option>
                <option id="document" >Document</option>
                <option id="moving_image" >Moving Image</option>
                <option id="still_image" >Still Image</option>
                <option id="sound" >Sound</option>
                <option id="film_still">Film Still</option>
            </options>
        </field>
    </repeat>

    <field id="filmSubject" section="canyon" mini="search,list,relate" autocomplete="work-work"/>

</section>
</record>

And here is the log snippet from cspace-services.log:

2018-06-28 08:46:20,886 ERROR [http-bio-8180-exec-4] [org.collectionspace.services.media.MediaResource:562] org.collectionspace.services.media.MediaResource detail: ^M
-- Exception: org.collectionspace.services.common.document.DocumentException^M
-- Message: org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: Problem retrieving property for xpath { media_canyon:filmSubject } with CSID = null.^M
-- Causes: org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException::Problem retrieving property for xpath { media_canyon:filmSubject } with CSID = null.^M
org.nuxeo.ecm.core.api.model.PropertyNotFoundException::media_canyon:filmSubject^M
^M
-- Stack Trace: ^M
--      org.collectionspace.services.common.document.DocumentException: org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: Problem retrieving property for xpath { media_canyon:filmSubject } with CSID = null.^M
at org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler.extractCommonPartList(NuxeoDocumentModelHandler.java:321)^M
at org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler.extractCommonPartList(NuxeoDocumentModelHandler.java:75)^M
...first 4 lines. 92 more.^M

Nima, Your schema extension definition looks ok to me. Here are a few things to check. Shutdown your CollectionSpace instance and: 1. Are you including and merging the extension in your /application/tomcat/src/main/resources/canyon-tenant.xml file? You should have like like this in that file: <include src="base-procedure-media.xml, canyon-procedure-media.xml" merge="xmlmerge.properties"/> 2. Have you rebuilt the application layer? From the root dir of the /application sources: man clean install -DskipTests 3. Have you re-deployed the Services layer? From /services/services/JaxRsServiceProvider/: ant deploy 4. Check that there is a Nuxeo plugin for your schema extension. Inside the tomcat/nuxeo-server/plugins directory, you should see a file named something like this: collectionspace.media.schema.media_canyon.jar Inside that .jar file, you can examine the XML Schema file (*.xsd) to see if extension schema is what you expect -in your case, it should be just one field/element. Let us know what you learn. -Richard ________________________________________ From: Talk <talk-bounces@lists.collectionspace.org> on behalf of Nima Khazaei <nimakha@gmail.com> Sent: Thursday, June 28, 2018 1:52 AM To: CollectionSpace Subject: [Talk] Error on newly-added field: Problem retrieving property for xpath [...] with CSID = null Hello all, I'm working on a new tenant profile and just added a field to the Media Handling record. I'm getting an error message, and I have no idea what it means or what I did wrong!. Pasted below are the API request where I see the error message, the entire XML file for the media handling record I created (all it does is add one field, called filmSubject, and add an option to the "types"), and a snippet from cspace-services.log. I would sincerely appreciate any help. Please let me know if there's any other info I can provide. Thank you very much! -N Here is the API request: nima@dana:~$ curl --user admin@canyoncinema.com:Administrator -H "Accept: application/json" "http://dev-cs45-2.cancf.com/cspace-services/media" List request failed: org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: Problem retrieving property for xpath { media_canyon:filmSubject } with CSID = null. Here is the extension schema file: <record id="media" is-extension="true" type="procedure,record"> <services-record-path id="canyon">media_canyon:http://collectionspace.org/services/media/local/canyon,media_canyon</services-record-path> <section id="mediaInformation"> <repeat id="types"> <field id="type" ui-search="repeatable"> <options> <option id="" default="yes">Please select a value</option> <option id="dataset" >Dataset</option> <option id="document" >Document</option> <option id="moving_image" >Moving Image</option> <option id="still_image" >Still Image</option> <option id="sound" >Sound</option> <option id="film_still">Film Still</option> </options> </field> </repeat> <field id="filmSubject" section="canyon" mini="search,list,relate" autocomplete="work-work"/> </section> </record> And here is the log snippet from cspace-services.log: 2018-06-28 08:46:20,886 ERROR [http-bio-8180-exec-4] [org.collectionspace.services.media.MediaResource:562] org.collectionspace.services.media.MediaResource detail: ^M -- Exception: org.collectionspace.services.common.document.DocumentException^M -- Message: org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: Problem retrieving property for xpath { media_canyon:filmSubject } with CSID = null.^M -- Causes: org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException::Problem retrieving property for xpath { media_canyon:filmSubject } with CSID = null.^M org.nuxeo.ecm.core.api.model.PropertyNotFoundException::media_canyon:filmSubject^M ^M -- Stack Trace: ^M -- org.collectionspace.services.common.document.DocumentException: org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: Problem retrieving property for xpath { media_canyon:filmSubject } with CSID = null.^M at org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler.extractCommonPartList(NuxeoDocumentModelHandler.java:321)^M at org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler.extractCommonPartList(NuxeoDocumentModelHandler.java:75)^M ...first 4 lines. 92 more.^M
RL
Ray Lee
Thu, Jun 28, 2018 8:50 PM

Hi Nima,
Did you have media records in the system before you added the schema
extension? I've had the following problem, though I don't remember if the
error message was exactly the one you're seeing: I have records in the
system, then I add a schema extension where one of the fields is configured
to be a list result (which filmSubject is). Then when I search for records,
it attempts to pull the value of the field to produce the search results,
but the new schema doesn't exist on the previously existing records, so the
search fails. If you're only working with test data, the easiest fix is to
delete the previously existing records, or start with a clean database.
Otherwise you can do some database shenanigans to patch up the old records.

Ray

On Thu, Jun 28, 2018 at 1:40 PM Richard Millet richard.millet@lyrasis.org
wrote:

Nima,

Your schema extension definition looks ok to me.  Here are a few things to
check.  Shutdown your CollectionSpace instance and:

  1. Are you including and merging the extension in your
    /application/tomcat/src/main/resources/canyon-tenant.xml file?  You should
    have like like this in that file:

<include src="base-procedure-media.xml, canyon-procedure-media.xml" merge="xmlmerge.properties"/>

  1. Have you rebuilt the application layer?  From the root dir of the
    /application sources:

man clean install -DskipTests

  1. Have you re-deployed the Services layer?  From
    /services/services/JaxRsServiceProvider/:

ant deploy

  1. Check that there is a Nuxeo plugin for your schema extension.  Inside
    the tomcat/nuxeo-server/plugins directory, you should see a file named
    something like this:

collectionspace.media.schema.media_canyon.jar

Inside that .jar file, you can examine the XML Schema file (*.xsd) to see
if extension schema is what you expect -in your case, it should be just one
field/element.

Let us know what you learn.

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of Nima
Khazaei nimakha@gmail.com
Sent: Thursday, June 28, 2018 1:52 AM
To: CollectionSpace
Subject: [Talk] Error on newly-added field: Problem retrieving property
for xpath [...] with CSID = null

Hello all,
I'm working on a new tenant profile and just added a field to the Media
Handling record. I'm getting an error message, and I have no idea what it
means or what I did wrong!. Pasted below are the API request where I see
the error message, the entire XML file for the media handling record I
created (all it does is add one field, called filmSubject, and add an
option to the "types"), and a snippet from cspace-services.log.

I would sincerely appreciate any help. Please let me know if there's any
other info I can provide. Thank you very much!

-N

Here is the API request:

nima@dana:~$ curl --user admin@canyoncinema.com:Administrator -H "Accept:
application/json" "http://dev-cs45-2.cancf.com/cspace-services/media"

List request failed:
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException:
Problem retrieving property for xpath { media_canyon:filmSubject } with
CSID = null.

Here is the extension schema file:

<record id="media" is-extension="true" type="procedure,record"> <services-record-path id="canyon">media_canyon: http://collectionspace.org/services/media/local/canyon,media_canyon </services-record-path>
 <section id="mediaInformation">
     <repeat id="types">
         <field id="type" ui-search="repeatable">
             <options>
                 <option id="" default="yes">Please select a

value</option>
<option id="dataset" >Dataset</option>
<option id="document" >Document</option>
<option id="moving_image" >Moving Image</option>
<option id="still_image" >Still Image</option>
<option id="sound" >Sound</option>
<option id="film_still">Film Still</option>
</options>
</field>
</repeat>

     <field id="filmSubject" section="canyon" mini="search,list,relate"

autocomplete="work-work"/>

 </section>
</record>

And here is the log snippet from cspace-services.log:

2018-06-28 08:46:20,886 ERROR [http-bio-8180-exec-4]
[org.collectionspace.services.media.MediaResource:562]
org.collectionspace.services.media.MediaResource detail: ^M
-- Exception:
org.collectionspace.services.common.document.DocumentException^M
-- Message:
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException:
Problem retrieving property for xpath { media_canyon:filmSubject } with
CSID = null.^M
-- Causes:
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException::Problem
retrieving property for xpath { media_canyon:filmSubject } with CSID =
null.^M

org.nuxeo.ecm.core.api.model.PropertyNotFoundException::media_canyon:filmSubject^M
^M
-- Stack Trace: ^M
--      org.collectionspace.services.common.document.DocumentException:
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException:
Problem retrieving property for xpath { media_canyon:filmSubject } with
CSID = null.^M
at
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler.extractCommonPartList(NuxeoDocumentModelHandler.java:321)^M
at
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler.extractCommonPartList(NuxeoDocumentModelHandler.java:75)^M
...first 4 lines. 92 more.^M


Talk mailing list
Talk@lists.collectionspace.org

http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

Hi Nima, Did you have media records in the system before you added the schema extension? I've had the following problem, though I don't remember if the error message was exactly the one you're seeing: I have records in the system, then I add a schema extension where one of the fields is configured to be a list result (which filmSubject is). Then when I search for records, it attempts to pull the value of the field to produce the search results, but the new schema doesn't exist on the previously existing records, so the search fails. If you're only working with test data, the easiest fix is to delete the previously existing records, or start with a clean database. Otherwise you can do some database shenanigans to patch up the old records. Ray On Thu, Jun 28, 2018 at 1:40 PM Richard Millet <richard.millet@lyrasis.org> wrote: > Nima, > > Your schema extension definition looks ok to me. Here are a few things to > check. Shutdown your CollectionSpace instance and: > > 1. Are you including and merging the extension in your > /application/tomcat/src/main/resources/canyon-tenant.xml file? You should > have like like this in that file: > > <include src="base-procedure-media.xml, canyon-procedure-media.xml" > merge="xmlmerge.properties"/> > > 2. Have you rebuilt the application layer? From the root dir of the > /application sources: > > man clean install -DskipTests > > 3. Have you re-deployed the Services layer? From > /services/services/JaxRsServiceProvider/: > > ant deploy > > 4. Check that there is a Nuxeo plugin for your schema extension. Inside > the tomcat/nuxeo-server/plugins directory, you should see a file named > something like this: > > collectionspace.media.schema.media_canyon.jar > > Inside that .jar file, you can examine the XML Schema file (*.xsd) to see > if extension schema is what you expect -in your case, it should be just one > field/element. > > Let us know what you learn. > > -Richard > > ________________________________________ > From: Talk <talk-bounces@lists.collectionspace.org> on behalf of Nima > Khazaei <nimakha@gmail.com> > Sent: Thursday, June 28, 2018 1:52 AM > To: CollectionSpace > Subject: [Talk] Error on newly-added field: Problem retrieving property > for xpath [...] with CSID = null > > Hello all, > I'm working on a new tenant profile and just added a field to the Media > Handling record. I'm getting an error message, and I have no idea what it > means or what I did wrong!. Pasted below are the API request where I see > the error message, the entire XML file for the media handling record I > created (all it does is add one field, called filmSubject, and add an > option to the "types"), and a snippet from cspace-services.log. > > I would sincerely appreciate any help. Please let me know if there's any > other info I can provide. Thank you very much! > > -N > > Here is the API request: > > nima@dana:~$ curl --user admin@canyoncinema.com:Administrator -H "Accept: > application/json" "http://dev-cs45-2.cancf.com/cspace-services/media" > > List request failed: > org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: > Problem retrieving property for xpath { media_canyon:filmSubject } with > CSID = null. > > Here is the extension schema file: > > <record id="media" is-extension="true" type="procedure,record"> > <services-record-path id="canyon">media_canyon: > http://collectionspace.org/services/media/local/canyon,media_canyon > </services-record-path> > > <section id="mediaInformation"> > <repeat id="types"> > <field id="type" ui-search="repeatable"> > <options> > <option id="" default="yes">Please select a > value</option> > <option id="dataset" >Dataset</option> > <option id="document" >Document</option> > <option id="moving_image" >Moving Image</option> > <option id="still_image" >Still Image</option> > <option id="sound" >Sound</option> > <option id="film_still">Film Still</option> > </options> > </field> > </repeat> > > <field id="filmSubject" section="canyon" mini="search,list,relate" > autocomplete="work-work"/> > > </section> > </record> > > > And here is the log snippet from cspace-services.log: > > 2018-06-28 08:46:20,886 ERROR [http-bio-8180-exec-4] > [org.collectionspace.services.media.MediaResource:562] > org.collectionspace.services.media.MediaResource detail: ^M > -- Exception: > org.collectionspace.services.common.document.DocumentException^M > -- Message: > org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: > Problem retrieving property for xpath { media_canyon:filmSubject } with > CSID = null.^M > -- Causes: > org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException::Problem > retrieving property for xpath { media_canyon:filmSubject } with CSID = > null.^M > > org.nuxeo.ecm.core.api.model.PropertyNotFoundException::media_canyon:filmSubject^M > ^M > -- Stack Trace: ^M > -- org.collectionspace.services.common.document.DocumentException: > org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: > Problem retrieving property for xpath { media_canyon:filmSubject } with > CSID = null.^M > at > org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler.extractCommonPartList(NuxeoDocumentModelHandler.java:321)^M > at > org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler.extractCommonPartList(NuxeoDocumentModelHandler.java:75)^M > ...first 4 lines. 92 more.^M > > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >
NK
Nima Khazaei
Fri, Jun 29, 2018 3:13 AM

Thank you very very much, both of you.

What it took was hard-deleting the existing Media records by doing a DELETE
request on the API. Fortunately they weren't important.

It looks like the media_canyon table had been created, with the one field I
added - it was just empty, while the media_common table had items in it.

-N

On Thu, Jun 28, 2018 at 1:50 PM, Ray Lee rhlee@berkeley.edu wrote:

Hi Nima,
Did you have media records in the system before you added the schema
extension? I've had the following problem, though I don't remember if the
error message was exactly the one you're seeing: I have records in the
system, then I add a schema extension where one of the fields is configured
to be a list result (which filmSubject is). Then when I search for records,
it attempts to pull the value of the field to produce the search results,
but the new schema doesn't exist on the previously existing records, so the
search fails. If you're only working with test data, the easiest fix is to
delete the previously existing records, or start with a clean database.
Otherwise you can do some database shenanigans to patch up the old records.

Ray

On Thu, Jun 28, 2018 at 1:40 PM Richard Millet richard.millet@lyrasis.org
wrote:

Nima,

Your schema extension definition looks ok to me.  Here are a few things
to check.  Shutdown your CollectionSpace instance and:

  1. Are you including and merging the extension in your
    /application/tomcat/src/main/resources/canyon-tenant.xml file?  You
    should have like like this in that file:

<include src="base-procedure-media.xml, canyon-procedure-media.xml" merge="xmlmerge.properties"/>

  1. Have you rebuilt the application layer?  From the root dir of the
    /application sources:

man clean install -DskipTests

  1. Have you re-deployed the Services layer?  From /services/services/
    JaxRsServiceProvider/:

ant deploy

  1. Check that there is a Nuxeo plugin for your schema extension.  Inside
    the tomcat/nuxeo-server/plugins directory, you should see a file named
    something like this:

collectionspace.media.schema.media_canyon.jar

Inside that .jar file, you can examine the XML Schema file (*.xsd) to see
if extension schema is what you expect -in your case, it should be just one
field/element.

Let us know what you learn.

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of Nima
Khazaei nimakha@gmail.com
Sent: Thursday, June 28, 2018 1:52 AM
To: CollectionSpace
Subject: [Talk] Error on newly-added field: Problem retrieving property
for xpath [...] with CSID = null

Hello all,
I'm working on a new tenant profile and just added a field to the Media
Handling record. I'm getting an error message, and I have no idea what it
means or what I did wrong!. Pasted below are the API request where I see
the error message, the entire XML file for the media handling record I
created (all it does is add one field, called filmSubject, and add an
option to the "types"), and a snippet from cspace-services.log.

I would sincerely appreciate any help. Please let me know if there's any
other info I can provide. Thank you very much!

-N

Here is the API request:

nima@dana:~$ curl --user admin@canyoncinema.com:Administrator -H
"Accept: application/json" "http://dev-cs45-2.cancf.com/
cspace-services/media"

List request failed: org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException:
Problem retrieving property for xpath { media_canyon:filmSubject } with
CSID = null.

Here is the extension schema file:

<record id="media" is-extension="true" type="procedure,record"> <services-record-path id="canyon">media_canyon:http: //collectionspace.org/services/media/local/canyon,media_canyon </services-record-path>
 <section id="mediaInformation">
     <repeat id="types">
         <field id="type" ui-search="repeatable">
             <options>
                 <option id="" default="yes">Please select a

value</option>
<option id="dataset" >Dataset</option>
<option id="document" >Document</option>
<option id="moving_image" >Moving Image</option>
<option id="still_image" >Still Image</option>
<option id="sound" >Sound</option>
<option id="film_still">Film Still</option>
</options>
</field>
</repeat>

     <field id="filmSubject" section="canyon"

mini="search,list,relate" autocomplete="work-work"/>

 </section>
</record>

And here is the log snippet from cspace-services.log:

2018-06-28 08:46:20,886 ERROR [http-bio-8180-exec-4]
[org.collectionspace.services.media.MediaResource:562]
org.collectionspace.services.media.MediaResource detail: ^M
-- Exception: org.collectionspace.services.common.document.
DocumentException^M
-- Message: org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException:
Problem retrieving property for xpath { media_canyon:filmSubject } with
CSID = null.^M
-- Causes: org.collectionspace.services.nuxeo.client.java.
NuxeoDocumentException::Problem retrieving property for xpath {
media_canyon:filmSubject } with CSID = null.^M
org.nuxeo.ecm.core.api.model.PropertyNotFoundException::
media_canyon:filmSubject^M
^M
-- Stack Trace: ^M
--      org.collectionspace.services.common.document.DocumentException:
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException:
Problem retrieving property for xpath { media_canyon:filmSubject } with
CSID = null.^M
at org.collectionspace.services.nuxeo.client.java.
NuxeoDocumentModelHandler.extractCommonPartList(
NuxeoDocumentModelHandler.java:321)^M
at org.collectionspace.services.nuxeo.client.java.
NuxeoDocumentModelHandler.extractCommonPartList(
NuxeoDocumentModelHandler.java:75)^M
...first 4 lines. 92 more.^M


Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_
lists.collectionspace.org

Thank you very very much, both of you. What it took was hard-deleting the existing Media records by doing a DELETE request on the API. Fortunately they weren't important. It looks like the media_canyon table had been created, with the one field I added - it was just empty, while the media_common table had items in it. -N On Thu, Jun 28, 2018 at 1:50 PM, Ray Lee <rhlee@berkeley.edu> wrote: > Hi Nima, > Did you have media records in the system before you added the schema > extension? I've had the following problem, though I don't remember if the > error message was exactly the one you're seeing: I have records in the > system, then I add a schema extension where one of the fields is configured > to be a list result (which filmSubject is). Then when I search for records, > it attempts to pull the value of the field to produce the search results, > but the new schema doesn't exist on the previously existing records, so the > search fails. If you're only working with test data, the easiest fix is to > delete the previously existing records, or start with a clean database. > Otherwise you can do some database shenanigans to patch up the old records. > > Ray > > > On Thu, Jun 28, 2018 at 1:40 PM Richard Millet <richard.millet@lyrasis.org> > wrote: > >> Nima, >> >> Your schema extension definition looks ok to me. Here are a few things >> to check. Shutdown your CollectionSpace instance and: >> >> 1. Are you including and merging the extension in your >> /application/tomcat/src/main/resources/canyon-tenant.xml file? You >> should have like like this in that file: >> >> <include src="base-procedure-media.xml, canyon-procedure-media.xml" >> merge="xmlmerge.properties"/> >> >> 2. Have you rebuilt the application layer? From the root dir of the >> /application sources: >> >> man clean install -DskipTests >> >> 3. Have you re-deployed the Services layer? From /services/services/ >> JaxRsServiceProvider/: >> >> ant deploy >> >> 4. Check that there is a Nuxeo plugin for your schema extension. Inside >> the tomcat/nuxeo-server/plugins directory, you should see a file named >> something like this: >> >> collectionspace.media.schema.media_canyon.jar >> >> Inside that .jar file, you can examine the XML Schema file (*.xsd) to see >> if extension schema is what you expect -in your case, it should be just one >> field/element. >> >> Let us know what you learn. >> >> -Richard >> >> ________________________________________ >> From: Talk <talk-bounces@lists.collectionspace.org> on behalf of Nima >> Khazaei <nimakha@gmail.com> >> Sent: Thursday, June 28, 2018 1:52 AM >> To: CollectionSpace >> Subject: [Talk] Error on newly-added field: Problem retrieving property >> for xpath [...] with CSID = null >> >> Hello all, >> I'm working on a new tenant profile and just added a field to the Media >> Handling record. I'm getting an error message, and I have no idea what it >> means or what I did wrong!. Pasted below are the API request where I see >> the error message, the entire XML file for the media handling record I >> created (all it does is add one field, called filmSubject, and add an >> option to the "types"), and a snippet from cspace-services.log. >> >> I would sincerely appreciate any help. Please let me know if there's any >> other info I can provide. Thank you very much! >> >> -N >> >> Here is the API request: >> >> nima@dana:~$ curl --user admin@canyoncinema.com:Administrator -H >> "Accept: application/json" "http://dev-cs45-2.cancf.com/ >> cspace-services/media" >> >> List request failed: org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: >> Problem retrieving property for xpath { media_canyon:filmSubject } with >> CSID = null. >> >> Here is the extension schema file: >> >> <record id="media" is-extension="true" type="procedure,record"> >> <services-record-path id="canyon">media_canyon:http: >> //collectionspace.org/services/media/local/canyon,media_canyon >> </services-record-path> >> >> <section id="mediaInformation"> >> <repeat id="types"> >> <field id="type" ui-search="repeatable"> >> <options> >> <option id="" default="yes">Please select a >> value</option> >> <option id="dataset" >Dataset</option> >> <option id="document" >Document</option> >> <option id="moving_image" >Moving Image</option> >> <option id="still_image" >Still Image</option> >> <option id="sound" >Sound</option> >> <option id="film_still">Film Still</option> >> </options> >> </field> >> </repeat> >> >> <field id="filmSubject" section="canyon" >> mini="search,list,relate" autocomplete="work-work"/> >> >> </section> >> </record> >> >> >> And here is the log snippet from cspace-services.log: >> >> 2018-06-28 08:46:20,886 ERROR [http-bio-8180-exec-4] >> [org.collectionspace.services.media.MediaResource:562] >> org.collectionspace.services.media.MediaResource detail: ^M >> -- Exception: org.collectionspace.services.common.document. >> DocumentException^M >> -- Message: org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: >> Problem retrieving property for xpath { media_canyon:filmSubject } with >> CSID = null.^M >> -- Causes: org.collectionspace.services.nuxeo.client.java. >> NuxeoDocumentException::Problem retrieving property for xpath { >> media_canyon:filmSubject } with CSID = null.^M >> org.nuxeo.ecm.core.api.model.PropertyNotFoundException:: >> media_canyon:filmSubject^M >> ^M >> -- Stack Trace: ^M >> -- org.collectionspace.services.common.document.DocumentException: >> org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: >> Problem retrieving property for xpath { media_canyon:filmSubject } with >> CSID = null.^M >> at org.collectionspace.services.nuxeo.client.java. >> NuxeoDocumentModelHandler.extractCommonPartList( >> NuxeoDocumentModelHandler.java:321)^M >> at org.collectionspace.services.nuxeo.client.java. >> NuxeoDocumentModelHandler.extractCommonPartList( >> NuxeoDocumentModelHandler.java:75)^M >> ...first 4 lines. 92 more.^M >> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> http://lists.collectionspace.org/mailman/listinfo/talk_ >> lists.collectionspace.org >> >
RL
Ray Lee
Fri, Jun 29, 2018 4:29 AM

Cool. If something like this ever happens and you have records you want to
keep, you just have to create a row in the media_canyon table for each id
in the media_common table. Something like: INSERT INTO media_canyon (id)
SELECT id FROM media_common.

Ray

On Thu, Jun 28, 2018 at 8:13 PM Nima Khazaei nimakha@gmail.com wrote:

Thank you very very much, both of you.

What it took was hard-deleting the existing Media records by doing a
DELETE request on the API. Fortunately they weren't important.

It looks like the media_canyon table had been created, with the one field
I added - it was just empty, while the media_common table had items in it.

-N

On Thu, Jun 28, 2018 at 1:50 PM, Ray Lee rhlee@berkeley.edu wrote:

Hi Nima,
Did you have media records in the system before you added the schema
extension? I've had the following problem, though I don't remember if the
error message was exactly the one you're seeing: I have records in the
system, then I add a schema extension where one of the fields is configured
to be a list result (which filmSubject is). Then when I search for records,
it attempts to pull the value of the field to produce the search results,
but the new schema doesn't exist on the previously existing records, so the
search fails. If you're only working with test data, the easiest fix is to
delete the previously existing records, or start with a clean database.
Otherwise you can do some database shenanigans to patch up the old records.

Ray

On Thu, Jun 28, 2018 at 1:40 PM Richard Millet <
richard.millet@lyrasis.org> wrote:

Nima,

Your schema extension definition looks ok to me.  Here are a few things
to check.  Shutdown your CollectionSpace instance and:

  1. Are you including and merging the extension in your
    /application/tomcat/src/main/resources/canyon-tenant.xml file?  You should
    have like like this in that file:

<include src="base-procedure-media.xml, canyon-procedure-media.xml" merge="xmlmerge.properties"/>

  1. Have you rebuilt the application layer?  From the root dir of the
    /application sources:

man clean install -DskipTests

  1. Have you re-deployed the Services layer?  From
    /services/services/JaxRsServiceProvider/:

ant deploy

  1. Check that there is a Nuxeo plugin for your schema extension.  Inside
    the tomcat/nuxeo-server/plugins directory, you should see a file named
    something like this:

collectionspace.media.schema.media_canyon.jar

Inside that .jar file, you can examine the XML Schema file (*.xsd) to
see if extension schema is what you expect -in your case, it should be just
one field/element.

Let us know what you learn.

-Richard


From: Talk talk-bounces@lists.collectionspace.org on behalf of Nima
Khazaei nimakha@gmail.com
Sent: Thursday, June 28, 2018 1:52 AM
To: CollectionSpace
Subject: [Talk] Error on newly-added field: Problem retrieving property
for xpath [...] with CSID = null

Hello all,
I'm working on a new tenant profile and just added a field to the Media
Handling record. I'm getting an error message, and I have no idea what it
means or what I did wrong!. Pasted below are the API request where I see
the error message, the entire XML file for the media handling record I
created (all it does is add one field, called filmSubject, and add an
option to the "types"), and a snippet from cspace-services.log.

I would sincerely appreciate any help. Please let me know if there's any
other info I can provide. Thank you very much!

-N

Here is the API request:

nima@dana:~$ curl --user admin@canyoncinema.com:Administrator -H
"Accept: application/json" "
http://dev-cs45-2.cancf.com/cspace-services/media"

List request failed:
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException:
Problem retrieving property for xpath { media_canyon:filmSubject } with
CSID = null.

Here is the extension schema file:

<record id="media" is-extension="true" type="procedure,record"> <services-record-path id="canyon">media_canyon: http://collectionspace.org/services/media/local/canyon,media_canyon </services-record-path>
 <section id="mediaInformation">
     <repeat id="types">
         <field id="type" ui-search="repeatable">
             <options>
                 <option id="" default="yes">Please select a

value</option>
<option id="dataset" >Dataset</option>
<option id="document" >Document</option>
<option id="moving_image" >Moving Image</option>
<option id="still_image" >Still Image</option>
<option id="sound" >Sound</option>
<option id="film_still">Film Still</option>
</options>
</field>
</repeat>

     <field id="filmSubject" section="canyon"

mini="search,list,relate" autocomplete="work-work"/>

 </section>
</record>

And here is the log snippet from cspace-services.log:

2018-06-28 08:46:20,886 ERROR [http-bio-8180-exec-4]
[org.collectionspace.services.media.MediaResource:562]
org.collectionspace.services.media.MediaResource detail: ^M
-- Exception:
org.collectionspace.services.common.document.DocumentException^M
-- Message:
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException:
Problem retrieving property for xpath { media_canyon:filmSubject } with
CSID = null.^M
-- Causes:
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException::Problem
retrieving property for xpath { media_canyon:filmSubject } with CSID =
null.^M

org.nuxeo.ecm.core.api.model.PropertyNotFoundException::media_canyon:filmSubject^M
^M
-- Stack Trace: ^M

org.collectionspace.services.common.document.DocumentException:
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException:
Problem retrieving property for xpath { media_canyon:filmSubject } with
CSID = null.^M
at
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler.extractCommonPartList(NuxeoDocumentModelHandler.java:321)^M
at
org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler.extractCommonPartList(NuxeoDocumentModelHandler.java:75)^M
...first 4 lines. 92 more.^M


Talk mailing list
Talk@lists.collectionspace.org

http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org

Cool. If something like this ever happens and you have records you want to keep, you just have to create a row in the media_canyon table for each id in the media_common table. Something like: INSERT INTO media_canyon (id) SELECT id FROM media_common. Ray On Thu, Jun 28, 2018 at 8:13 PM Nima Khazaei <nimakha@gmail.com> wrote: > Thank you very very much, both of you. > > What it took was hard-deleting the existing Media records by doing a > DELETE request on the API. Fortunately they weren't important. > > It looks like the media_canyon table had been created, with the one field > I added - it was just empty, while the media_common table had items in it. > > -N > > On Thu, Jun 28, 2018 at 1:50 PM, Ray Lee <rhlee@berkeley.edu> wrote: > >> Hi Nima, >> Did you have media records in the system before you added the schema >> extension? I've had the following problem, though I don't remember if the >> error message was exactly the one you're seeing: I have records in the >> system, then I add a schema extension where one of the fields is configured >> to be a list result (which filmSubject is). Then when I search for records, >> it attempts to pull the value of the field to produce the search results, >> but the new schema doesn't exist on the previously existing records, so the >> search fails. If you're only working with test data, the easiest fix is to >> delete the previously existing records, or start with a clean database. >> Otherwise you can do some database shenanigans to patch up the old records. >> >> Ray >> >> >> On Thu, Jun 28, 2018 at 1:40 PM Richard Millet < >> richard.millet@lyrasis.org> wrote: >> >>> Nima, >>> >>> Your schema extension definition looks ok to me. Here are a few things >>> to check. Shutdown your CollectionSpace instance and: >>> >>> 1. Are you including and merging the extension in your >>> /application/tomcat/src/main/resources/canyon-tenant.xml file? You should >>> have like like this in that file: >>> >>> <include src="base-procedure-media.xml, canyon-procedure-media.xml" >>> merge="xmlmerge.properties"/> >>> >>> 2. Have you rebuilt the application layer? From the root dir of the >>> /application sources: >>> >>> man clean install -DskipTests >>> >>> 3. Have you re-deployed the Services layer? From >>> /services/services/JaxRsServiceProvider/: >>> >>> ant deploy >>> >>> 4. Check that there is a Nuxeo plugin for your schema extension. Inside >>> the tomcat/nuxeo-server/plugins directory, you should see a file named >>> something like this: >>> >>> collectionspace.media.schema.media_canyon.jar >>> >>> Inside that .jar file, you can examine the XML Schema file (*.xsd) to >>> see if extension schema is what you expect -in your case, it should be just >>> one field/element. >>> >>> Let us know what you learn. >>> >>> -Richard >>> >>> ________________________________________ >>> From: Talk <talk-bounces@lists.collectionspace.org> on behalf of Nima >>> Khazaei <nimakha@gmail.com> >>> Sent: Thursday, June 28, 2018 1:52 AM >>> To: CollectionSpace >>> Subject: [Talk] Error on newly-added field: Problem retrieving property >>> for xpath [...] with CSID = null >>> >>> Hello all, >>> I'm working on a new tenant profile and just added a field to the Media >>> Handling record. I'm getting an error message, and I have no idea what it >>> means or what I did wrong!. Pasted below are the API request where I see >>> the error message, the entire XML file for the media handling record I >>> created (all it does is add one field, called filmSubject, and add an >>> option to the "types"), and a snippet from cspace-services.log. >>> >>> I would sincerely appreciate any help. Please let me know if there's any >>> other info I can provide. Thank you very much! >>> >>> -N >>> >>> Here is the API request: >>> >>> nima@dana:~$ curl --user admin@canyoncinema.com:Administrator -H >>> "Accept: application/json" " >>> http://dev-cs45-2.cancf.com/cspace-services/media" >>> >>> List request failed: >>> org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: >>> Problem retrieving property for xpath { media_canyon:filmSubject } with >>> CSID = null. >>> >>> Here is the extension schema file: >>> >>> <record id="media" is-extension="true" type="procedure,record"> >>> <services-record-path id="canyon">media_canyon: >>> http://collectionspace.org/services/media/local/canyon,media_canyon >>> </services-record-path> >>> >>> <section id="mediaInformation"> >>> <repeat id="types"> >>> <field id="type" ui-search="repeatable"> >>> <options> >>> <option id="" default="yes">Please select a >>> value</option> >>> <option id="dataset" >Dataset</option> >>> <option id="document" >Document</option> >>> <option id="moving_image" >Moving Image</option> >>> <option id="still_image" >Still Image</option> >>> <option id="sound" >Sound</option> >>> <option id="film_still">Film Still</option> >>> </options> >>> </field> >>> </repeat> >>> >>> <field id="filmSubject" section="canyon" >>> mini="search,list,relate" autocomplete="work-work"/> >>> >>> </section> >>> </record> >>> >>> >>> And here is the log snippet from cspace-services.log: >>> >>> 2018-06-28 08:46:20,886 ERROR [http-bio-8180-exec-4] >>> [org.collectionspace.services.media.MediaResource:562] >>> org.collectionspace.services.media.MediaResource detail: ^M >>> -- Exception: >>> org.collectionspace.services.common.document.DocumentException^M >>> -- Message: >>> org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: >>> Problem retrieving property for xpath { media_canyon:filmSubject } with >>> CSID = null.^M >>> -- Causes: >>> org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException::Problem >>> retrieving property for xpath { media_canyon:filmSubject } with CSID = >>> null.^M >>> >>> org.nuxeo.ecm.core.api.model.PropertyNotFoundException::media_canyon:filmSubject^M >>> ^M >>> -- Stack Trace: ^M >>> -- >>> org.collectionspace.services.common.document.DocumentException: >>> org.collectionspace.services.nuxeo.client.java.NuxeoDocumentException: >>> Problem retrieving property for xpath { media_canyon:filmSubject } with >>> CSID = null.^M >>> at >>> org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler.extractCommonPartList(NuxeoDocumentModelHandler.java:321)^M >>> at >>> org.collectionspace.services.nuxeo.client.java.NuxeoDocumentModelHandler.extractCommonPartList(NuxeoDocumentModelHandler.java:75)^M >>> ...first 4 lines. 92 more.^M >>> >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>> >> >