jruby-webstart integration: open-uri (actually net/http.rb) causes 
java.security.AccessControlException
-------------------------------------------------------------------------------------------------------

                 Key: JRUBY-1821
                 URL: http://jira.codehaus.org/browse/JRUBY-1821
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.1b2
         Environment: MacOS X 10.4.11, Java 1.5.0_13, JRuby trunk r5405
            Reporter: Stephen Bannasch
            Assignee: Thomas E Enebo


Using net/http via open-uri in signed_jirb.jnlp or jirb.jnlp raises 
*java.security.AccessControlException*.

{code}
 Welcome to the JRuby IRB Console 

trap not supported or not allowed by this VM
irb(main):001:0> require 'open-uri'
=> true
irb(main):002:0>  open("http://www.ruby-lang.org/";) {|f| f.each_line {|line| p 
line} }

NativeException: java.security.AccessControlException: access denied 
(java.net.SocketPermission www.ruby-lang.org resolve)
        from AccessControlContext.java:264:in 
`java.security.AccessControlContext.checkPermission'
        from AccessController.java:427:in 
`java.security.AccessController.checkPermission'
        from SecurityManager.java:532:in 
`java.lang.SecurityManager.checkPermission'
        from SecurityManager.java:1031:in 
`java.lang.SecurityManager.checkConnect'
        from InetAddress.java:1134:in `java.net.InetAddress.getAllByName0'
        from InetAddress.java:1072:in `java.net.InetAddress.getAllByName'
        from InetAddress.java:1008:in `java.net.InetAddress.getAllByName'
        from InetAddress.java:958:in `java.net.InetAddress.getByName'
        from RubyTCPSocket.java:93:in 
`org.jruby.ext.socket.RubyTCPSocket.initialize'
        from null:-1:in 
`org.jruby.ext.socket.RubyTCPSocketInvoker$initialize_Fopt.call'
        from FastInvocationCallback.java:55:in 
`org.jruby.runtime.callback.FastInvocationCallback.execute'
        from SimpleCallbackMethod.java:70:in 
`org.jruby.internal.runtime.methods.SimpleCallbackMethod.call'
        from RubyClass.java:239:in `org.jruby.RubyClass.invoke'
        from RuntimeHelpers.java:347:in 
`org.jruby.javasupport.util.RuntimeHelpers.invoke'
        from RubyObject.java:468:in `org.jruby.RubyObject.callMethod'
        from RubyClass.java:248:in `org.jruby.RubyClass.newInstance'
... 233 levels...
        from 
file:/Users/stephen/Library/Caches/Java/cache/javaws/file/D/P-1/RMjruby-complete-signed.jar!/net/http.rb:560:in
 `open'
        from 
file:/Users/stephen/Library/Caches/Java/cache/javaws/file/D/P-1/RMjruby-complete-signed.jar!/net/http.rb:560:in
 `connect'
        from 
file:/Users/stephen/Library/Caches/Java/cache/javaws/file/D/P-1/RMjruby-complete-signed.jar!/net/http.rb:560:in
 `timeout'
        from 
file:/Users/stephen/Library/Caches/Java/cache/javaws/file/D/P-1/RMjruby-complete-signed.jar!/timeout.rb:78:in
 `timeout'
        from 
file:/Users/stephen/Library/Caches/Java/cache/javaws/file/D/P-1/RMjruby-complete-signed.jar!/net/http.rb:560:in
 `connect'
        from 
file:/Users/stephen/Library/Caches/Java/cache/javaws/file/D/P-1/RMjruby-complete-signed.jar!/net/http.rb:560:in
 `do_start'
        from 
file:/Users/stephen/Library/Caches/Java/cache/javaws/file/D/P-1/RMjruby-complete-signed.jar!/net/http.rb:542:in
 `start'
        from 
file:/Users/stephen/Library/Caches/Java/cache/javaws/file/D/P-1/RMjruby-complete-signed.jar!/open-uri.rb:242:in
 `open_http'
        from 
file:/Users/stephen/Library/Caches/Java/cache/javaws/file/D/P-1/RMjruby-complete-signed.jar!/open-uri.rb:242:in
 `buffer_open'
        from 
file:/Users/stephen/Library/Caches/Java/cache/javaws/file/D/P-1/RMjruby-complete-signed.jar!/open-uri.rb:164:in
 `open_loop'
        from 
file:/Users/stephen/Library/Caches/Java/cache/javaws/file/D/P-1/RMjruby-complete-signed.jar!/open-uri.rb:162:in
 `catch'
        from 
file:/Users/stephen/Library/Caches/Java/cache/javaws/file/D/P-1/RMjruby-complete-signed.jar!/open-uri.rb:162:in
 `open_loop'
        from 
file:/Users/stephen/Library/Caches/Java/cache/javaws/file/D/P-1/RMjruby-complete-signed.jar!/open-uri.rb:162:in
 `open_uri'
        from 
file:/Users/stephen/Library/Caches/Java/cache/javaws/file/D/P-1/RMjruby-complete-signed.jar!/open-uri.rb:528:in
 `open'
        from 
file:/Users/stephen/Library/Caches/Java/cache/javaws/file/D/P-1/RMjruby-complete-signed.jar!/open-uri.rb:30:in
 `open'
        from (irb):1:in `puts'irb(main):005:0> 
{code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to