felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Pauls (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-5204) IllegalStateException when using custom URL handlers for bundles
Date Wed, 02 Mar 2016 13:22:18 GMT

    [ https://issues.apache.org/jira/browse/FELIX-5204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15175573#comment-15175573

Karl Pauls commented on FELIX-5204:

I'm not sure I completely understand what is going on just yet. There was some reason we did
the protection domain code source the way it is. It's certainly possible that there is a bug
somewhere which causes this issue but I'm not sure just using the jar url from the filesystem
is the correct fix... Could you describe the problem in a little more depth?

> IllegalStateException when using custom URL handlers for bundles
> ----------------------------------------------------------------
>                 Key: FELIX-5204
>                 URL: https://issues.apache.org/jira/browse/FELIX-5204
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-5.4.0
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>             Fix For: framework-5.6.0
> The following exception can happen after having restarted the whole framework.
> {code}
> java.lang.IllegalStateException: Stream handler unavailable.
> 	at org.apache.felix.framework.URLHandlersStreamHandlerProxy.getDefaultPort(URLHandlersStreamHandlerProxy.java:180)
> 	at java.net.URLStreamHandler.sameFile(URLStreamHandler.java:407)
> 	at org.osgi.service.url.AbstractURLStreamHandlerService.sameFile(AbstractURLStreamHandlerService.java:131)
> 	at java.net.URLStreamHandler.equals(URLStreamHandler.java:333)
> 	at org.osgi.service.url.AbstractURLStreamHandlerService.equals(AbstractURLStreamHandlerService.java:81)
> 	at org.apache.felix.framework.URLHandlersStreamHandlerProxy.equals(URLHandlersStreamHandlerProxy.java:163)
> 	at java.net.URL.equals(URL.java:870)
> 	at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:940)
> 	at javax.crypto.JceSecurityManager.getCryptoPermission(JceSecurityManager.java:124)
> 	at javax.crypto.Cipher.getConfiguredPermission(Cipher.java:2587)
> 	at javax.crypto.Cipher.initCryptoPermission(Cipher.java:700)
> 	at javax.crypto.Cipher.chooseProvider(Cipher.java:863)
> 	at javax.crypto.Cipher.init(Cipher.java:1396)
> 	at javax.crypto.Cipher.init(Cipher.java:1327)
> 	at org.apache.sshd.common.cipher.BaseCipher.init(BaseCipher.java:60)
> 	at org.apache.karaf.shell.ssh.SshUtils.buildCiphers(SshUtils.java:89)
> 	at org.apache.karaf.shell.ssh.Activator.createSshServer(Activator.java:183)
> 	at org.apache.karaf.shell.ssh.Activator.doStart(Activator.java:111)
> 	at org.apache.karaf.util.tracker.BaseActivator.run(BaseActivator.java:233)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)
> {code}
> The problems seems to be that the ProtectionDomain of the classes loaded from bundles
do use the URL handler as their code source.  This means that any access to those URL will
throw IllegalStateException after the framework has been shutdown.
> The protection domain should use the url the jar from the filesystem for the code source
url instead.

This message was sent by Atlassian JIRA

View raw message