On Sun, May 18, 2008 at 11:46 PM, <project_trainees(a)amritatech.com> wrote:
I attached a XAR file to upload and when I select the
file to import, it
doesn't shows any documents. But when I attached and selected a TODO
application, it shows all documents of TODO. Why it is so? How can I
import my XAR file? Can any one help?
I had similar problems, perhaps. You should check your tomcat logs as to the
nature of this problem, because I'd imagine it's the same sort of uncaught
exception issue I found.
In general, I think the import code needs to be more carefully checked for
exceptions. When they occur, failure shouldn't be silent via uncaught
exception, rather, an error dialog needs to be presented.
(here's my notes on this issue... btw. the solution was to delete the
packages.xml file and force it to rebuild the file before creating the XAR.
It was a maven error (i think) in my case, that caused this. or perhaps it's
a bug that maven was supposed to delete the file first but didn't).
----------------------------------------------
PROBLEM>> * import the xar files from the preferences
ISSUE after uploading a xar file in
http://............./import/XWiki/Import?editor=import&space=XWiki<http://nielsmayer.com/curriki/bin/import/XWiki/Import?editor=import&space=XWiki>
clicking on it does nothing, and prevents further imporing of the XAR file,
issuing the following error:
13:48:52,163 [
http://............./bin/import/XWiki/Import?action=getPackageInfos&name=wiki.xar&xpage=plain&_=<http://nielsmayer.com/curriki/bin/import/XWiki/Import?action=getPackageInfos&name=curriki-wiki.xar&xpage=plain&_=>]
[http-127.0.0.1-8080-Processor2] WARN web.XWikiAction -
Uncaught exception: Error number 11015 in 11: Exception while importing
Wrapped Exception: Error number 0 in 5: Package: document Demo.WECCooley
does not exist in package definition
com.xpn.xwiki.XWikiException: Error number 11015 in 11: Exception while
importing
Wrapped Exception: Error number 0 in 5: Package: document Demo.WECCooley
does not exist in package definition
In
web/target/war/work/com.xpn.xwiki.platform/xwiki-web-standard/templates/importinline.vm
note <a href="javascript:void()"
title="$msg.get("choosethispackage")"
onclick="selectPackage('$attach.filename'); return
false;">#packName($attach.filename)</a>
The call with the error from the logs "action=getPackageInfos" is in
/usr/java/curriki/trunk/web/target/war/work/com.xpn.xwiki.platform/xwiki-web-standard/skins/albatross/import.js
function selectPackage(name)
{
var str = "<input type=\"hidden\" name=\"name\"
value=\"" + name + "\"
/>";
$('importDocName').innerHTML = str;
var pars =
"action=getPackageInfos&name="+name+"&xpage=plain";
var myAjax = new Ajax.XWikiRequest( "XWiki", "Import", {method:
'get',
parameters: pars, onComplete: showPackageInfos} , "import");
}
According to
http://www.mail-archive.com/devs@xwiki.org/msg01237.html this
error is related to missing entries like "Demo.WECCooley" in
wiki/src/main/resources/package.xml ...
------------------------------------------------