From owner-freebsd-java Mon Jul 2 18:33:42 2001 Delivered-To: freebsd-java@freebsd.org Received: from crewsoft.com (ns.aenet.net [157.22.214.1]) by hub.freebsd.org (Postfix) with ESMTP id E0AD337B401 for ; Mon, 2 Jul 2001 18:33:36 -0700 (PDT) (envelope-from cedric@wireless-networks.com) Received: from [63.206.193.57] (account cberger@wireless-networks.com HELO wireless-networks.com) by crewsoft.com (CommuniGate Pro SMTP 3.4.7) with ESMTP id 757181; Mon, 02 Jul 2001 18:37:02 -0700 Message-ID: <3B4121FD.5080002@wireless-networks.com> Date: Mon, 02 Jul 2001 18:38:05 -0700 From: Cedric Berger User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010628 X-Accept-Language: en-us MIME-Version: 1.0 To: j mckitrick Cc: freebsd-java@freebsd.org Subject: Re: argh!! Can't get bind/rmi to work.... References: <20010703015156.A27017@dogma.freebsd-uk.eu.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Looks like some sort of DNS issue, right? is BindTest a valid hostname on your system? I doubt it. Try replacing: String name = "//BindTest"; by tring name = "//localhost/BindTest"; Cedric j mckitrick wrote: >Sorry in advance this isn't BSD specific, but i am frustrated to no end. I >had a simple RMI program that binds to a port. It works under 1.1, but not >1.2. Could someone tell me why not? It trips up on the Naming.rebind() >call. I fussed with my securiy policy (finally have it working) and the url >format (complained it was malformed). I am trying to connect to localhost. >I have rmiregistry running. > >I whittle it down to only needing 2 small files. Please help if you can, >i'm beating my head against a wall. > >Here is the error message: > >local:~/src/engine> java BindTest >BindTest exception: Unknown host: BindTest; nested exception is: > java.net.UnknownHostException: BindTest >java.rmi.UnknownHostException: Unknown host: BindTest; nested exception is: > java.net.UnknownHostException: BindTest > >java.net.UnknownHostException: BindTest > at java.net.InetAddress.getAllByName0(InetAddress.java:577) > at java.net.InetAddress.getAllByName0(InetAddress.java:546) > at java.net.InetAddress.getByName(InetAddress.java:455) > at java.net.Socket.(Socket.java:98) > at >sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:29) > at >sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:124) > at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:497) > at >sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:194) > at >sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:178) > at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322) > at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source) > at java.rmi.Naming.rebind(Naming.java:165) > at BindTest.main(BindTest.java:30) > > > >Jonathon >-- >Microsoft complaining about the source license used by >Linux is like the event horizon calling the kettle black. > > >------------------------------------------------------------------------ > >/* jonathon mckitrick */ > >import java.rmi.*; >import java.rmi.server.*; >import compute.*; > >public class BindTest extends UnicastRemoteObject > implements Compute >{ > public BindTest() throws RemoteException > { > super(); > } > > public Object executeTask() > { > return null; > } > > public static void main(String[] args) > { > System.getSecurityManager(); >// if (System.getSecurityManager() == null) >// System.setSecurityManager(new RMISecurityManager()); > > String name = "//BindTest"; > try > { > Compute engine = new BindTest(); > Naming.rebind(name, engine); > System.out.println("BindTest bound"); > } catch (Exception e) > { > System.err.println("BindTest exception: " + e.getMessage()); > e.printStackTrace(); > } > } >} > > >------------------------------------------------------------------------ > >/* jonathon mckitrick */ > >package compute; > >import java.rmi.Remote; >import java.rmi.RemoteException; > >public interface Compute extends Remote >{ > Object executeTask() throws RemoteException; >} > > BindTest.java > > Content-Type: > > text/plain > > > ------------------------------------------------------------------------ > Compute.java > > Content-Type: > > text/plain > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message