Project

General

Profile

Actions

Bug #4968

closed

Could not validate generated KAR file for uploading to repository

Added by Sean Riddle almost 13 years ago. Updated almost 13 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
core
Target version:
Start date:
04/30/2010
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
4968

Description

I created a KAR file by doing the following:

1) Instantiate: * An SDF director (iterations=1) * A StringConstant (value="Hello world!") * A Display

2) Connect the StringConstant to the Display
3) Create a new report containing Display.input.
4) Attempt to save to a repository.

The following exception is produced:

org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'KAR-Version'. One of '{lsid}' is expected.


Files

hello-report-metadata.xml (23.5 KB) hello-report-metadata.xml Sean Riddle, 04/30/2010 02:05 PM
Actions #1

Updated by Jing Tao almost 13 years ago

The xml looks like:
<mainAttributes>
<KAR-Version>2.0</KAR-Version>
<Manifest-Version>1.4.2</Manifest-Version>
<module-dependencies>provenance;core;reporting</module-dependencies>
<lsid>urn:lsid:kepler-project.org/ns/:882:14:1</lsid>
</mainAttributes>

However, the schema looks like:
<xs:complexType name="mainAttributesType">
<xs:sequence>
<xs:element name ="lsid" />
<xs:element name ="module-dependencies" minOccurs="0" />
<xs:element name ="KAR-Version" />
<xs:element name ="Manifest-Version" />
</xs:sequence>
</xs:complexType>

The order doesn't match

Actions #2

Updated by Jing Tao almost 13 years ago

During the generating the children elements of mainAttribute, kepler iterated a Set object to get names and values. However, Set objects couldn't keep order. So it may create an invalid document.

Now we change to use an ordered key list to get the names and values. The order will be persistent and any invalid document would not be generated.

I used the procedure on comment 1 and got an valid document.

I also tried upload some another kar files, it worked as well.

Sean, would you please test it again? If it works, would you please close the bug? Thanks.

Actions #3

Updated by Jing Tao almost 13 years ago

Close it. If Sean finds an issue on his testing, this bug will be reopened.

Actions #4

Updated by Redmine Admin almost 10 years ago

Original Bugzilla ID was 4968

Actions

Also available in: Atom PDF