java.lang.NoSuchMethodError: com.google.common.io.Closeables.closeQuietly

1999 views
Skip to first unread message

Danilo Câmara

unread,
Sep 10, 2014, 7:29:58 PM9/10/14
to jfreesan...@googlegroups.com
This is my first experience with saned daemon and also with jfreesane.

When I try to close a SaneSession I get an exception in my java application and my daemon closes.

Consider this code:
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;

import au.com.southsky.jfreesane.SaneSession;

public class Test {

   
public static void main(String[] args) throws UnknownHostException, IOException {
       
SaneSession session = SaneSession.withRemoteSane(InetAddress.getByName("::1"));
        session
.close();
   
}
}

This is the command line execution:
$ java -cp lib/jfreesane-0.91.jar:lib/guava-18.0.jar:bin Test
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.io.Closeables.closeQuietly(Ljava/io/Closeable;)V
    at au
.com.southsky.jfreesane.SaneSession.close(SaneSession.java:133)
    at
Test.main(Test.java:11)
ABRT problem creation
: 'success'

This is the saned daemon output:
$ saned -d255
[saned] main: starting debug mode (level 255)
[saned] read_config: searching for config file
[saned] read_config: done reading config
[saned] saned (AF-indep+IPv6) from sane-backends 1.0.24 starting up
[saned] do_bindings: trying to get port for service "sane-port" (getaddrinfo)
[saned] do_bindings: [1] socket () using IPv6
[saned] do_bindings: [1] setsockopt ()
[saned] do_bindings: [1] bind () to port 6566
[saned] do_bindings: [1] listen ()
[saned] do_bindings: [0] socket () using IPv4
[saned] do_bindings: [0] setsockopt ()
[saned] do_bindings: [0] bind () to port 6566
[saned] do_bindings: [0] bind failed: Address already in use
[saned] run_standalone: waiting for control connection
[saned] handle_connection: processing client connection
[saned] check_host: access by remote host: ::1
[saned] check_host: remote host is IN6_LOOPBACK: access granted
[saned] init: access granted
[saned] init: access granted to danilo@::1
[saned] process_request: waiting for request
[saned] process_request: got request 10
[saned] bailing out, waiting for children...
[saned] bail_out: all children exited

I've tried to compile au.com.southsky.jfreesane.SaneSessionTest but I got many compilation errors of:
The method closeQuietly(InputStream) in the type Closeables is not applicable for the arguments (SaneDevice)

and one of:
The method closeQuietly(InputStream) in the type Closeables is not applicable for the arguments (FileOutputStream)

My system is Fedora 20, java-1.7.0-openjdk-1.7.0.65-2.5.1.3.fc20.x86_64, sane-backends-1.0.24-7.fc20.x86_64

Thanks

James Ring

unread,
Sep 10, 2014, 7:35:33 PM9/10/14
to dfca...@gmail.com, jfreesane-discuss
Looks like jfreesane doesn't compile with guava after version 15. I'll
file an issue and fix it soon, can you try using guava v15 for now?

Thanks for getting in touch!

Regards,
James
> --
> You received this message because you are subscribed to the Google Groups
> "jfreesane-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jfreesane-disc...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

James Ring

unread,
Sep 10, 2014, 7:36:27 PM9/10/14
to dfca...@gmail.com, jfreesane-discuss

Danilo Câmara

unread,
Sep 10, 2014, 7:56:33 PM9/10/14
to jfreesan...@googlegroups.com, dfca...@gmail.com
Guava v15 is OK. I've tried with v17, then v16, then looked at GWT versions and gave up :-D

Thanks
Reply all
Reply to author
Forward
0 new messages