You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Karl Pauls (JIRA)" <ji...@apache.org> on 2017/12/07 23:25:00 UTC

[jira] [Resolved] (FELIX-5754) error in default.properties contained in jar org.apache.felix.framework-5.6.10.jar

     [ https://issues.apache.org/jira/browse/FELIX-5754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Pauls resolved FELIX-5754.
-------------------------------
    Resolution: Fixed

I removed the continuation in r1817440. [~tom@phinneyridge.com], please try it with the current trunk (i.e., framework-5.7.0-SNAPSHOT) and see if that resolves the issue for you. If so, please close this issue - otherwise, please reopen.

Thanks for reporting!

> error in default.properties contained in jar org.apache.felix.framework-5.6.10.jar
> ----------------------------------------------------------------------------------
>
>                 Key: FELIX-5754
>                 URL: https://issues.apache.org/jira/browse/FELIX-5754
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-5.6.10
>         Environment: android os version 26
>            Reporter: Tom Rutchik
>            Assignee: Karl Pauls
>            Priority: Critical
>             Fix For: framework-5.6.12
>
>
> I'll be describing the issue, explain where the problem occurs and why, and a possible fix that I have verified. 
> The default.properties file contained in jar: org.apache.felix.framework-5.6.10.jar needs the line:
> org.osgi.util..tracker; version=1.5.1 \
> changed to:
> org.osgi.util..tracker; version=1.5.1, \
> (a comma entered after the version number.)
> Without the comma added, the class: org.osgi.framework.Version
> throws an unrecoverable exception when the version is parsed.
> I tracked the issue down and found out that the string value for minor part of the version number which should have been the string "1" was instead having the value "1      #".
> The Interger.parse("1    #") is what's throwing the exception (since the # character is not numeric).  If you look deeper at the default.properties file you see it contains the following:
>  org.osgi.util.tracker; version=1.5.1 \
>  ${jre-${java.specification.version}} \
>  ${jre-${felix.detect.jpms}} \
> #
> # Java platform package export properties.
> I don't know what the ${jre-$  entries are for, but they seem to have been evaluated to the empty string.  So that's how the minor version subpart string gets to be "1     #" instead of "1"
> I repackage the jar with that one change in  place and Felix starts up correctly.
> Note: Another possible solution is to eliminate the continuation character "\" at the end of the
> version since it appears to be last entry.  I just don't understand what the motivation for the {jre-$ entries are so I don't want to claim my solution is necessarily the right solution for all circumstances, since another possible solution would be to eliminate the  continuation character "\" at the end of the line:  "${jre-${felix.detect.jpms}} \" .
> What's makes the issue critical is that the 5.6.10 release will not work on Android without this change, and it's a bit tricky and time consuming to discover the cause.  ( I'm not sure why this isn't an issue for any environment(it might be!), but the strongest claim I can make is that it is an issue in the android environment.
> And lastly just to be clear, the exception is thrown when the Felix object is first created.  Here's
> a snippet of what that code looks like:
>         String apkFileDir = ConsoleActivity.consoleActivity.getFilesDir().toString();
>         config.put("osgi.signature.support.verify", "false"); // signed jar checking disabled for development
>         config.put( .....
>         Felix f = new Felix(config);



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)