Re: help! rmi server constructor throws ExceptionInInitializerError ?? is this an rmi bug ??
Peter Jones - JavaSoft East <[email protected]>
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Message-ID | <20050808213642.GI18765@east> |
I don't think that your original message, which you seem to have excerpted below, actually made it to this list. If you (re?)post the complete stack trace of the ExceptionInInitializerError, along with other relevant information like JDK version, full command lines, etc., we might be able to diagnose the problem. Without knowing any of the above, I would guess that some application class is attempting some operation in its static initializer that requires a permission, but your security policy is not granting it that permission-- thus, the static initializer fails with a SecurityException when there is a security manager, which the VM wraps in an ExceptionInInitializerError when it propagates outside the initializer. As far as whether you should care if there is a security manager-- you should care if there is a possibility of untrusted code running in the virtual machine, or if you intend to dynamically load classes through RMI, which is disabled if there is no security manager set. -- Peter Quoting al joslin <[email protected]>: > Hello all, > > the plot thickens (or thins, depending on your perspective) > > I can now get the server to instantiate -- by commenting out the call to > load the RMISecurityManager > > What does this mean? > > Should I care? > > Certainly my RMI is working now, and it's between machines behind > firewalls, and I can use encrypted parms if I want to be safer... > > Al; > > >> // Create and install a security manager >> if (System.getSecurityManager() == null) { >> >> System.setSecurityManager(new RMISecurityManager()); >> System.out.println(" log: System.setSecurityManager(new >> RMISecurityManager());"); >> } =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff RMI-USERS". For general help, send email to [email protected] and include in the body of the message "help". For a list of frequently asked RMI questions please refer to: http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html To view past RMI-USERS postings, please see: http://archives.java.sun.com/archives/rmi-users.html