[xwiki-devs] XEclipse - problem connecting to local XWiki

Enygma enygma2002_ro at yahoo.com
Wed Apr 2 04:17:09 CEST 2008


I did a bit of debugging and traced the problem to line 65 in XWikiRemoteDAO.java

try {
                Page page = swizzleXWiki.getPage("XWiki.WebHome");
} catch (ClassCastException e) {
...
} catch (Exception e) {

The date is was earlier complaining about is the modification date of the wiki space I believe.
Seems like there is a SwizzleConversionException thrown which the workaround mentioned in the comments fails to catch and I think the ClassCastException there was actually supposed to be a SwizzleConversionException so I changed the code to:

try {
                Page page = swizzleXWiki.getPage("XWiki.WebHome");
} catch (SwizzleConversionException e) {

Now, it disables the conversion as the workaround says but now I`m getting this exception:

org.xwiki.eclipse.model.XWikiConnectionException: org.xwiki.eclipse.model.impl.XWikiDAOException: org.codehaus.swizzle.confluence.ConfluenceException: Null values aren't supported, if isEnabledForExtensions() == false
    at org.xwiki.eclipse.model.impl.XWikiPlainConnection.connect(XWikiPlainConnection.java:83)
    at org.xwiki.eclipse.XWikiEclipsePageIndexer$IndexerJob.run(XWikiEclipsePageIndexer.java:67)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.xwiki.eclipse.model.impl.XWikiDAOException: org.codehaus.swizzle.confluence.ConfluenceException: Null values aren't supported, if isEnabledForExtensions() == false
    at org.xwiki.eclipse.model.impl.XWikiRemoteDAO.<init>(XWikiRemoteDAO.java:79)
    at org.xwiki.eclipse.model.impl.XWikiPlainConnection.connect(XWikiPlainConnection.java:71)
    ... 2 more
Caused by: org.codehaus.swizzle.confluence.ConfluenceException: Null values aren't supported, if isEnabledForExtensions() == false
    at org.codehaus.swizzle.confluence.Confluence.call(Confluence.java:778)
    at org.codehaus.swizzle.confluence.Confluence.call(Confluence.java:751)
    at org.codehaus.swizzle.confluence.Confluence.login(Confluence.java:49)
    at org.xwiki.eclipse.model.impl.XWikiRemoteDAO.<init>(XWikiRemoteDAO.java:54)
    ... 3 more

After digging some more, I found out that this is caused by 
XWikiConnectionManager.getDefault().getPasswordForConnection(connection);
at line 67 in XWikiEclipsePageIndexer.java where the connection manager is supposed to get the password associated to the connection but from what I see, the ID of the connection being resolved does not exist in the xwikiConnections HashTable which is, btw, populated with the correct initial connection containing the entered username and password. 

I don`t understand where does this second conenction come from that is not listed in the xwikiConnections with its ID, thus returning a null password and generating the above exception upon issuing connect().

Hope this helps on speeding things up.

Thank you and hope someone comes to the rescue :)

----- Original Message ----
From: Enygma <enygma2002_ro at yahoo.com>
To: users at xwiki.org
Cc: devs at xwiki.org
Sent: Tuesday, April 1, 2008 2:23:13 AM
Subject: [xwiki-devs] XEclipse - problem connecting to local XWiki

Hello XWiki users and developers.

My name is Eduard Moraru and I'm going to apply this year for Google Summer of Code at XWiki on the project XWiki Offline.
I am planning on embedding this project in the already existing XEclipse on which I've understood there is already some work done.

My problem is that I tried out XEclipse (xwiki-eclipse-rcp-linux-gtk-x86-1.1.zip and xwiki-eclipse-1.1.zip) on a local installation of XWiki (xwiki-enterprise-installer-generic-1.3.jar) using both user Admin and a new test user and did not manage to connect to the wiki.
I then tried to connect to xwiki.org using a newly registered account and it worked perfectly.

On the local installation, XEclipse pops an exception which I can't get past:

org.xwiki.eclipse.model.XWikiConnectionException:org.xwiki.eclipse.model.impl.XWikiDAOException:org.codehaus.swizzle.confluence.SwizzleConversionException:java.text.ParseException: Unparseable date: "mer. juil. 11 18:57:54EEST 2007"
        at org.xwiki.eclipse.model.impl.XWikiPlainConnection.connect(Unknown Source)
        at org.xwiki.eclipse.wizards.NewConnectionWizard$1.run(Unknown Source)
        at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Caused by: org.xwiki.eclipse.model.impl.XWikiDAOException:org.codehaus.swizzle.confluence.SwizzleConversionException:java.text.ParseException: Unparseable date: "mer. juil. 11 18:57:54EEST 2007"
        at org.xwiki.eclipse.model.impl.XWikiRemoteDAO.<init>(Unknown Source)
        ... 3 more
Caused by: org.codehaus.swizzle.confluence.SwizzleConversionException:java.text.ParseException: Unparseable date: "mer. juil. 11 18:57:54EEST 2007"
        at org.codehaus.swizzle.confluence.ConfluenceObjectConvertor.revert(ConfluenceObjectConvertor.java:56)
        at org.codehaus.swizzle.confluence.MapConvertor.revert(MapConvertor.java:39)
        at org.codehaus.swizzle.confluence.Confluence.revert(Confluence.java:791)
        at org.codehaus.swizzle.confluence.Confluence.getPage(Confluence.java:127)
        ... 4 more
Caused by: java.text.ParseException: Unparseable date: "mer. juil. 11 18:57:54 EEST 2007"
        at java.text.DateFormat.parse(DateFormat.java:355)
        at org.codehaus.swizzle.confluence.ConfluenceObjectConvertor.revert(ConfluenceObjectConvertor.java:53)
        ... 7 more

I also posted a bug on JIRA at http://jira.xwiki.org/jira/browse/XECLIPSE-100 regarding this issue but I figured on the mailing list I'd get faster feedback.

My question is: Am I doing something wrong with my local installation? Are there some other privileges to give that I left out?

At a first look, I`d say It`s a hardcoded date "mer. juil. 11 18:57:54 EEST 2007"(it's always the same), left there during development, but I`m not sure if it`s on the XEclipse side or the XWiki side.

Thank you very much for your time and I await your suggestions.




      ____________________________________________________________________________________
No Cost - Get a month of Blockbuster Total Access now. Sweet deal for Yahoo! users and friends. 
http://tc.deals.yahoo.com/tc/blockbuster/text1.com
_______________________________________________
devs mailing list
devs at xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs






      ____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.  
http://tc.deals.yahoo.com/tc/blockbuster/text5.com


More information about the devs mailing list