The examples are here on the project page of the XML importer:

http://www.mmbase.org/?portal=199&page=556&project=14784&template=% 2Fdevelopment%2Fprojects%2Fproject.jsp

This error means you need to give each object you import an unique id:

2007-03-02 12:19:09,319 ERROR mmbase.applications.xmlimporter.TransactionHandler - TransactionError :org.mmbase.applications.xmlimporter.TransactionHand lerException : Transaction id does not exist: id = "1"

See the examples:
http://www.mmbase.org/mmbase/attachments/14175/importer.zip

---André

Op 2-mrt-2007, om 12:20 heeft Bram Enning het volgende geschreven:

Hi,
Still some questions from the XML-importer-front. I'm trying to write a transactions.xml which makes use of the similar object finder, but I'm not making any progress. The documentation mentions some examplefiles but they do not seem to exist anymore. If someone has them lying around, they would be quite usefull to me!

Here's what I did:
I succesfully imported the following file:
===========
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE transactions SYSTEM "transactions.dtd ">
<transactions exceptionPage="none" reportFile="tcpReport.txt" key="hokusspokuspitaluspas">
    <create timeOut="18" commit="true">
        <createObject id="1" type="urls">
        <setField name="name">MyFirstXMLImport</setField>
        <setField name="url">www.xmlimportest.nl</setField>
        <setField name="owner">admin</setField>
        </createObject>
    </create>
</transactions>
===========

Now in the next run I want to find the node and update it with new content (I as a Human know the node exists, but the File doesn't) so I'm wrestling to get the right syntax. Here's what I tried but it failed:

===========
<!DOCTYPE transactions SYSTEM "transactions.dtd">
<transactions exceptionPage="none" reportFile="tcpReport.txt" key="hokusspokuspitaluspas">
<open id="1">
    <mergeObject type="urls">
        <objectMatcher type="urls" class="BasicFinder">
            <param name="name" value="MyFirstXMLImport" />
            <param name="url" value="www.xmlimportest.nl" />
            <param name="owner" value="admin" />
        </objectMatcher>
        <objectMerger type="urls" class="BasicMerger">
            <param name="name" value="MyFirstXMLImport" />
            <param name="url" value=" www.xmlimportestGESLAAGD.nl" />
            <param name="owner" value="admin" />
        </objectMerger>
    </mergeObject>
</open>
</transactions>
===========

The log file gives me:

2007-03-02 12:19:09,267 INFO xmlimporter.jsp.startimport.jsp - import started with file: /Users/user/EclipseWorkspace/project/ transactions/transactions.xml 2007-03-02 12:19:09,273 SERVICE mmbase.applications.xmlimporter.TransactionHandler - TransactionHandler processing TCP 2007-03-02 12:19:09,274 SERVICE mmbase.applications.xmlimporter.TransactionsParser - Sax parser system id set to "/usr/local/apache- tomcat-5.5.20/webapps/ROOT/WEB- INF/config/dtd/" 2007-03-02 12:19:09,319 ERROR mmbase.applications.xmlimporter.TransactionHandler - TransactionError :org.mmbase.applications.xmlimporter.TransactionHandl erException : Transaction id does not exist: id = "1" 2007-03-02 12:19:09,319 ERROR mmbase.applications.xmlimporter.TransactionHandler - ExceptionPage none 2007-03-02 12:19:09,321 WARN mmbase.applications.xmlimporter.TransactionHandler - Transaction stopped at : Fri Mar 02 12:19:09 CET 2007


_______________________________________________
Users mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/users



--
André van Toly
web http://www.toly.nl                            mobile +31(0)627233562
----------------------------------------------------------------~~<<>>~~


_______________________________________________
Users mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/users

Reply via email to