From owner-freebsd-java Mon Jul 2 17:52: 3 2001 Delivered-To: freebsd-java@freebsd.org Received: from probity.mcc.ac.uk (probity.mcc.ac.uk [130.88.200.94]) by hub.freebsd.org (Postfix) with ESMTP id AA80437B403 for ; Mon, 2 Jul 2001 17:51:58 -0700 (PDT) (envelope-from jcm@freebsd-uk.eu.org) Received: from dogma.freebsd-uk.eu.org ([130.88.200.97] ident=root) by probity.mcc.ac.uk with esmtp (Exim 2.05 #7) id 15HEQ1-000HcG-00 for freebsd-java@freebsd.org; Tue, 3 Jul 2001 01:51:57 +0100 Received: (from jcm@localhost) by dogma.freebsd-uk.eu.org (8.11.3/8.11.1) id f630pv827074 for freebsd-java@freebsd.org; Tue, 3 Jul 2001 01:51:57 +0100 (BST) (envelope-from jcm) Date: Tue, 3 Jul 2001 01:51:57 +0100 From: j mckitrick To: freebsd-java@freebsd.org Subject: argh!! Can't get bind/rmi to work.... Message-ID: <20010703015156.A27017@dogma.freebsd-uk.eu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="nFreZHaLTZJo0R7j" X-Mailer: Mutt 1.0.1i 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 --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=us-ascii 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. --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="BindTest.java" /* 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(); } } } --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="Compute.java" /* jonathon mckitrick */ package compute; import java.rmi.Remote; import java.rmi.RemoteException; public interface Compute extends Remote { Object executeTask() throws RemoteException; } --nFreZHaLTZJo0R7j-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message