| Summary: | java.io.FileOutputStream :: (Filename too long) | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | David Williams <david_williams> |
| Component: | Team | Assignee: | Kevin McGuire <Kevin_McGuire> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P1 | CC: | andrewjobel56, aryanvermame, nbuleski |
| Version: | 2.0 | ||
| Target Milestone: | 2.0 F4 | ||
| Hardware: | PC | ||
| OS: | Windows 2000 | ||
| Whiteboard: | |||
|
Description
David Williams
Have you checked the .log? Under certain conditions we are unable to display error messages to the user, but we do log them. It could be that the remote was empty because we were failing retrieving it. Oh, good point to check the log. There was info there. Below I've pasted the top of the stack. Is the filename really too long? Is there a good limit to go by? !ENTRY org.eclipse.jdt.ui 4 1 Jun 19, 2002 19:15:23.263 !MESSAGE Internal Error !STACK 1 org.eclipse.core.runtime.CoreException[-6]: java.io.FileNotFoundException: D:\Builds\EB\eSDK-0612-F3 \eclipse\workspaceReleased\.metadata\.plugins\org.eclipse.team.cvs.core\.cache\c vslnx01.raleigh.ibm.com\cvsrep\j2eedev\com.ibm.sed.editor\sedxml\com\ibm\sed\con tentassist\html\javascript\JavaScriptCompletionAssistAdapter.java 1.1.4.1.2.16 (Filename too long) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java(Compiled Code)) at java.io.FileOutputStream.<init>(FileOutputStream.java:76) at java.io.FileOutputStream.<init>(FileOutputStream.java:146) at org.eclipse.team.internal.ccvs.core.resources.RemoteFile.switchToCacheOutputStre am(RemoteFile.java:525) at org.eclipse.team.internal.ccvs.core.resources.RemoteFile.setContents (RemoteFile.java:348) at org.eclipse.team.internal.ccvs.core.client.Session.receiveFile (Session.java(Compiled Code)) at org.eclipse.team.internal.ccvs.core.client.UpdatedHandler.handle (UpdatedHandler.java(Compiled Code)) at org.eclipse.team.internal.ccvs.core.client.Request.executeRequest (Request.java(Compiled Code)) at org.eclipse.team.internal.ccvs.core.client.Command.doExecute (Command.java:390) at org.eclipse.team.internal.ccvs.core.client.Command$2.run (Command.java:322) at org.eclipse.team.internal.ccvs.core.resources.RemoteFolder.run (RemoteFolder.java:692) at org.eclipse.team.internal.ccvs.core.client.Command.execute (Command.java:333) at org.eclipse.team.internal.ccvs.core.client.Command.execute (Command.java:712) at org.eclipse.team.internal.ccvs.core.resources.RemoteFile$1.run (RemoteFile.java:142) at org.eclipse.team.internal.ccvs.core.resources.RemoteFolder.run (RemoteFolder.java:692) at org.eclipse.team.internal.ccvs.core.client.Session.run (Session.java:192) at org.eclipse.team.internal.ccvs.core.resources.RemoteFile.getContents (RemoteFile.java:140) at org.eclipse.team.internal.ui.sync.MergeResource.getLatestRevision (MergeResource.java:79) at org.eclipse.team.internal.ui.sync.TeamFile$2.createStream (TeamFile.java:82) at org.eclipse.compare.BufferedContent.getContents (BufferedContent.java:43) at org.eclipse.jdt.internal.ui.compare.JavaStructureCreator.getStructure (JavaStructureCreator.java:132) at org.eclipse.compare.structuremergeviewer.StructureDiffViewer.compareInputChanged (StructureDiffViewer.java:218) at org.eclipse.jdt.internal.ui.compare.JavaStructureDiffViewer.compareInputChanged (JavaStructureDiffViewer.java:80) at org.eclipse.compare.structuremergeviewer.StructureDiffViewer.inputChanged (StructureDiffViewer.java:148) at org.eclipse.jface.viewers.ContentViewer.setInput (ContentViewer.java:234) at org.eclipse.jface.viewers.StructuredViewer.setInput (StructuredViewer.java:875) at org.eclipse.compare.CompareViewerSwitchingPane.setInput (CompareViewerSwitchingPane.java:261) at org.eclipse.compare.CompareEditorInput$12.run (CompareEditorInput.java:564) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:64) at org.eclipse.compare.CompareEditorInput.feedDefault1 (CompareEditorInput.java:560) at org.eclipse.compare.CompareEditorInput.access$2 (CompareEditorInput.java:559) at org.eclipse.compare.CompareEditorInput$8.doubleClick (CompareEditorInput.java:428) at org.eclipse.compare.CompareViewerSwitchingPane.doubleClick (CompareViewerSwitchingPane.java:197) at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick (StructuredViewer.java:306) Moving to Core for comment. Also reworded title from: F3 compare show's empty file in repository but F2 doesn't The maximum filename length on windows is 255 characters, which is why the IOException occurs. This shouldn't be the user's problem, since it's an internal cache file whose name is too long. The cache could use random filenames and maintain an index to the real filename. There is no platform core code anywhere in this stack trace. The CoreException is thrown by MergeResource.getLatestRevision(). Back to team. (Aside: that's one honkin' filename!) The file is required for caching large remote files (over 32k) to avoid refetching contents each time during compare, etc. The filename must be unique since we don't easely know the lifespan of the cache (because its required by the UI). Post 2.0, we will look at having randomly generated filenames with an in memory lookup table mapping the path to the generated filename. For 2.0, since we can't determine the maximum filename length for the OS, workaround will be: - catch the exception in RemoteFile.setContents() - on exception, don't use local caching file. - write warning to launch to indicate that caching could not occur due to long filename This will mean slower performance when comparing large files but will at least allow the user to proceed. Risk: small to moderate - to change is small and localized, but it's in often used to code Value: allows user to keep working when filenames are too long or the OS doesn't support sufficiently long filenames. Am I reading the discussion correctly this is only a problem for files over 32K? Also, is there a workaround for this problem? Would one be just to install with shorter install/workspace directory? Mine was D:\Builds\EB\eSDK-0612-F3\eclipse\workspaceReleased\ Or is there a better workaround? Yes to both questions. Fixed and verified by KM and DJ Looks like it works now. Hi all, I have been suffering from accessing, managing and even renaming files
>>> that have more than 255 characters over a long time. I have tried various ways
>>> but failed. Then I have searched this problem in internet. Then I have found a solution. This software is very easy to use. Named Long path Tool.
I recommend LongPathTool, Please try. I was using the LongPathTool and it helped me. It is a very useful tool you should try it. |