I seem to remember getting this error when the XML documents being loaded
were referring a DTD. The problem was when the DTD reference was through
some kind of relative URL, just referring the filename. The server was not
able to resolve this. The solution in this case was to use an absolute URL
that the server was also able to locate (such as <!DOCTYPE yourdoc SYSTEM
"http://blabla.bla.bla/bla";>).
There is quite a few earlier postings on this issue. Try to search the
archives.

Anders
----- Original Message -----
From: "Unico Hommes" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, March 20, 2002 4:15 PM
Subject: RE: Exception : Collection Document Malformed


OK, so I guess nobody had an idea as to what might be causing this problem.
Perhaps someone can then explain what the message 'Collection Document
Malformed' may be referring to ? The collection document is the document
that carries the collection configuration right ? I guess that by creating a
collection thrue xmldb api the system is providing a default collection
document ? Any ideas ?

regards,
Unico

-----Oorspronkelijk bericht-----
Van: Unico Hommes
Verzonden: Monday, March 18, 2002 6:28 PM
Aan: [email protected]
Onderwerp: Exception : Collection Document Malformed


Hi,

When adding some xml documents to xindice I am getting the following
exception :

<exception>
org.xmldb.api.base.XMLDBException: Collection Document Malformed
</exception>

In my code I use only the xmldb api, nothing xindice specific :

<code description="creating a new collection">

CollectionManagementService service =  (CollectionManagementService)
parentCollection.getService("CollectionManagementService","1.0");
childCollection = service.createCollection("new");

</code>

<code description="adding new resource">

byte[] data = someObject.getContentBytes();
Resource resource =
collection.addResource("document.xml",XMLResource.RESOURCE_TYPE);
resource.setContent(new String(data));

</code>

Attached is one of the xml documents I am having problems with.

BTW: I don't have any problem adding this document with the xindicadmin tool
to the same collection.

Seems to me to be some kind of encoding problem ? Anybody know of a solution
?

Thnx,
Unico

Reply via email to