JohannesBuchner/Jarsync — Issue #1: NullPointerException in org.metastatic.rsync.v2.MultiplexedInputStream.read() method
Author: sam42fr
Created: 2012-01-30 11:02:10+00:00
State: open

Hi,

I'm very interested in using your library to make rsync calls from an applet but I'm facing a NullPointerException.
Here's the complete log :

jarsync: starting socket client to percom1.perinfo.com:873
[main] [DEBUG] rsync.v2.startSocketClient:293 - starting socket client to percom1.perinfo.com:873
jarsync: socket=Socket[addr=percom1.perinfo.com/192.168.151.1,port=873,localport=63221]
[main] [DEBUG] rsync.v2.startSocketClient:305 - socket=Socket[addr=percom1.perinfo.com/192.168.151.1,port=873,localport=63221]
jarsync: got greeting @RSYNCD: 28
[main] [DEBUG] rsync.v2.setupSocket:613 - got greeting @RSYNCD: 28
jarsync: server_argv=[--server, --sender, -vvrcz, --delete, .]
[main] [DEBUG] rsync.v2.serverArgs:857 - server_argv=[--server, --sender, -vvrcz, --delete, .]
jarsync: requesting module 'g4atscaf'
[main] [DEBUG] rsync.v2.setupSocket:639 - requesting module 'g4atscaf'
jarsync: checksum seed=9676264f
[main] [DEBUG] rsync.v2.clientRun:438 - checksum seed=9676264f
jarsync: writing int=0 00000000
[main] [DEBUG] v2.MultiplexedInputStream.writeInt:215 - writing int=0 00000000
jarsync: recieveFileEntry flags=1 l1=0 l2=1
[main] [DEBUG] v2.FileList.receiveFileEntry:243 - recieveFileEntry flags=1 l1=0 l2=1
jarsync: lastname=
[main] [DEBUG] v2.FileList.receiveFileEntry:244 - lastname=
jarsync: thisname=.
[main] [DEBUG] v2.FileList.receiveFileEntry:249 - thisname=.
Exception in thread "main" java.lang.NullPointerException
at org.metastatic.rsync.v2.MultiplexedInputStream.read(MultiplexedInputStream.java:140)
at org.metastatic.rsync.v2.FileList.receiveFileEntry(FileList.java:297)
at org.metastatic.rsync.v2.FileList.receiveFileList(FileList.java:106)
at org.metastatic.rsync.v2.Client.clientRun(Client.java:480)
at org.metastatic.rsync.v2.Client.startSocketClient(Client.java:326)
at org.metastatic.rsync.v2.Client.startClient(Client.java:168)
at org.metastatic.rsync.v2.Client.main(Client.java:595)
at TestClient.main(TestClient.java:28)

I call the main method of the Client class by passing those parameters :

protected static String[] defaultParams = {
"--exclude","*.elf",
"-c",
"-v",
"-z",
"--exclude","*.xml",
"--exclude","*.bat",
"--exclude",".svn",
"--exclude","unins*",
"--exclude","rsync.exe",
"--exclude","cygwin1.dll",
"--delete",
"--stats",
"--recursive",
"rsync://percom1.perinfo.com/g4atscaf/",
"e:\\tmp\\rsync"
};

I'm not very familiar with the rsync protocole so I don't understand exactly what is done to retrieve the files list but it seems it tries to get a file named "." and it does't work ... I have read the buffer and it contains file names I want and also bytes between them.

Are you still maintaining this project ? I'm ready to participate but I need some keys.

thanks,
Samuel