Skip to content

java.net.UnknownHostException when opening a URL connection on Debian Linux #255

@processing-bugs

Description

@processing-bugs

Original author: [email protected] (June 07, 2010 01:18:06)

This bug automatically added from:
http://dev.processing.org/bugs/show_bug.cgi?id=1410

Comment from stopfocus, 2009-12-14 18:55

Hello,
Using 64-bit debian sarge version 2.22.3when ever I attempt to
call anything from the internet I recieve the error bellow. This does not
happen to me when on other platforms and also if I turn the sketch into an
application it will successfully connect to an internet web site.

This was the piece of code that gives me a problem and the program itself
is from Ben Fry's book
Visualizing Information
void updateTable( ) {
dataTable = new Table("http://benfry.com/writing/map/random.cgi");
}

java.net.UnknownHostException: benfry.com
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:860)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:801)
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1049)
at java.net.URL.openStream(URL.java:1010)
at processing.core.PApplet.createInputRaw(PApplet.java:4062)
at processing.core.PApplet.createInput(PApplet.java:4031)
at processing.core.PApplet.loadStrings(PApplet.java:4262)
at book$Table.(book.java:143)
at book.updateTable(book.java:120)
at book.keyPressed(book.java:115)
at processing.core.PApplet.handleKeyEvent(PApplet.java:1752)
at processing.core.PApplet.dequeueKeyEvents(PApplet.java:1735)
at processing.core.PApplet.handleDraw(PApplet.java:1437)
at processing.core.PApplet.run(PApplet.java:1327)
at java.lang.Thread.run(Thread.java:619)
The file "http://benfry.com/writing/map/random.cgi" is missing or
inaccessible, make sure the URL is valid or that the file has been added to
your sketch and is readable.
Exception in thread "Animation Thread" java.lang.NullPointerException
at book$Table.(book.java:144)
at book.updateTable(book.java:120)
at book.keyPressed(book.java:115)
at processing.core.PApplet.handleKeyEvent(PApplet.java:1752)
at processing.core.PApplet.dequeueKeyEvents(PApplet.java:1735)
at processing.core.PApplet.handleDraw(PApplet.java:1437)
at processing.core.PApplet.run(PApplet.java:1327)
at java.lang.Thread.run(Thread.java:619)

Original issue: http://code.google.com/p/processing/issues/detail?id=216

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions