Question: I have working **JBoss AS 7 (7.1.1 final)** server on localhost with some queue.

And I want to connect to that queue in a desktop application.

So I wrote something like this:

```
Hashtable env = new Hashtable();
env.put(Context.PROVIDER_URL, "remote://localhost:4447");
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
InitialContext initialContext = new InitialContext(env);
ConnectionFactory connectionFactory = (ConnectionFactory) 
initialContext.lookup("RemoteConnectionFactory"); // <- there is it fail

```

But it results in this exception:

> 
> Exception in thread "main" javax.naming.CommunicationException: Could
>  not obtain connection to any of these urls: remote://localhost:4447
>  and discovery failed with error: javax.naming.CommunicationException:
>  Receive timed out [Root exception is java.net.SocketTimeoutException:
>  Receive timed out] [Root exception is
>  javax.naming.CommunicationException: Failed to connect to server
>  remote:1099 [Root exception is
>  javax.naming.ServiceUnavailableException: Failed to connect to server
>  remote:1099 [Root exception is java.net.UnknownHostException:
>  remote]]]
> 
> 
> 

Of course, I have **jbosscall-client.jar** in class path.

Answer: 
To avoid the ambiguous reference write like this:

```
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();

```
There's also exists a `System.Windows.Forms.HtmlDocument` class.

Try explicitly qualifying your classname instead of using a `using` statement, or rename the class with a `using` statement such as `using HAPDocument = HtmlAgilityPack.HtmlDocument;` (and then use `HAPDocument` instead of `HtmlDocument` in your source code).