Bug 310764 - JAR with invalid Class-Path entry in MANIFEST.MF causes ambiguous behaviour
Summary: JAR with invalid Class-Path entry in MANIFEST.MF causes ambiguous behaviour
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Jay Arthanareeswaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-28 03:02 EDT by Ayushman Jain CLA
Modified: 2011-04-26 09:26 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 Ayushman Jain CLA 2010-04-28 03:02:45 EDT
Build Identifier: I20100424-2000.

This is a FUP of bug 308150.
Following the steps to reproduce given below, I get the following error

"Setting build path has encountered a problem"
'C:\Documents and Settings\Administrator' is not a valid location for linked
resources.

Now, I can see baddie.jar added to the referenced libraries of my project. But
checking out the build path or .classpath, I cannot find baddie.jar. This means
that even though Eclipse has removed it, the referenced libraries is still
showing it.
Again, I go to build path -> add external jars and again add baddie.jar. This
fails via an exception

eclipse.buildId=I20100424-2000
java.version=1.6.0_17
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86

Exception while updating external folders

org.eclipse.core.internal.resources.ResourceException: 'C:\Documents and
Settings\Administrator' is not a valid location for linked resources.
    at
org.eclipse.core.internal.resources.Resource.assertLinkRequirements(Resource.java:166)
    at
org.eclipse.core.internal.resources.Resource.createLink(Resource.java:655)
    at
org.eclipse.core.internal.resources.Resource.createLink(Resource.java:629)
    at
org.eclipse.jdt.internal.core.ExternalFoldersManager.createLinkFolder(ExternalFoldersManager.java:113)
    at
org.eclipse.jdt.internal.core.ExternalFolderChange.updateExternalFoldersIfNecessary(ExternalFolderChange.java:47)
    at
org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:1981)
    at
org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java:470)
    at
org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:291)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at
org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)
    at
org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149)
    at
org.eclipse.core.internal.resources.Workspace.broadcastBuildEvent(Workspace.java:311)
    at
org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:136)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

After this if i go the build path I can see baddie.jar added there and can
remove it. But all this seems a bit ambiguous. The behaviour should be consistent both the times. 
Also, in 3.6M6, I dont get an error even on the first go. And I can normally see the JAR added to the build path. So seems like something happened after the fix for bug 308150.

Reproducible: Always

Steps to Reproduce:
1.Create a new java project
2.Build path - >Add baddie.jar to the classpath using "Add external JARs".
3.See that there's an error.
Comment 1 Srikanth Sankaran CLA 2010-04-28 04:02:50 EDT
Jay, please follow up.
Comment 2 Jay Arthanareeswaran CLA 2011-02-20 22:58:59 EST
This no longer seems to occur on HEAD. Ayush, can you please confirm?
Comment 3 Jay Arthanareeswaran CLA 2011-04-15 04:22:13 EDT
I don't see this being an issue any longer. Closing the bug.
Comment 4 Olivier Thomann CLA 2011-04-26 09:26:25 EDT
Verified.