Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363185 - WeavingHook does not handle when a class definition fails
Summary: WeavingHook does not handle when a class definition fails
Status: CLOSED DUPLICATE of bug 373397
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Weaving (show other bugs)
Version: 3.7.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: Juno   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-08 10:28 EST by benito1er CLA
Modified: 2012-04-30 11:48 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description benito1er CLA 2011-11-08 10:28:01 EST
-- Configuration Details --
Product: Eclipse 1.4.1.20110909-0613 (org.eclipse.epp.package.java.product)
Installed Features:
 org.eclipse.platform 3.7.1.r37x_v20110729-9gF7UHOxFtniV7mI3T556iZN9AU8bEZ1lHMcVK

 3004: Unexpected error occurred.
  java.lang.IllegalArgumentException: Argument "clazz" must not be null!
  	at org.eclipse.equinox.weaving.internal.caching.BundleCachingService.storeClass(Unknown Source)
  	at org.eclipse.equinox.weaving.adaptors.WeavingAdaptor.storeClass(Unknown Source)
  	at org.eclipse.equinox.weaving.hooks.WeavingHook.recordClassDefine(Unknown Source)
  	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:604)
  	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:567)
  	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:490)
  	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassName(ClasspathManager.java:469)
  	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:456)
  	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
  	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
  	at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
  	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473)
  	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
  	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
  	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
  	at java.lang.ClassLoader.loadClass(Unknown Source)
  	at org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager.activate(JavaDebugOptionsManager.java:673)
  	at org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager.launchChanged(JavaDebugOptionsManager.java:688)
  	at org.eclipse.jdt.internal.debug.ui.JavaDebugOptionsManager.launchAdded(JavaDebugOptionsManager.java:682)
  	at org.eclipse.debug.internal.core.LaunchManager$LaunchNotifier.run(LaunchManager.java:440)
  	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
  	at org.eclipse.debug.internal.core.LaunchManager$LaunchNotifier.notify(LaunchManager.java:428)
  	at org.eclipse.debug.internal.core.LaunchManager.fireUpdate(LaunchManager.java:990)
  	at org.eclipse.debug.internal.core.LaunchManager.addLaunch(LaunchManager.java:688)
  	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:843)
  	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
  	at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:928)
  	at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1132)
  	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Satyam Kandula CLA 2011-11-09 01:34:37 EST
I did a quick glance at the call stack and see that there is something wrong with the call of recordClassDefine() in ClasspathManager#defineClass(). There are chances that the argument passed could be null which seems incorrect. Moving it to Equinox team for investigation.
Comment 2 Thomas Watson CLA 2011-11-09 08:59:02 EST
The WeavingHook needs to protect in cases where the clazz is null.  This can happen if there were exceptions defining the class or if the class was already defined by another thread.  I suspect the issue here is that an LinkageException of some sort was thrown while defining the class.
Comment 3 Thomas Watson CLA 2012-04-30 11:48:49 EDT
I had fixed this in bug 373397.  Sorry I forgot about this original bug report.

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