You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Christopher BROWN <br...@reflexe.fr> on 2013/09/12 17:56:48 UTC

After installing Java 8 developer preview, Felix 3.2.2 no longer exports "javax.sql"

Hello,

An application using Felix 3.2.2 on MacOS X has started failing with the
following exception:

org.osgi.framework.BundleException: Unresolved constraint in bundle
system.sdk-project [5]: Unable to resolve 5.0: missing requirement [5.0]
package; (package=javax.sql)

The application is started from a shell script that includes the following
(standard) MacOS X command:

/usr/libexec/java_home -d64 -v 1.6+

It's now locating:
/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home

Would I be correct in guessing that Felix 3.2.2 has no explicit support for
JDK8 (would make sense), and that it has no fallback mechanism so that it
can at least export packages from prior Java releases?  As in, now that
there's Java 8, it's not exporting stuff it knew about in Java 6...

What can I do about that to fix it, apart from adding a hard-coded
dependency on Java 6 (which is EOL) or upgrading Felix?

Thanks,
Christopher

Re: After installing Java 8 developer preview, Felix 3.2.2 no longer exports "javax.sql"

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Sorry, I somehow didn't see your previous message.

Modifying default.properties is certainly okay from my perspective.

I didn't mean to imply that merge happened via conf/config.properties 
because it doesn't. However, you can override ...system.packages in 
there. The only way to merge is using ...system.packages.extras, but 
that is not what you want here since you want to supply the complete 
value since Java 8 doesn't exist.

Since you are not using the default Felix framework launcher, you can't 
use conf/config.properties any way, since it is the one that processes 
that, not the framework itself. However, all it does it put the 
properties into the config map passed into the framework, so you could 
have just done that yourself and not modified default.properties at all.

If the config map has a ...system.packages property, it overrides the 
default value.

-> richard

