[dokujclient] Re: Caught exception when executing action wiki.getAllPages: de.timroes.axmlrpc.XMLRPCException: Error getting result from server.

  • From: "English,N,Nathan,TAG7 R" <nathan.english@xxxxxx>
  • To: "dokujclient@xxxxxxxxxxxxx" <dokujclient@xxxxxxxxxxxxx>
  • Date: Wed, 7 Sep 2016 10:02:47 +0000

Hi Guillaume,

Thanks for the response.

The Version of Doku wiki I have is :Release 2015-08-10a "Detritus".
I have downloaded the dokujclient-3.9.0.jar from Maven and I also have the  
aXMLRPC-1.8.0.jar added from MavenRepository. Note Maven isn't setup in the 
project I am working on. 


Below is the sample code (from GitHub) I am using:
package com.company;

import dw.xmlrpc.DokuJClient;
import dw.xmlrpc.Page;

public class Main {
    public static void main(String[] args) throws Exception{
        String url = "http://polaris-u.nat.bt.com/lib/exe/xmlrpc.php";;
        String user = "607819425";
        String pwd = "Crackmy10!";

        DokuJClient client = new DokuJClient(url, user, pwd);
        System.out.println("Pages in the wiki " + client.getTitle() + " are:");
        for(Page page : client.getAllPages()){
            System.out.println(page.id());
        }

    }
}


Trace Stack:
"C:\Program Files\Java\jdk1.8.0_101\bin\java" -Didea.launcher.port=7533 
"-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 
Community Edition 2016.2.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\charsets.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\deploy.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\ext\access-bridge-64.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\ext\cldrdata.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\ext\dnsns.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\ext\jaccess.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\ext\jfxrt.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\ext\localedata.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\ext\nashorn.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\ext\sunec.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\ext\sunjce_provider.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\ext\sunmscapi.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\ext\sunpkcs11.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\ext\zipfs.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\javaws.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\jce.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\jfr.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\jfxswt.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\jsse.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\management-agent.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\plugin.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\resources.jar;C:\Program 
Files\Java\jdk1.8.0_101\jre\lib\rt.jar;C:\Users\607819425\Documents\InteliJ 
Projects\untitled\out\production\untitled;C:\Users\607819425\Documents\InteliJ 
Projects\untitled\aXMLRPC-1.8.0.jar;C:\Users\607819425\Documents\InteliJ 
Projects\untitled\dokujclient-3.9.0.jar;C:\Program Files 
(x86)\JetBrains\IntelliJ IDEA Community Edition 2016.2.2\lib\idea_rt.jar" 
com.intellij.rt.execution.application.AppMain com.company.Main
Pages in the wiki Polaris University are:
Sep 07, 2016 11:00:18 AM dw.xmlrpc.CoreClient genericQuery
INFO: Caught exception when executing action wiki.getAllPages: 
de.timroes.axmlrpc.XMLRPCException: Error getting result from server.
Exception in thread "main" dw.xmlrpc.exception.DokuUnknownException: 
de.timroes.axmlrpc.XMLRPCException: Error getting result from server.
        at dw.xmlrpc.ExceptionConverter.Convert(ExceptionConverter.java:105)
        at dw.xmlrpc.CoreClient.genericQuery(CoreClient.java:49)
        at dw.xmlrpc.CoreClient.genericQuery(CoreClient.java:34)
        at dw.xmlrpc.DokuJClient.genericQuery(DokuJClient.java:680)
        at dw.xmlrpc.DokuJClient.getAllPages(DokuJClient.java:549)
        at com.company.Main.main(Main.java:14)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: de.timroes.axmlrpc.XMLRPCException: Error getting result from server.
        at de.timroes.axmlrpc.ResponseParser.parse(ResponseParser.java:73)
        at de.timroes.axmlrpc.XMLRPCClient$Caller.call(XMLRPCClient.java:738)
        at de.timroes.axmlrpc.XMLRPCClient.call(XMLRPCClient.java:455)
        at dw.xmlrpc.CoreClient.genericQuery(CoreClient.java:43)
        ... 9 more
Caused by: de.timroes.axmlrpc.XMLRPCException: Unable to parse given date.
        at 
de.timroes.axmlrpc.serializer.DateTimeSerializer.deserialize(DateTimeSerializer.java:23)
        at 
de.timroes.axmlrpc.serializer.SerializerHandler.deserialize(SerializerHandler.java:157)
        at 
de.timroes.axmlrpc.serializer.StructSerializer.deserialize(StructSerializer.java:65)
        at 
de.timroes.axmlrpc.serializer.SerializerHandler.deserialize(SerializerHandler.java:157)
        at 
de.timroes.axmlrpc.serializer.ArraySerializer.deserialize(ArraySerializer.java:48)
        at 
de.timroes.axmlrpc.serializer.SerializerHandler.deserialize(SerializerHandler.java:157)
        at 
de.timroes.axmlrpc.ResponseParser.getReturnValueFromElement(ResponseParser.java:92)
        at de.timroes.axmlrpc.ResponseParser.parse(ResponseParser.java:55)
        ... 12 more
Caused by: java.text.ParseException: Unparseable date: 
"2016-07-19T14:34:28+0000"
        at java.text.DateFormat.parse(DateFormat.java:366)
        at 
de.timroes.axmlrpc.serializer.DateTimeSerializer.deserialize(DateTimeSerializer.java:21)
        ... 19 more

Process finished with exit code 1

Kind Regards
Nathan English

-----Original Message-----
From: dokujclient-bounce@xxxxxxxxxxxxx 
[mailto:dokujclient-bounce@xxxxxxxxxxxxx] On Behalf Of Guillaume Turri
Sent: 07 September 2016 10:53
To: dokujclient@xxxxxxxxxxxxx
Subject: [dokujclient] Re: Caught exception when executing action 
wiki.getAllPages: de.timroes.axmlrpc.XMLRPCException: Error getting result from 
server.

Hi,
2016-09-07 10:28 GMT+02:00 English,N,Nathan,TAG7 R <nathan.english@xxxxxx>:

Hi There,
I am currently trying to implement the client into a Java project, 
however when I use the getAllPages command I eventually get Caused by:
java.text.ParseException: Unparseable date: "2016-07-19T14:34:28+0000" 
and was wondering if the was anything that I could do to get around this?


I think you're using an old version of dokujclient -probably older than
3.4.0- and a recent version of Dokuwiki (Detritus) In the latest version of 
dokujclient, this issue is fixed.

Regards,
Guillaume



--
To unsubscribe go to https://www.freelists.org/list/dokujclient
Archives: http://www.freelists.org/archive/dokujclient

--
To unsubscribe go to https://www.freelists.org/list/dokujclient
Archives: http://www.freelists.org/archive/dokujclient

Other related posts: