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 <[email protected]> | >--------------------------------------------------------------------------------------------------------------------------------------------------| |------------> | To: | |------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| |[email protected], | >--------------------------------------------------------------------------------------------------------------------------------------------------| |------------> | 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 [email protected] https://dev.eclipse.org/mailman/listinfo/equinox-dev _______________________________________________ equinox-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/equinox-dev
