Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370598 - Code behaves different on development platform and productive system
Summary: Code behaves different on development platform and productive system
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.8   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.8 M6   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-03 14:23 EST by Hendrik Renken CLA
Modified: 2012-03-14 03:06 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hendrik Renken CLA 2012-02-03 14:23:18 EST
Build Identifier: Version: 3.7.1 Build id: M20110909-1335

When trying the following code on a development platform, it just works and everything is fine.
Development platform means: Plugin as a plugin project in the workspace, launching a new Eclipse using the Plugin Project.

After deployment via p2-Update site, the code no longer works. An exception is thrown which isn't shown, neither on screen in the error dialog nor in the eclipse error log.

The code in question is:


List<IClasspathEntry> resolvedEntries = new LinkedList<IClasspathEntry>();
Enumeration<URL> e = Activator.context().getBundle().findEntries(".", "*.jar", true);
while (e.hasMoreElements())
{	
	String s = FileLocator.resolve(e.nextElement()).toString();
	IPath path = Path.fromOSString(s.substring(5));
	resolvedEntries.add(JavaCore.newLibraryEntry(path, path, null));
}


Reproducible: Always

Steps to Reproduce:
1. Create a new plugin project
2. Run the code e.g. in a simple activator
3. Deploy the plugin
4. Install it through p2-update site
5. Trigger the code, Exception is thrown.
Comment 1 Hendrik Renken CLA 2012-02-03 14:32:11 EST
Most likely this happens because of an AdminPermission i do not have.

Sorry, for any inconvenience this may have caused.
Hendrik
Comment 2 Jay Arthanareeswaran CLA 2012-03-14 03:06:07 EDT
Verified for 3.8 M6