[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Access to com.sun.crypto.provider packages

Tom,

That worked perfectly, thanks.

Ben

On Thu, Feb 23, 2012 at 1:23 PM, Thomas Watson <tjwatson@xxxxxxxxxx> wrote:
> Try setting the following configuration property:
>
> osgi.frameworkParentClassloader=ext
>
> In PDE you can try this by setting the VM argument (e.g.
> -Dosgi.frameworkParentClassloader=ext).  The org.eclipse.equinox.launcher
> (used both from PDE and the eclipse native launcher to launch the equinox
> framework) uses this property to determine the parent classloader to use
> for the class loader that is responsible for loading the framework
> implementation.  Setting this value to ext should allow the system bundle
> to be able to load classes from the extension class loader and therefore
> allow it to successfully export the packages available on the extension
> class loader.
>
> Hope that helps.
>
> Tom
>
>
>
>
> |------------>
> | From:      |
> |------------>
>  >--------------------------------------------------------------------------------------------------------------------------------------------------|
>  |Ben Abernathy <ben.abernathy@xxxxxxxxx>                                                                                                           |
>  >--------------------------------------------------------------------------------------------------------------------------------------------------|
> |------------>
> | To:        |
> |------------>
>  >--------------------------------------------------------------------------------------------------------------------------------------------------|
>  |Equinox development mailing list <equinox-dev@xxxxxxxxxxx>,                                                                                       |
>  >--------------------------------------------------------------------------------------------------------------------------------------------------|
> |------------>
> | Date:      |
> |------------>
>  >--------------------------------------------------------------------------------------------------------------------------------------------------|
>  |02/23/2012 11:48 AM                                                                                                                               |
>  >--------------------------------------------------------------------------------------------------------------------------------------------------|
> |------------>
> | Subject:   |
> |------------>
>  >--------------------------------------------------------------------------------------------------------------------------------------------------|
>  |Re: [equinox-dev] Access to com.sun.crypto.provider packages                                                                                      |
>  >--------------------------------------------------------------------------------------------------------------------------------------------------|
>
>
>
>
>
> Tom,
>
> Listing out the system properties gives me sun.boot.class.path which I
> think is what you are after, right? If so, the sunjce_provider.jar is
> not present. It appears the boot path is only getting jars at the
> jre/lib directory and not any sub directories (e.g.
> jre/lib/ext/sunjce_provider.jar).
>
> What is the preferred way to modify the boot classpath? Also, we are
> debugging using the PDE, but our deployments use the native launcher.
> So, does the approach change depending on the circumstance?
>
> Thanks,
>
> Ben
>
> On Thu, Feb 23, 2012 at 9:59 AM, Thomas Watson <tjwatson@xxxxxxxxxx> wrote:
>> Do you know if the com.sun.crypto.provider package is actually available
> on
>> the boot class path?  If it is available on the extension class loader
> from
>> the VM then that may be the cause since Equinox only uses the boot class
>> loader by default.
>>
>> Tom
>>
>>
>>
>>
>> |------------>
>> | From:      |
>> |------------>
>>
>>--------------------------------------------------------------------------------------------------------------------------------------------------|
>
>>  |Ben Abernathy <ben.abernathy@xxxxxxxxx>
> |
>>
>>--------------------------------------------------------------------------------------------------------------------------------------------------|
>
>> |------------>
>> | To:        |
>> |------------>
>>
>>--------------------------------------------------------------------------------------------------------------------------------------------------|
>
>>  |equinox-dev@xxxxxxxxxxx,
> |
>>
>>--------------------------------------------------------------------------------------------------------------------------------------------------|
>
>> |------------>
>> | Date:      |
>> |------------>
>>
>>--------------------------------------------------------------------------------------------------------------------------------------------------|
>
>>  |02/23/2012 09:09 AM
> |
>>
>>--------------------------------------------------------------------------------------------------------------------------------------------------|
>
>> |------------>
>> | Subject:   |
>> |------------>
>>
>>--------------------------------------------------------------------------------------------------------------------------------------------------|
>
>>  |[equinox-dev] Access to com.sun.crypto.provider packages
> |
>>
>>--------------------------------------------------------------------------------------------------------------------------------------------------|
>
>>
>>
>>
>>
>>
>> I am trying to integrate some pre-existing code that relies on the
>> com.sun.crypto.provider.SunJCE class into our Equinox based
>> application (version 3.7.1). Now I know by default the com.sun
>> packages are not accessible to bundles, so I made a fragment with the
>> idea of extending the framework to export the package. Here is its
>> manifest:
>>
>> Manifest-Version: 1.0
>> Bundle-ManifestVersion: 2
>> Bundle-Name: Extension
>> Bundle-SymbolicName: extension
>> Bundle-Version: 1.0.0.qualifier
>> Fragment-Host: system.bundle; extension:=framework
>> Bundle-RequiredExecutionEnvironment: JavaSE-1.6
>> Export-Package: com.sun.crypto.provider
>>
>> Clue 1: The PDE marks the Export-Package line and says that
>> com.sun.crypto.provider does not exist in this plugin.
>>
>> I created a sample bundle that just instantiates the class in question
>> in the bundle activator. That bundle's manifest is:
>>
>> Manifest-Version: 1.0
>> Bundle-ManifestVersion: 2
>> Bundle-Name: Cryptotest
>> Bundle-SymbolicName: cryptotest
>> Bundle-Version: 1.0.0.qualifier
>> Bundle-Activator: cryptotest.Activator
>> Bundle-ActivationPolicy: lazy
>> Bundle-RequiredExecutionEnvironment: JavaSE-1.6
>> Import-Package: com.sun.crypto.provider,
>>  org.osgi.framework;version="1.3.0"
>>
>> Clue 2:  The PDE marks the instantiation with an access restriction.
>>
>> Despite the two errors, the project does compile and I am able to
>> start debugging. When starting the sample bundle, I receive a class
>> not found exception (see attached txt file for the complete stack
>> trace). However, when I do a "packages 0" in the console, it appears
>> Equinox is claiming to export this package:
>>
>> com.sun.crypto.provider;
>> version="0.0.0"<org.eclipse.osgi_3.7.1.R37x_v20110808-1106 [0]>
>>  cryptotest_1.0.0.qualifier [2] imports
>>
>> Could somebody please provide some insight into what's going on? Is
>> there something obvious I am missing? I can provide a minimal set of
>> projects if need be.
>>
>> Thank you,
>>
>> Ben
>> [attachment "cnf_exception.txt" deleted by Thomas Watson/Austin/IBM]
>> _______________________________________________
>> equinox-dev mailing list
>> equinox-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>>
>>
>>
>> _______________________________________________
>> equinox-dev mailing list
>> equinox-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/equinox-dev
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
>
>
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev