facebook

can not write to .springbeans and .mymetadata

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #269417 Reply

    factset
    Participant

    Hello,

    my project is managed under Perforce.
    Actually almost all files are under control, including .springbeans and .mymetadata files.

    But I’ve noticed some errors in the .log file :

    !ENTRY com.genuitec.eclipse.j2eedt.core 1 0 2007-04-26 11:21:21.822
    !MESSAGE Error
    !STACK 1
    org.eclipse.core.internal.resources.ResourceException: Could not write to read-only file: /mt/.mymetadata.
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.write(FileSystemResourceManager.java:864)
    at org.eclipse.core.internal.resources.File.internalSetContents(File.java:322)
    at org.eclipse.core.internal.resources.File.setContents(File.java:362)
    at org.eclipse.core.internal.resources.File.setContents(File.java:462)
    at com.genuitec.eclipse.core.util.JDOMUtil.saveJDomDocument(JDOMUtil.java:99)
    at com.genuitec.eclipse.core.util.JDOMUtil.createXMLFile(JDOMUtil.java:44)
    at com.genuitec.eclipse.j2eedt.core.J2EEProject.saveMetaData(Unknown Source)
    at com.genuitec.eclipse.j2eedt.core.J2EEProject.renameAs(Unknown Source)
    at com.genuitec.eclipse.j2eedt.core.J2EECore.projectAddedOpenedOrRenamed(Unknown Source)
    at com.genuitec.eclipse.j2eedt.core.J2EECore.projectChanged(Unknown Source)
    at com.genuitec.eclipse.j2eedt.core.J2EECore.processProjectEvent(Unknown Source)
    at com.genuitec.eclipse.j2eedt.core.ResourceChangeVisitor.processEvent(Unknown Source)
    at com.genuitec.eclipse.j2eedt.core.ResourceChangeVisitor.visit(Unknown Source)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:67)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:76)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:48)
    at com.genuitec.eclipse.j2eedt.core.A.resourceChanged(Unknown Source)
    at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:280)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
    at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:274)
    at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:148)
    at org.eclipse.core.internal.resources.Workspace.broadcastBuildEvent(Workspace.java:240)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:151)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:217)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
    !SUBENTRY 1 org.eclipse.core.resources 4 272 2007-04-26 11:21:21.852
    !MESSAGE Could not write to read-only file: /mt/.mymetadata.

    and

    !ENTRY org.eclipse.core.resources 4 272 2007-04-26 11:23:33.552
    !MESSAGE Could not write to read-only file: /mt/.springBeans.

    It happens at least when I try to add a Spring Config Set to my project. Because no error is displayed I thought the config set was successfully added because you can see it in the configuration panel, but if you switch workspace or restart MyEclipse, the Spring ConfigSet has disappeared.

    Simple workaround : edit these 2 files manually (just add a space, and remove it) : the editor makes the file “opened” in Perforce : it can now be modified by MyEclipse if you add a Spring ConfigSet.

    Please note that this problem does not occur for all configuration files.
    For example .classpath : if you change some classpath options, MyEclipse “detects” first if the file is controlled, if it is, then MyEclipse opens it from the source control before trying to edit it, so it works.

    #269433 Reply

    Loyal Water
    Member

    Sounds like a perforce issue to me. Can you try the same thing on a project that isn’t under source control, and see if it works ? Is it possible to have perforce not manage those files?

    #269463 Reply

    factset
    Participant

    Well if the project is not under source control, it will definitely work because files are writable.
    When files are under control (at least under Perforce control) they are read-only.

    To edit a file, technically it is done in 2 steps : tell Perforce you want to edit the file (so it becomes writable), then edit it,
    Generally you don’t think about it because (My)Eclipse does the whole thing, but for some files as .springbeans and .mymetadata, it looks as if (My)Eclipse tries to change directly the file, without worrying about source control.

    To be honest I don’t know where the problem is, but my instinct was to think that Eclipse was not telling the source control server that a file had to be modified.

    Yes it’s possible to exclude some files from source control, but sometimes it’s cool to control these files, so they are shared for other developers, that means when you retrieve a project the configuration is done already.

    It’s not a big deal, but just in case you knew where it was coming from…

    Thanks
    Philippe

    #269467 Reply

    Loyal Water
    Member

    Hi Philippe,
    I agree with you that this is a cool feature when files are shared with other developers. Ill take this issue to my Dev Team to see if something can be done.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: can not write to .springbeans and .mymetadata

You must be logged in to post in the forum log in