Opened 13 years ago

Closed 13 years ago

#507 closed defect (fixed)

Error creating a metadata child

Reported by: aperi2007 Owned by: geonetwork-devel@…
Priority: major Milestone: v2.7.0
Component: General Version:
Keywords: Cc:

Description

Hi, using the thunk version (r7730) I see an error trying to create a child from a metadata.

Creating before a series metadata and after using the option "create child" try to create a child of it. When I try "save and close" I see an error with this message.

The requested operation could not be performed. XPathException : A sequence of more than one item is not allowed as the first argument of string() (<download/>, <download/>)

The log report this :

2011-05-18 11:47:16,232 INFO  [jeeves.service] -    -> dispatching to output for : metadata.show
2011-05-18 11:47:16,378 INFO  [jeeves.service] -      -> transforming with stylesheet : /home/archivio/tomcat-website/website/geonetwork/xsl/metadata-show.xsl
Error on line 2831 of metadata-iso19139.xsl:
  XPTY0004: A sequence of more than one item is not allowed as the first argument of
  string() (<download/>, <download/>) 
2011-05-18 11:47:16,743 ERROR [jeeves.service] -    -> exception during transformation for : metadata.show
2011-05-18 11:47:16,743 ERROR [jeeves.service] -    ->  (C) stylesheet : /home/archivio/tomcat-website/website/geonetwork/xsl/metadata-show.xsl
2011-05-18 11:47:16,743 ERROR [jeeves.service] -    ->  (C) message    : A sequence of more than one item is not allowed as the first argument of string() (<download/>, <download/>) 
2011-05-18 11:47:16,743 ERROR [jeeves.service] -    ->  (C) exception  : XPathException
2011-05-18 11:47:16,748 DEBUG [jeeves.service] - Raised exception while executing service
<error id="error">
  <message>A sequence of more than one item is not allowed as the first argument of string() (&lt;download/&gt;, &lt;download/&gt;)</message>
  <class>XPathException</class>
  <stack>
    <at class="net.sf.saxon.expr.Expression" file="Expression.java" line="981" method="typeError" />
    <at class="net.sf.saxon.expr.CardinalityChecker" file="CardinalityChecker.java" line="270" method="evaluateItem" />
    <at class="net.sf.saxon.functions.StringFn" file="StringFn.java" line="54" method="evaluateItem" />
    <at class="net.sf.saxon.expr.ValueComparison" file="ValueComparison.java" line="569" method="effectiveBooleanValue" />
    <at class="net.sf.saxon.expr.BooleanExpression" file="BooleanExpression.java" line="182" method="effectiveBooleanValue" />
    <at class="net.sf.saxon.expr.BooleanExpression" file="BooleanExpression.java" line="182" method="effectiveBooleanValue" />
    <at class="net.sf.saxon.instruct.Choose" file="Choose.java" line="679" method="processLeavingTail" />
    <at class="net.sf.saxon.expr.LetExpression" file="LetExpression.java" line="557" method="processLeavingTail" />
    <at class="net.sf.saxon.instruct.Block" file="Block.java" line="556" method="processLeavingTail" />
    <at class="net.sf.saxon.instruct.Template" file="Template.java" line="203" method="applyLeavingTail" />
  </stack>

Attachments (1)

metadata_from_log.txt (48.7 KB ) - added by aperi2007 13 years ago.
metadata retrieved from log tomcat

Download all attachments as: .zip

Change History (6)

comment:1 by fxp, 13 years ago

I can't reproduce the issue. I'm not sure this is related to create child function. Please attach your metadata record to the patch.

Thanks.

by aperi2007, 13 years ago

Attachment: metadata_from_log.txt added

metadata retrieved from log tomcat

comment:2 by aperi2007, 13 years ago

A retrieve the metadata from the log because I'm not able to get it from GN. Trying to open the metadata I have the same error.

The requested operation could not be performed. XPathException : A sequence of more than one item is not allowed as the first argument of string() (<download/>, <download/>)

So geto it from log of tomcat. Add it to the ticket.

comment:3 by aperi2007, 13 years ago

Hi, this is the sequence to get the error. :)

  1. start with an empty db (postgres 9.0)
  2. create a new metadata using the template "vector iso19139 (preferred)"
  3. after create close the metadata.
  4. re-open the metadata and choose the option: "other actions -> create child"
  5. after choose sample-group as target group
  6. when appear the new metadata (child) to a "save and close"

at this point there is the error:

The requested operation could not be performed.

XPathException : A sequence of more than one item is not allowed as the first argument of string() (<download/>, <download/>)

comment:4 by aperi2007, 13 years ago

oops, retype:

  1. start with an empty db (postgres 9.0)
  2. create a new metadata using the template "vector iso19139 (preferred)"
  3. after create close the metadata.
  4. re-open the metadata and choose the option: "other actions -> create child"
  5. after choose sample-group as target group
  6. when appear the new metadata (child) to a "save and close"

at this point there is the error:

The requested operation could not be performed. XPathException : A sequence of more than one item is not allowed as the first argument of string() (<download/>, <download/>)

in reply to:  4 comment:5 by fxp, 13 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.