Hi,
It depends a lot on which MMBase version you are using. Before the 1.7 release i fixed some bugs that were related to the XMLimporter cause i needed it myself.
At 13:59 +0200 02-06-2004, Ignacio Renuncio wrote:
Hi everybody,
I'm trying to use the XML importer module to import some data into my MMBase installation. However I've got some problems:
The "XML importer quickstart", dated Jan 2002, seems to be completely outdated.
That's true.
Steps:
1) Downloaded the last xmlimporter build from the downloads section (dated 2004/05/29) and installed it.
2) Updated transactions.dtd, transactionhandler.xml, jsp pages and mmbase-xmlimporter.jar (only the jar was different, the rest were identical. BTW: The new JAR is 10KB smaller).
3) Checked transactionhandler.xml: Status is "active" and its classfile is "org.mmbase.applications.xmlimporter.TransactionHandler".
Correct.
4) I couldn't find upload.jar but I think it's been replaced by commons-fileupload-1.0.jar which is in the lib directory indeed.
Should work, if i'm correct.
5) Created the "import" and "import/report" folders in my MMBase config directory.
I couldn't find the samples so I created a sample XML:
You can download some samples on the XMLImporter project page http://www.mmbase.org/?portal=199&page=13332&template=%2Fdevelopment%2Fprojects%2Fproject.jsp&project=14784
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE transactions SYSTEM "transactions.dtd"> <transactions> <create> <createObject id="n1" type="dialecto"> <setField name="descripcion">Dialecto nuevo 1</setField> </createObject> <createObject id="n2" type="dialecto"> <setField name="descripcion">Dialecto nuevo 2</setField> </createObject> <createObject id="n3" type="dialecto"> <setField name="descripcion">Dialecto nuevo 3</setField> </createObject> <createObject id="n4" type="dialecto"> <setField name="descripcion">Dialecto nuevo 4</setField> </createObject> </create> </transactions>
It validates ok so it has to be correct... but when I try to load it I get the following error:
HTTP Status 404 - nullC:\Documents and Settings\irenuncio\Escritorio\importdialectos.xml (Invalid filename)
��What's the null before the pathname??
I don't know if anybody tested it on Windows. I didn't. The null should not be there. Maybe you will have to try something like adapting importhome.jsp. Or you could place the file you wish to import in the import dir you configured (without uploading it).
2004-06-02 13:51:35,347 ERROR xmlimporter.jsp.importhome.jsp - import.jsp IMPORT NIET GESTART: REDEN ONBEKEND
2004-06-02 13:51:35,347 ERROR xmlimporter.jsp.importhome.jsp - java.lang.NullPointerException
2004-06-02 13:51:35,347 INFO xmlimporter.jsp.importhome.jsp - import directory: null
2004-06-02 13:51:35,347 ERROR xmlimporter.jsp.importhome.jsp - import.jsp FILE DELETE NIET GESTART: REDEN ONBEKEND
Could it be that the language setting of MMBase is still Dutch (nl)? You can find that in config/modules/mmbaseroot.xml
2004-06-02 13:51:35,347 ERROR xmlimporter.jsp.importhome.jsp - java.lang.NullPointerException
2004-06-02 13:51:37,268 ERROR xmlimporter.jsp.importhome.jsp - import.jsp IMPORT NIET GESTART: REDEN ONBEKEND
2004-06-02 13:51:37,268 ERROR xmlimporter.jsp.importhome.jsp - java.lang.NullPointerException
2004-06-02 13:51:37,268 INFO xmlimporter.jsp.importhome.jsp - import directory: null
2004-06-02 13:51:37,268 ERROR xmlimporter.jsp.importhome.jsp - import.jsp FILE DELETE NIET GESTART: REDEN ONBEKEND
2004-06-02 13:51:37,268 ERROR xmlimporter.jsp.importhome.jsp - java.lang.NullPointerException
I think something is not properly configured but I don't know what is, and I can't check the JUnit tests to see if XMLimporter works because I don't know where they are.
Any clue? Am I the only who has tried to import an XML and failed?
I failed a lot of times but finally succeeded :-) Succes!
---Andr� -- ------------------------------------------------------------------>><<-- Andr� van Toly http://www.toly.nl 06-27233562
