hi all,
at work i am trying to set up a suitable xwiki imstallation.n for my
company. One of the feature must be inport of existing documents into the
wiki. So I am trying to create a simple .XAr file with one page in it. When
I try to import it, the console display of the xwiki servlet displays a
parser exception :
Wrapped Exception:
com.xpn.xwiki.plugin.packaging.PackageException: Error number 0 in 5:
Package: E
rror when reading the XML
at com.xpn.xwiki.plugin.packaging.Package.Import(Package.java:404)
at com.xpn.xwiki.plugin.packaging.PackageAPI.Import(PackageAPI.java
:173)
at com.xpn.xwiki.web.ImportAction.render(ImportAction.java:42)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:148)
at org.apache.struts.action.RequestProcessor.processActionPerform
(Reques
tProcessor.java:431)
I am trying to import the following file (in XML) :
____________________________________________________________________________________________________________
<?xml version="1.0" encoding="UTF-8"?>
<xwikidoc>
<web>CompanionDocs</web>
<name>Status of Clocked Transactions in Time and Attendance</name>
<language />
<defaultLanguage>en</defaultLanguage>
<translation>0</translation>
<parent>CompanionDocs.Processes</parent>
<creator>ImportFromCompanion</creator>
<author>ImportFromCompanion</author>
<customClass />
<contentAuthor>ImportFromCompanion</contentAuthor>
<creationDate>
1188915768000
</creationDate>
<date>
1188915768000
</date>
<contentUpdateDate>
1188915768000
</contentUpdateDate>
<version>1.10</version>
<title>Status of Clocked Transactions in Time and Attendance
</title>
<template />
<defaultTemplate />
<validationScript />
<object>
<class>
<name>CompanionTemplates.TermClass</name>
<customClass />
<customMapping />
<defaultViewSheet />
<defaultEditSheet />
<defaultWeb />
<nameField />
<validationScript />
<Title>
<contenttype>PureText</contenttype>
<customDisplay />
<editor>PureText</editor>
<name>Title</name>
<number>1</number>
<prettyName>Title</prettyName>
<rows>1</rows>
<size>40</size>
<tooltip />
<unmodifiable>0</unmodifiable>
<validationMessage />
<validationRegExp />
<classType>com.xpn.xwiki.objects.classes.TextAreaClass
</classType>
</Title>
<Definition>
<contenttype>PureText</contenttype>
<customDisplay />
<editor>PureText</editor>
<name>Definition</name>
<number>2</number>
<prettyName>Definition</prettyName>
<rows>10</rows>
<size>40</size>
<tooltip />
<unmodifiable>0</unmodifiable>
<validationMessage />
<validationRegExp />
<classType>com.xpn.xwiki.objects.classes.TextAreaClass
</classType>
</Definition>
<Uses>
<contenttype>PureText</contenttype>
<customDisplay />
<editor>PureText</editor>
<name>Uses</name>
<number>3</number>
<prettyName>Uses</prettyName>
<rows>10</rows>
<size>40</size>
<tooltip />
<unmodifiable>0</unmodifiable>
<validationMessage />
<validationRegExp />
<classType>com.xpn.xwiki.objects.classes.TextAreaClass
</classType>
</Uses>
</class>
<name>Status of Clocked Transactions in Time and Attendance
</name>
<number>0</number>
<className>XWiki.TermClass</className>
<property>
<Title>Status of Clocked Transactions in Time and Attendance
</Title>
</property>
<property>
<Definition>The status of a clocked transaction indicates
whether the transaction has been included in a time calculation.
The valid alternatives are:
00 = Not calculated.
10 = Incorrect. The transaction has been included in a time calculation but
no times have been calculated from the transaction due to incorrect data (an
incorrect transaction type, for example). An incorrect transaction is, for
example, when a second time is clocked out directly after the first.
20 = Calculated.
</Definition>
</property>
<property>
<Uses>When reviewing the results of a time calculation, look for
transactions having status 10 = 'Incorrect' since this indicates that the
transactions are incorrect and should be adjusted.
When working with individual transactions, you must know its status since it
affects how you handle the transaction. The following principles are valid:
UUUUUUUUUUUU
* If you have adjusted a transaction having status 10 = 'Incorrect' or
status 20 = 'Calculated', you should recalculate the times for the changes
to be made permanent. For more information on calculating times, see.
* If a transaction is missing a status, it has been created manually in
retrospect. You should also recalculate times in this case if you want the
changes to be the basis of calculated times.
</Uses>
</property>
</object>
<content>
TTTT
</content>
<versions>
</versions>
</xwikidoc>
____________________________________________________________________________________________________________
The file sits in a folder called 'CompanionDocs' inside the .XAR archive. It
is called 'Status of Clocked Transactions in Time and Attendance' ...
The package.xml file :
____________________________________________________________________________________________________________
<?xml version="1.0" encoding="ISO-8859-1" ?>
<package>
<infos>
<name>Backup</name>
<description>on Tue Sep 25 10:25:17 CEST 2007 by XWiki.Admin</description>
<licence />
<author>XWiki.Admin</author>
<version />
<backupPack>false</backupPack>
<preserveVersion>false</preserveVersion>
</infos>
<files>
<file defaultAction="0" language="">CompanionDocs.Status of
Clocked
Transactions in Time and Attendance</file>
</files>
</package>
____________________________________________________________________________________________________________
Regards
--
Jean-Vivien MAURICE
Elève Ingénieur Informatique et Gestion, Polytech'Montpellier (ISIM)
E-mail : jvivien.m2(a)wanadoo.fr
Tél. : 0046 7 62 33 20 46
Skype : jean.vivien