Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335538 - Unable to save a c editor
Summary: Unable to save a c editor
Status: RESOLVED NOT_ECLIPSE
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.6.1   Edit
Hardware: PC HP-UX
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-27 02:10 EST by GaneshrajS CLA
Modified: 2011-01-31 03:51 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description GaneshrajS CLA 2011-01-27 02:10:31 EST
Hi,

I am unable to save a editor from Eclipse. I am getting following exception.

Any help with respect to this will be really useful.

Thanks,
Ganeshraj.S

Stack trace:

!SESSION 2011-01-27 12:35:11.731 -----------------------------------------------
eclipse.buildId=M20100909-0800
java.version=1.6.0.01
java.vendor=Hewlett-Packard Co.
BootLoader constants: OS=hpux, ARCH=ia64_32, WS=motif, NL=en
Command-line arguments:  -os hpux -ws motif -arch ia64_32 -clean

!ENTRY org.eclipse.ui 4 4 2011-01-27 12:35:59.059
!MESSAGE Save Failed

!ENTRY org.eclipse.ui 2 0 2011-01-27 12:35:59.068
!MESSAGE Save Failed
!STACK 0
java.lang.ExceptionInInitializerError
	at org.eclipse.core.internal.localstore.BlobStore.addBlob(BlobStore.java:51)
	at org.eclipse.core.internal.localstore.HistoryStore2.addState(HistoryStore2.java:92)
	at org.eclipse.core.internal.localstore.FileSystemResourceManager.write(FileSystemResourceManager.java:996)
	at org.eclipse.core.internal.resources.File.internalSetContents(File.java:325)
	at org.eclipse.core.internal.resources.File.setContents(File.java:364)
	at org.eclipse.core.internal.resources.File.setContents(File.java:468)
	at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.commitFileBufferContent(ResourceTextFileBuffer.java:391)
	at org.eclipse.core.internal.filebuffers.ResourceFileBuffer.commit(ResourceFileBuffer.java:325)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider.commitFileBuffer(TextFileDocumentProvider.java:870)
	at org.eclipse.cdt.internal.ui.editor.CDocumentProvider.commitWorkingCopy(CDocumentProvider.java:977)
	at org.eclipse.cdt.internal.ui.editor.CDocumentProvider$2.execute(CDocumentProvider.java:1010)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider$DocumentProviderOperation.run(TextFileDocumentProvider.java:132)
	at org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation.execute(WorkspaceModifyDelegatingOperation.java:69)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:75)
	at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:65)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:456)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument(TextFileDocumentProvider.java:772)
	at org.eclipse.ui.texteditor.AbstractTextEditor.performSave(AbstractTextEditor.java:4879)
	at org.eclipse.ui.texteditor.AbstractTextEditor.doSave(AbstractTextEditor.java:4668)
	at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.doSave(AbstractTextEditor.java:7003)
	at org.eclipse.ui.Saveable.doSave(Saveable.java:214)
	at org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:349)
	at org.eclipse.ui.internal.SaveableHelper$3.run(SaveableHelper.java:195)
	at org.eclipse.ui.internal.SaveableHelper$5.run(SaveableHelper.java:277)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
	at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2600)
	at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:285)
	at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:264)
	at org.eclipse.ui.internal.SaveableHelper.saveModels(SaveableHelper.java:207)
	at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:144)
	at org.eclipse.ui.internal.EditorManager.savePart(EditorManager.java:1369)
	at org.eclipse.ui.internal.WorkbenchPage.savePart(WorkbenchPage.java:3334)
	at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3347)
	at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:76)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:929)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3224)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2895)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: java.security.ProviderException: setSeed() failed
	at sun.security.provider.NativePRNG$RandomIO.implSetSeed(NativePRNG.java:232)
	at sun.security.provider.NativePRNG$RandomIO.access$100(NativePRNG.java:108)
	at sun.security.provider.NativePRNG.engineSetSeed(NativePRNG.java:92)
	at java.security.SecureRandom.getDefaultPRNG(SecureRandom.java:180)
	at java.security.SecureRandom.<init>(SecureRandom.java:161)
	at org.eclipse.core.internal.utils.UniversalUniqueIdentifier.computeNodeAddress(UniversalUniqueIdentifier.java:168)
	at org.eclipse.core.internal.utils.UniversalUniqueIdentifier.<clinit>(UniversalUniqueIdentifier.java:41)
	... 70 more
