Maybe a RMISecurityManager is not being created?

On Oct 6, 2009, at 141PM, Tom hobbs wrote:

Sort of solved...

Life just gets more weird. Which I suppose makes it interesting. I'm currently laying the blame for this on Eclipse Galileo.

As mentioned, when run in Eclipse the code seems to hang on the line;

        lookupLoactor.getRegistrar();

Eclipse thinks that the process is still running (at least that's what it tells me) but nothing happens and there's no output in any log that I can find.

netstat claims that the right sockets are open;

e.g.
tcp 0 0 :::4160 :::* LISTEN tcp 0 0 :::8080 :::* LISTEN

However, dropping to the command line and executing the same Java it all works as expected.

Eclipse isn't missing a policy file, that was the first thing I checked. So I'm at a loss to explain what is different in the IDE compared to what's different on the command line.

Thanks to Gregg for writing enough pointers down to give me the idea of trying it somewhere else.

Gah! This has cost me at least 2 months of motivation to working on those tutorials! I knew I should never have the left the safety of the command line and vi.

Just what is Eclipse doing and how do I find out?

Cheers,

Tom



On Mon, 05 Oct 2009 15:08:11 -0000, Gregg Wonderly <[email protected]> wrote:

Hi Tom, the things that I can think of to look at are the following.

1. What's the IP address and hostname of the machine? Does /etc/ hosts provide conflicting information regarding what hostname is what address, compared to what you expect?

2. How many ip interfaces are actually active. Is there just one? Do you have configuration in place to select the appropriate interface if there are multiple active and you expect them to be active?

3. Where is stdout and stderr directed? Are there VM level NoClassDefFoundError or other Throwables happening which you can no see and that could keep all logging from happening because the code never gets there?

4. Run the JVM with -verbose to see what classloading activity is occuring, and that the appropriate sources of classes are being used (you are overriding the ext dir, does that remove something that you need for example).

5. What does 'netstat -an | grep LISTEN' show you? Are there appropriate sockets listening on the appropriate ports?

Gregg Wonderly

Tom hobbs wrote:
Hi all,
Okay, let's just assume that I'm already highly embarrassed about asking this question, but there's only so much banging my head against a wall that I can do. (And I've so far had, on and off, months of this particular wall!)
I'm currently suffering from a problem not disimilar to this one;
http://www.nabble.com/Strange-behavior-of-remote-Linux-Registrar-td13244997.html With the exception that I have only one machine, an Arch Linux laptop, and I can't even grab a ServiceRegistrar.
Here's the detail;
The problem first came up a few months ago when I was writing a tutorial for Jeremy. I can start a reggie which looks like it has come up properly. But then looking up that reggie fails. When using my own script I get "reggie.jar requested from localhost:50504" and similar lines in the HTTPD log. When using the river httpd.sh script, I don't get that kind of output. I've tried explicitly starting rmid (and also leaving it alone) all to no avail.
Here's the simple lookup code I'm using;
LookupLocator lookupLoactor = new LookupLocator("jini://localhost ");
   ServiceRegistrar serviceRegistrar = lookupLoactor.getRegistrar();
but the call to getRegistrar() never returns. Even when I supply a timeout to the overloaded method, it never returns. I don't get any kind of error message/stack trace out of the above code.
Here's the output from running reggie script;
$ ./scripts/jrmp-reggie.sh
+ java -Djava.security.policy=config/policy.all - Djava.ext.dirs=../../lib-ext/ -jar ../../lib/start.jar config/ start-reggie.config
05-Oct-2009 14:34:34 com.sun.jini.reggie.RegistrarImpl init
INFO: started Reggie: 2b673dfb-726b-4bcb-b9b1-aaeb174d7477, [nonsecure.hello.example.jini.sun.com], jini://localhost/
Here's the HTTPD output;
$ ./scripts/httpd.sh
+ java -jar ../../lib/classserver.jar -port 8080 -dir lib:../../ lib-dl
05-Oct-2009 14:33:08 com.sun.jini.tool.ClassServer run
INFO: ClassServer started [[lib/, ../../lib-dl/], port 8080]
The irony of needing some (hopefully, painfully simple) help in order to write a tutorial is not lost on me. Does anyone have any forehead-slapping, "Of course"-exclaiming advice for me?
Thanks,
Tom





--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Reply via email to