Bug 54921 - Plugins cannot find security jars in lib\ext directory. Gives NOClassDefFoundError while loading javax.crypto.security
Summary: Plugins cannot find security jars in lib\ext directory. Gives NOClassDefFound...
Status: RESOLVED DUPLICATE of bug 30919
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 2.0.2   Edit
Hardware: PC Windows 2000
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-15 19:14 EST by Radha Popuri CLA
Modified: 2004-03-15 19:16 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Radha Popuri CLA 2004-03-15 19:14:32 EST
Hi,
  When eclipse  workbench is launched using eclipse.exe , it seems it uses
org.eclipse.core.launcher.Main class to launch the workbench

The command used internally  is

1)C:\<SOME_LOCATION>\jre\bin\java.exe   -classpath
%WSWB_PATH%\startup.jar;%WSWB_PATH%\plugins\org.eclipse.core.boot_2.0.3\boot.jar
org.eclipse.core.launcher.Main -application org.eclipse.ui.workbench  -dev bin
-consoleLog -os win32 -ws win32 -arch x86 

I have some security jars from IBM i.e. ibmjcefw.jar, ibmjceprovider.jar and all
the accompanying security  jars in  jre\lib\ext\ directory

Whenever I try to use encryption/decryption from inside my plugins , it always
gives me a NoClassDefFoundError  while loading  the class javax/crypto/SecretKey.
It seems Eclipse is unable to load any classes from the jars in jre\lib\ext
directory.

However I also found this.  All my encryption/decryption is working when I test
my plugins bylaunching as a run time workbench.
I found that in this case the launch command is

2) C:\<SOME_LOCATION>\jre\bin\java.exe -  -classpath
%WSWB_PATH%\plugins\org.eclipse.pde.ui_2.0.1\launcher\slimlauncher.jar;%WSWB_PATH%\plugins\org.eclipse.core.boot_2.0.3\boot.jar
EclipseRuntimeLauncher org.eclipse.ui.workbench  -dev bin -consoleLog -os win32
-ws win32 -arch x86 

Compare (1) and (2) ; Why is it that (2) is able to find the security jars in
lib\ext] directory of JRE whereas (1) is unable to ??  It seems that while
creating the BootLoader in (1), its parent is set to null; So it seems the jars
in lib\ext directory are lost and not present in the Class Loader heirarchy when
  Eclipse boots up. 

It seems the extension class loader is lost . And hence these problems are
occurring.

Thanks,
Radha.
Comment 1 John Arthorne CLA 2004-03-15 19:16:22 EST

*** This bug has been marked as a duplicate of 30919 ***