Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » UnknownHostException when profiling URL.openStream()
UnknownHostException when profiling URL.openStream() [message #105450] Wed, 18 July 2007 07:45 Go to next message
Philipp Tiedt is currently offline Philipp TiedtFriend
Messages: 52
Registered: July 2009
Member
Hi,

I just ran into an UnknownHostException when profiling a little piece of
code that does nothing more than

try {
URL url = new URL("http://www.eclipse.org");
url.openStream();
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

Running the code without profiling would work. However profiling it throws
the exception saying www.eclipse.org is an unknown host.

Eclipse Europa + TPTP Java 1.5 WinXP

Any Ideas ?
Philipp
Re: UnknownHostException when profiling URL.openStream() [message #105687 is a reply to message #105450] Thu, 19 July 2007 06:56 Go to previous messageGo to next message
Asaf Yaffe is currently offline Asaf YaffeFriend
Messages: 333
Registered: July 2009
Senior Member
Philipp Tiedt wrote:
> Hi,
>
> I just ran into an UnknownHostException when profiling a little piece of
> code that does nothing more than
> try {
> URL url = new URL("http://www.eclipse.org");
> url.openStream();
> } catch (MalformedURLException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> } catch (IOException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
>
> Running the code without profiling would work. However profiling it
> throws the exception saying www.eclipse.org is an unknown host.
>
> Eclipse Europa + TPTP Java 1.5 WinXP
>
> Any Ideas ?
> Philipp
>

Philipp,

This seems like an environment configuration problem. If you are behind
a Firewall or a Proxy server, it is likely that the Java environment
used by Eclipse is configured to pass the Proxy/Firewall while the
environment used by the Profiler (actually, the Agent Controller) is not
properly configured.

Here's an example, if you are behind a proxy server, adding the
following command line options to the VM argument will resolve the
problem (replace the mock up values with real ones):

-Dhttp.proxyHost=proxy.mycompany.com -Dhttp.proxyPort=8080

HTH,
Asaf

--
Asaf Yaffe
Eclipse TPTP Committer, JVMTI Profiler
Re: UnknownHostException when profiling URL.openStream() [message #105729 is a reply to message #105687] Thu, 19 July 2007 10:51 Go to previous message
Philipp Tiedt is currently offline Philipp TiedtFriend
Messages: 52
Registered: July 2009
Member
Thx Asaf,

works !!
Previous Topic:Profiling Jboss 4.0.3SP1 with TPTP 4.4 from europe build
Next Topic:Newbie: AGR hangs
Goto Forum:
  


Current Time: Fri Apr 19 16:23:47 GMT 2024

Powered by FUDForum. Page generated in 0.02011 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top