com.intellij.util.IncorrectOperationException

Cannot modify a read-only file 'C:\Users\Irina.Petrovskaya\IdeaProjects\gitTests\diffTest\src\spring-config.xml'.

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web20

Stack trace

  • com.intellij.util.IncorrectOperationException: Cannot modify a read-only file 'C:\Users\Irina.Petrovskaya\IdeaProjects\gitTests\diffTest\src\spring-config.xml'. at com.intellij.psi.impl.CheckUtil.checkWritable(CheckUtil.java:47) at com.intellij.psi.impl.source.tree.CompositePsiElement.addAfter(CompositePsiElement.java:161) at com.intellij.util.xml.impl.DomInvocationHandler.a(DomInvocationHandler.java:820) at com.intellij.util.xml.impl.DomInvocationHandler.addCollectionChild(DomInvocationHandler.java:787) at com.intellij.util.xml.impl.AddChildInvocation.invoke(AddChildInvocation.java:43) at com.intellij.util.xml.impl.DomInvocationHandler.invoke(DomInvocationHandler.java:681) at com.intellij.spring.model.xml.beans.impl.SpringBeanImpl$$EnhancerByJetBrainsMainCglib$$2bef2e3f.addProperty(<generated>) at com.intellij.spring.model.actions.generate.SpringPropertiesGenerateProvider$1.run(SpringPropertiesGenerateProvider.java:82) at com.intellij.openapi.command.WriteCommandAction$Simple.run(WriteCommandAction.java:182) at com.intellij.openapi.application.RunResult.run(RunResult.java:35) at com.intellij.openapi.command.WriteCommandAction$2.run(WriteCommandAction.java:109) at com.intellij.openapi.command.WriteCommandAction$4.run(WriteCommandAction.java:157) at com.intellij.openapi.command.impl.CoreCommandProcessor.a(CoreCommandProcessor.java:141) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:119) at com.intellij.openapi.command.WriteCommandAction.doExecuteCommand(WriteCommandAction.java:160) at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:104) at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:82) at com.intellij.spring.model.actions.generate.SpringPropertiesGenerateProvider.doGenerate(SpringPropertiesGenerateProvider.java:85) at com.intellij.spring.model.actions.generate.SpringPropertiesGenerateProvider.generate(SpringPropertiesGenerateProvider.java:65) at com.intellij.spring.model.actions.generate.SpringPropertiesGenerateProvider.generate(SpringPropertiesGenerateProvider.java:34) at com.intellij.util.xml.actions.generate.AbstractDomGenerateProvider.generate(AbstractDomGenerateProvider.java:52) at com.intellij.util.xml.ui.actions.generate.GenerateDomElementAction$1.lambda$invoke$0(GenerateDomElementAction.java:60) at com.intellij.util.xml.ui.actions.generate.GenerateDomElementAction$1.invoke(GenerateDomElementAction.java:73) at com.intellij.codeInsight.actions.CodeInsightAction.lambda$null$0(CodeInsightAction.java:64) at com.intellij.codeInsight.actions.CodeInsightAction.lambda$actionPerformedImpl$1(CodeInsightAction.java:70) at com.intellij.openapi.command.impl.CoreCommandProcessor.a(CoreCommandProcessor.java:149) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:109) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:99) at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85) at com.intellij.codeInsight.actions.CodeInsightAction.actionPerformedImpl(CodeInsightAction.java:60) at com.intellij.codeInsight.actions.CodeInsightAction.actionPerformed(CodeInsightAction.java:41) at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:199) at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:91) at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:159) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:213) at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep.performAction(PopupFactoryImpl.java:874) at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep.a(PopupFactoryImpl.java:862) at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:204) at com.intellij.ui.popup.AbstractPopup.a(AbstractPopup.java:1392) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) at com.intellij.ide.IdeEventQueue.j(IdeEventQueue.java:838) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:674) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

We couldn't find other users who have seen this exception.