Caused by: java.io.IOException: No such device (errno:19)
	at java.io.FileOutputStream.writeBytes(Native Method)
	at java.io.FileOutputStream.write(FileOutputStream.java:247)
	at sun.security.provider.NativePRNG$RandomIO.implSetSeed(NativePRNG.java:230)
	... 76 more
Comment 1 Anton Leherbauer CLA 2011-01-27 02:43:37 EST
(In reply to comment #0)

Seems like the security policy of the JRE is too restrictive:

> Caused by: java.security.ProviderException: setSeed() failed
>     at
> sun.security.provider.NativePRNG$RandomIO.implSetSeed(NativePRNG.java:232)
>     at
> sun.security.provider.NativePRNG$RandomIO.access$100(NativePRNG.java:108)
>     at sun.security.provider.NativePRNG.engineSetSeed(NativePRNG.java:92)
>     at java.security.SecureRandom.getDefaultPRNG(SecureRandom.java:180)
>     at java.security.SecureRandom.<init>(SecureRandom.java:161)
>     at
> org.eclipse.core.internal.utils.UniversalUniqueIdentifier.computeNodeAddress(UniversalUniqueIdentifier.java:168)
>     at
> org.eclipse.core.internal.utils.UniversalUniqueIdentifier.<clinit>(UniversalUniqueIdentifier.java:41)
>     ... 70 more
> Caused by: java.io.IOException: No such device (errno:19)
>     at java.io.FileOutputStream.writeBytes(Native Method)
>     at java.io.FileOutputStream.write(FileOutputStream.java:247)
>     at
> sun.security.provider.NativePRNG$RandomIO.implSetSeed(NativePRNG.java:230)
>     ... 76 more

I would assume this exception would occur with every eclipse editor.  
Moving to Platform/Resources in case they have seen this before.  Otherwise this seems to be NOT_ECLIPSE.
Comment 2 GaneshrajS CLA 2011-01-27 05:08:51 EST
(In reply to comment #1)
> (In reply to comment #0)
> 
> Seems like the security policy of the JRE is too restrictive:
Any idea how to change it?
"-D java.security.egd=/dev/random" entry in eclipse.ini file will resolve this issue?

> 
> > Caused by: java.security.ProviderException: setSeed() failed
> >     at
> > sun.security.provider.NativePRNG$RandomIO.implSetSeed(NativePRNG.java:232)
> >     at
> > sun.security.provider.NativePRNG$RandomIO.access$100(NativePRNG.java:108)
> >     at sun.security.provider.NativePRNG.engineSetSeed(NativePRNG.java:92)
> >     at java.security.SecureRandom.getDefaultPRNG(SecureRandom.java:180)
> >     at java.security.SecureRandom.<init>(SecureRandom.java:161)
> >     at
> > org.eclipse.core.internal.utils.UniversalUniqueIdentifier.computeNodeAddress(UniversalUniqueIdentifier.java:168)
> >     at
> > org.eclipse.core.internal.utils.UniversalUniqueIdentifier.<clinit>(UniversalUniqueIdentifier.java:41)
> >     ... 70 more
> > Caused by: java.io.IOException: No such device (errno:19)
> >     at java.io.FileOutputStream.writeBytes(Native Method)
> >     at java.io.FileOutputStream.write(FileOutputStream.java:247)
> >     at
> > sun.security.provider.NativePRNG$RandomIO.implSetSeed(NativePRNG.java:230)
> >     ... 76 more
> 
> I would assume this exception would occur with every eclipse editor.  
> Moving to Platform/Resources in case they have seen this before.  Otherwise
> this seems to be NOT_ECLIPSE.
Comment 3 John Arthorne CLA 2011-01-27 08:58:39 EST
Looks like a problem with the JRE or class libraries. We are just creating a new instance of java.security.SecureRandom here.
Comment 4 GaneshrajS CLA 2011-01-31 02:49:50 EST
(In reply to comment #3)
> Looks like a problem with the JRE or class libraries. We are just creating a
> new instance of java.security.SecureRandom here.

Yes this is related to JRE. Please go ahead and close this bug.
Now I am able to save the files using eclipse editors.

Thanks for your replies.

Thank you,
Ganeshraj.S
Comment 5 James Blackburn CLA 2011-01-31 03:51:39 EST
As per comment 4