Look in the jboss.properties file in the conf directory. Comment
out the "java.rmi.server.hostname=localhost" line. Restart the server.
Make sure the jndi.properties on the client has the correct hostname for
the server, if you're using jndi.properties instead of hardcoding or using
command-line parameters.
Aaron
On Tue, 19 Sep 2000, dimiter wrote:
> I have a JBoss2 on my local server/Windows NT 4 SP4/ with a IP
> 192.168.1.1./hl.hl.bg/
> I want to execute InterestClient from my own computer, and I get
> the exception:
> Got context
> javax.naming.CommunicationException [Root exception is
> java.rmi.ConnectException: Connection refused to host: localhost;
> nested exception is:
> java.net.ConnectException: Connection refused: no further
> information]
>
> Here is the source:
>
> System.setProperty("java.naming.factory.initial",
> "org.jnp.interfaces.NamingContextFactory");
> System.setProperty("java.naming.provider.url",
> "192.168.1.1:1099");
>
> // Enclosing the whole process in a single `try' block is not an
> ideal way
> // to do exception handling, but I don't want to clutter the
> program up
> // with catch blocks
> try
> {
> // Get a naming context
> InitialContext jndiContext = new InitialContext();
> System.out.println("Got context");
>
> // Get a reference to the Interest Bean
> Object ref = jndiContext.lookup("interest/Interest");
> System.out.println("Got reference");
>
> I'm a new user of JBoss and I don't know what o do now!
>
> Dimiter Bakardjiev
> Please somebody help me!!!
>
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
>
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]