[
https://issues.apache.org/jira/browse/FELIX-6096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16819050#comment-16819050
]
Christoph Fiehe commented on FELIX-6096:
----------------------------------------
It is difficult to setup the test environment once again. What I can tell you
right now is that the class {{BasicPermission}} is not available in the JRE.
That causes a {{ClassNotFoundException}} when the {{ConfigurationPermission}}
gets loaded.
I have a similar issue under Android, which also has limited support of Java
security. Fortunately, the issue is much easier to reproduce. I have tested the
code modification under both environments and the issue was solved. This is the
corresponding stack trace using SCR under Android:
{{java.lang.NullPointerException: Attempt to invoke virtual method 'int
java.lang.String.indexOf(int)' on a null object reference}}
{{ at
org.osgi.service.cm.ConfigurationPermission.parseSubstring(ConfigurationPermission.java:242)}}
{{ at
org.osgi.service.cm.ConfigurationPermission.setTransients(ConfigurationPermission.java:128)}}
{{ at
org.osgi.service.cm.ConfigurationPermission.<init>(ConfigurationPermission.java:115)}}
{{ at
org.osgi.service.cm.ConfigurationPermission.<init>(ConfigurationPermission.java:104)}}
{{ at
org.apache.felix.scr.impl.manager.RegionConfigurationSupport.checkBundleLocation(RegionConfigurationSupport.java:639)}}
{{ at
org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:306)}}
{{ at
org.apache.felix.scr.impl.manager.RegionConfigurationSupport$2.configurationEvent(RegionConfigurationSupport.java:118)}}
{{ at
org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1704)}}
{{ at
org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1646)}}
{{ at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138)}}
{{ at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105)}}
{{ at java.lang.Thread.run(Thread.java:764)}}
> SCR fails if the Java Runtime Environment does not support permissions
> ----------------------------------------------------------------------
>
> Key: FELIX-6096
> URL: https://issues.apache.org/jira/browse/FELIX-6096
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR)
> Affects Versions: scr-2.1.16
> Reporter: Christoph Fiehe
> Priority: Major
>
> SCR fails with a ClassNotFoundException, if the Java Runtime Environment does
> not support permissions.
> In the method {{checkBundleLocation(String configBundleLocation, Bundle
> bundle)}} of the class {{RegionConfigurationSupport}} there must be checked,
> if security is supported by the underlying JRE like it is has been done in
> {{AbstractComponentManager#hasServiceRegistrationPermissions}} or
> {{DependencyManager#hasGetPermission}}.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)