You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Aaron Davies <aa...@gmail.com> on 2006/06/14 18:52:01 UTC

RMI Security Manager Issue

Hi, I'm having trouble using an ant task to run a Java app that uses
RMI. I've constructed a Java task to run it, but it fails with a
java.security.AccessControlException as soon as it starts the RMI
section. However, when I take a look at the output of ant -verbose and
reconstruct the java command being used (this task has "fork" set to
true), the app runs just fine. I've tried checking my
java.security.policy file (an "allpermissions" one) and passing it to
the ant jvm as well, but it doesn't help. Any ideas?
-- 
Aaron Davies
aaron.davies@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: RMI Security Manager Issue

Posted by Aaron Davies <aa...@gmail.com>.
On 6/15/06, Steve Loughran <st...@apache.org> wrote:

> Aaron Davies wrote:
>
> > Hi, I'm having trouble using an ant task to run a Java app that uses
> > RMI. I've constructed a Java task to run it, but it fails with a
> > java.security.AccessControlException as soon as it starts the RMI
> > section. However, when I take a look at the output of ant -verbose and
> > reconstruct the java command being used (this task has "fork" set to
> > true), the app runs just fine. I've tried checking my
> > java.security.policy file (an "allpermissions" one) and passing it to
> > the ant jvm as well, but it doesn't help. Any ideas?
>
> We run lots of RMI stuff from ant (forked); no problems show up. When
> ant forks it really creates a new JVM, so existing JVM stuff does not
> surface.
>
> So there is something else going on here, but nothing obvious springs to
> mind.
>
> what is the stack trace?

I figured it out; I was passing a pre-constructed argument list to the
jvm as a value attribute, not a line, so it was getting read as one
meaningless arg. It's working fine now. Thanks anyway!
-- 
Aaron Davies
aaron.davies@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: RMI Security Manager Issue

Posted by Steve Loughran <st...@apache.org>.
Aaron Davies wrote:
> Hi, I'm having trouble using an ant task to run a Java app that uses
> RMI. I've constructed a Java task to run it, but it fails with a
> java.security.AccessControlException as soon as it starts the RMI
> section. However, when I take a look at the output of ant -verbose and
> reconstruct the java command being used (this task has "fork" set to
> true), the app runs just fine. I've tried checking my
> java.security.policy file (an "allpermissions" one) and passing it to
> the ant jvm as well, but it doesn't help. Any ideas?

We run lots of RMI stuff from ant (forked); no problems show up. When 
ant forks it really creates a new JVM, so existing JVM stuff does not 
surface.

So there is something else going on here, but nothing obvious springs to 
mind.

what is the stack trace?

-steve

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org