On 9/12/13 17:50 , Christopher BROWN wrote:
> I ended up patching the "default.properties" file in the JAR. Works fine.
>
> Thanks to all!
>   Le 12 sept. 2013 18:46, "Christopher BROWN" <br...@reflexe.fr> a écrit :
>
>> It looks like the list of packages is derived from
>> http://download.java.net/jdk8/docs/api/package-list so I'd need to have a
>> "config.properties" starting with:
>>
>> jre-1.8=, \
>>
>> ..then each subsequent line starting with a space, package name,
>> semicolon, space, and a backslash, and terminating with the "version" line.
>>   With each subsequent line being derived from "package-list", as above. Is
>> that correct?
>>
>> As the application actually uses Felix in embedded mode, I don't have the
>> "conf" directory.  How should I then merge the default properties with the
>> Java 8 properties?  I'm guessing that I can't just
>> clobber Constants.FRAMEWORK_SYSTEMPACKAGES in the HashMap I pass to the
>> Felix constructor (because "default.properties" looks like it contains
>> multiple possible values from which a runtime-dependent property is
>> selected at some point I haven't yet found, and isn't used as-is for that
>> framework property).
>>
>> I would like to avoid rolling my own build of Felix, and would prefer to
>> have some programmatic way where I can process "package-list" (and update
>> that file as JDK8 approaches its final release) -- I can deal with that
>> part -- and either add it to Felix's "default.properties" (when
>> initialising Felix) or just detect JDK8 myself and conditionally override
>> Felix's default behaviour.  I'm guessing that merging is possible, because
>> that's what's implied by your suggestion of using "conf/config.properties"
>> (which I'm assuming Felix merges with "default.properties").  Can I do that
>> somehow, or can I define my own "conf" dir (and if I do, will Felix try to
>> read or write other files there)?
>>
>> Alternatively, if I were to modify the "default.properties" file, I guess
>> I would need to copy the section starting "jre-1.7=, \" up to
>> "version="0.0.0.1_007_JavaSE" (replacing the "7" with "8") and append it
>> after a blank line in the same file (or is there anything else to do... I
>> see that that file contains other "non-jre" sections).  Is that correct?
>>
>> Thanks,
>> Christopher
>>
>>
>> On 12 September 2013 18:14, Richard S. Hall <he...@ungoverned.org> wrote:
>>
>>> On 9/12/13 11:56 , Christopher BROWN wrote:
>>>
>>>> Hello,
>>>>
>>>> An application using Felix 3.2.2 on MacOS X has started failing with the
>>>> following exception:
>>>>
>>>> org.osgi.framework.**BundleException: Unresolved constraint in bundle
>>>> system.sdk-project [5]: Unable to resolve 5.0: missing requirement [5.0]
>>>> package; (package=javax.sql)
>>>>
>>>> The application is started from a shell script that includes the
>>>> following
>>>> (standard) MacOS X command:
>>>>
>>>> /usr/libexec/java_home -d64 -v 1.6+
>>>>
>>>> It's now locating:
>>>> /Library/Java/**JavaVirtualMachines/jdk1.8.0.**jdk/Contents/Home
>>>>
>>>> Would I be correct in guessing that Felix 3.2.2 has no explicit support
>>>> for
>>>> JDK8 (would make sense), and that it has no fallback mechanism so that it
>>>> can at least export packages from prior Java releases?  As in, now that
>>>> there's Java 8, it's not exporting stuff it knew about in Java 6...
>>>>
>>>> What can I do about that to fix it, apart from adding a hard-coded
>>>> dependency on Java 6 (which is EOL) or upgrading Felix?
>>>>
>>> The default.properties file inside the felix.jar contains the packages
>>> that should be exported by the framework for a given Java platform. The
>>> issue is that it doesn't have a property for Java 8 so the framework
>>> doesn't export any JRE packages.
>>>
>>> You can just copy the Java 7 property and use it for Java 8. You can copy
>>> the value from default.properties, but specify it in conf/config.properties
>>> so you don't need to edit the JAR file.
>>>
>>> -> richard
>>>
>>>
>>>> Thanks,
>>>> Christopher
>>>>
>>>>
>>> ------------------------------**------------------------------**---------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@felix.apache.org>
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: After installing Java 8 developer preview, Felix 3.2.2 no longer exports "javax.sql"

Posted by Christopher BROWN <br...@reflexe.fr>.
I ended up patching the "default.properties" file in the JAR. Works fine.

Thanks to all!
 Le 12 sept. 2013 18:46, "Christopher BROWN" <br...@reflexe.fr> a écrit :

> It looks like the list of packages is derived from
> http://download.java.net/jdk8/docs/api/package-list so I'd need to have a
> "config.properties" starting with:
>
> jre-1.8=, \
>
> ..then each subsequent line starting with a space, package name,
> semicolon, space, and a backslash, and terminating with the "version" line.
>  With each subsequent line being derived from "package-list", as above. Is
> that correct?
>
> As the application actually uses Felix in embedded mode, I don't have the
> "conf" directory.  How should I then merge the default properties with the
> Java 8 properties?  I'm guessing that I can't just
> clobber Constants.FRAMEWORK_SYSTEMPACKAGES in the HashMap I pass to the
> Felix constructor (because "default.properties" looks like it contains
> multiple possible values from which a runtime-dependent property is
> selected at some point I haven't yet found, and isn't used as-is for that
> framework property).
>
> I would like to avoid rolling my own build of Felix, and would prefer to
> have some programmatic way where I can process "package-list" (and update
> that file as JDK8 approaches its final release) -- I can deal with that
> part -- and either add it to Felix's "default.properties" (when
> initialising Felix) or just detect JDK8 myself and conditionally override
> Felix's default behaviour.  I'm guessing that merging is possible, because
> that's what's implied by your suggestion of using "conf/config.properties"
> (which I'm assuming Felix merges with "default.properties").  Can I do that
> somehow, or can I define my own "conf" dir (and if I do, will Felix try to
> read or write other files there)?
>
> Alternatively, if I were to modify the "default.properties" file, I guess
> I would need to copy the section starting "jre-1.7=, \" up to
> "version="0.0.0.1_007_JavaSE" (replacing the "7" with "8") and append it
> after a blank line in the same file (or is there anything else to do... I
> see that that file contains other "non-jre" sections).  Is that correct?
>
> Thanks,
> Christopher
>
>
> On 12 September 2013 18:14, Richard S. Hall <he...@ungoverned.org> wrote:
>
>> On 9/12/13 11:56 , Christopher BROWN wrote:
>>
>>> Hello,
>>>
>>> An application using Felix 3.2.2 on MacOS X has started failing with the
>>> following exception:
>>>
>>> org.osgi.framework.**BundleException: Unresolved constraint in bundle
>>> system.sdk-project [5]: Unable to resolve 5.0: missing requirement [5.0]
>>> package; (package=javax.sql)
>>>
>>> The application is started from a shell script that includes the
>>> following
>>> (standard) MacOS X command:
>>>
>>> /usr/libexec/java_home -d64 -v 1.6+
>>>
>>> It's now locating:
>>> /Library/Java/**JavaVirtualMachines/jdk1.8.0.**jdk/Contents/Home
>>>
>>> Would I be correct in guessing that Felix 3.2.2 has no explicit support
>>> for
>>> JDK8 (would make sense), and that it has no fallback mechanism so that it
>>> can at least export packages from prior Java releases?  As in, now that
>>> there's Java 8, it's not exporting stuff it knew about in Java 6...
>>>
>>> What can I do about that to fix it, apart from adding a hard-coded
>>> dependency on Java 6 (which is EOL) or upgrading Felix?
>>>
>>
>> The default.properties file inside the felix.jar contains the packages
>> that should be exported by the framework for a given Java platform. The
>> issue is that it doesn't have a property for Java 8 so the framework
>> doesn't export any JRE packages.
>>
>> You can just copy the Java 7 property and use it for Java 8. You can copy
>> the value from default.properties, but specify it in conf/config.properties
>> so you don't need to edit the JAR file.
>>
>> -> richard
>>
>>
>>> Thanks,
>>> Christopher
>>>
>>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@felix.apache.org>
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>

Re: After installing Java 8 developer preview, Felix 3.2.2 no longer exports "javax.sql"

Posted by Christopher BROWN <br...@reflexe.fr>.
It looks like the list of packages is derived from
http://download.java.net/jdk8/docs/api/package-list so I'd need to have a
"config.properties" starting with:

jre-1.8=, \

..then each subsequent line starting with a space, package name, semicolon,
space, and a backslash, and terminating with the "version" line.  With each
subsequent line being derived from "package-list", as above. Is that
correct?

As the application actually uses Felix in embedded mode, I don't have the
"conf" directory.  How should I then merge the default properties with the
Java 8 properties?  I'm guessing that I can't just
clobber Constants.FRAMEWORK_SYSTEMPACKAGES in the HashMap I pass to the
Felix constructor (because "default.properties" looks like it contains
multiple possible values from which a runtime-dependent property is
selected at some point I haven't yet found, and isn't used as-is for that
framework property).

I would like to avoid rolling my own build of Felix, and would prefer to
have some programmatic way where I can process "package-list" (and update
that file as JDK8 approaches its final release) -- I can deal with that
part -- and either add it to Felix's "default.properties" (when
initialising Felix) or just detect JDK8 myself and conditionally override
Felix's default behaviour.  I'm guessing that merging is possible, because
that's what's implied by your suggestion of using "conf/config.properties"
(which I'm assuming Felix merges with "default.properties").  Can I do that
somehow, or can I define my own "conf" dir (and if I do, will Felix try to
read or write other files there)?

Alternatively, if I were to modify the "default.properties" file, I guess I
would need to copy the section starting "jre-1.7=, \" up to
"version="0.0.0.1_007_JavaSE" (replacing the "7" with "8") and append it
after a blank line in the same file (or is there anything else to do... I
see that that file contains other "non-jre" sections).  Is that correct?

Thanks,
Christopher


On 12 September 2013 18:14, Richard S. Hall <he...@ungoverned.org> wrote:

> On 9/12/13 11:56 , Christopher BROWN wrote:
>
>> Hello,
>>
>> An application using Felix 3.2.2 on MacOS X has started failing with the
>> following exception:
>>
>> org.osgi.framework.**BundleException: Unresolved constraint in bundle
>> system.sdk-project [5]: Unable to resolve 5.0: missing requirement [5.0]
>> package; (package=javax.sql)
>>
>> The application is started from a shell script that includes the following
>> (standard) MacOS X command:
>>
>> /usr/libexec/java_home -d64 -v 1.6+
>>
>> It's now locating:
>> /Library/Java/**JavaVirtualMachines/jdk1.8.0.**jdk/Contents/Home
>>
>> Would I be correct in guessing that Felix 3.2.2 has no explicit support
>> for
>> JDK8 (would make sense), and that it has no fallback mechanism so that it
>> can at least export packages from prior Java releases?  As in, now that
>> there's Java 8, it's not exporting stuff it knew about in Java 6...
>>
>> What can I do about that to fix it, apart from adding a hard-coded
>> dependency on Java 6 (which is EOL) or upgrading Felix?
>>
>
> The default.properties file inside the felix.jar contains the packages
> that should be exported by the framework for a given Java platform. The
> issue is that it doesn't have a property for Java 8 so the framework
> doesn't export any JRE packages.
>
> You can just copy the Java 7 property and use it for Java 8. You can copy
> the value from default.properties, but specify it in conf/config.properties
> so you don't need to edit the JAR file.
>
> -> richard
>
>
>> Thanks,
>> Christopher
>>
>>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@felix.apache.org>
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: After installing Java 8 developer preview, Felix 3.2.2 no longer exports "javax.sql"

Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 9/12/13 11:56 , Christopher BROWN wrote:
> Hello,
>
> An application using Felix 3.2.2 on MacOS X has started failing with the
> following exception:
>
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> system.sdk-project [5]: Unable to resolve 5.0: missing requirement [5.0]
> package; (package=javax.sql)
>
> The application is started from a shell script that includes the following
> (standard) MacOS X command:
>
> /usr/libexec/java_home -d64 -v 1.6+
>
> It's now locating:
> /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
>
> Would I be correct in guessing that Felix 3.2.2 has no explicit support for
> JDK8 (would make sense), and that it has no fallback mechanism so that it
> can at least export packages from prior Java releases?  As in, now that
> there's Java 8, it's not exporting stuff it knew about in Java 6...
>
> What can I do about that to fix it, apart from adding a hard-coded
> dependency on Java 6 (which is EOL) or upgrading Felix?

The default.properties file inside the felix.jar contains the packages 
that should be exported by the framework for a given Java platform. The 
issue is that it doesn't have a property for Java 8 so the framework 
doesn't export any JRE packages.

You can just copy the Java 7 property and use it for Java 8. You can 
copy the value from default.properties, but specify it in 
conf/config.properties so you don't need to edit the JAR file.

-> richard

>
> Thanks,
> Christopher
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: After installing Java 8 developer preview, Felix 3.2.2 no longer exports "javax.sql"

Posted by Felix Meschberger <fm...@adobe.com>.
Hi

Yes, Felix framework 3.2.2 does not have Java 8 API definitions and thus does not expose anything from the platform at all.

As of Felix framework 4.2.0 Java 8 API definitions are available, which happen to just be the same as for Java 7 (except with a different export version number) for the time being.

So upgrading to the latest Felix framework (4.2.1 IIRC) should probably solve that problem.

Or, alternatively, you might get the Java8 API definitions from the framework source and update your local installation.

Regards
Felix

Am 12.09.2013 um 17:56 schrieb Christopher BROWN:

> Hello,
> 
> An application using Felix 3.2.2 on MacOS X has started failing with the
> following exception:
> 
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> system.sdk-project [5]: Unable to resolve 5.0: missing requirement [5.0]
> package; (package=javax.sql)
> 
> The application is started from a shell script that includes the following
> (standard) MacOS X command:
> 
> /usr/libexec/java_home -d64 -v 1.6+
> 
> It's now locating:
> /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home
> 
> Would I be correct in guessing that Felix 3.2.2 has no explicit support for
> JDK8 (would make sense), and that it has no fallback mechanism so that it
> can at least export packages from prior Java releases?  As in, now that
> there's Java 8, it's not exporting stuff it knew about in Java 6...
> 
> What can I do about that to fix it, apart from adding a hard-coded
> dependency on Java 6 (which is EOL) or upgrading Felix?
> 
> Thanks,
> Christopher