facebook

MyEclipse 9 holds exclusive file access to jar files

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

    ifmEssen
    Participant

    Hello,

    since I updated to MyEclipse 9 I have the following problem: I have a project, where I sometimes need to upgrade certain jar-files with a newer version. This is not possible with MyEclipse 9 because it seems to hold exclusive file access to the project jar-files. When I try to copy my newer version into the project, I get an error message:

    “An exception has been caught while processing the refactoring ‘Copy’.

    Reason:
    Problems encountered while deleting resources”

    When I try to do this from outside eclipse in Windows Explorer, I get the error message that the file is currently in use.

    I tracked this down with Process Explorer and figured out that MyEclipse is holding access to these files. In earlier versions I never had problems with upgrading jar-files in a project.

    #316123 Reply

    support-swapna
    Moderator

    ifmEssen,

    1) Can you share your build id from Help > About MyEclipse Enterprise Workbench ? Paste it here for me.

    2) How did you install ME 9.0 ? Is it through Pulse/All-In-One installer/Archived Update site?

    3) Are you running on Windows OS ? Did you install any third party plugins like SpringSource Tool Suite(STS )?

    4) Can you check if the same issue exists for .java/.html/.jsp files too?

    5) Clear the contents of the .log file which is located at <workspace dir>/.metadata/.log.Can you shutdown the IDE, start it with -clean option and check if the issue persists ?
    Here is an FAQ on starting ME with -clean :
    https://www.genuitec.com/forums/topic/troubleshoot-using-the-clean-command-line-argument/

    6) Check for any errors logged in the .log file. Paste them here for me.

    Let me know how this works for you.

    #316127 Reply

    ifmEssen
    Participant

    1) Build id: 9.0-20110318
    2) I installed the All-in-one package on a new system
    3) I am running Windows 7 professional. No SpringSource Tools installed.
    4) Deleting java files or jsp’s is not a problem. Only experienced this with jars
    5) Running MyEclipse with -clean option issues the same problem.
    6) After trying to replace an existing jar file within my project with a newer version, the following was logged in the error log:

    
    !ENTRY org.eclipse.core.resources 4 273 2011-04-18 13:56:08.883
    !MESSAGE Problems encountered while deleting resources.
    !SUBENTRY 1 org.eclipse.core.resources 4 273 2011-04-18 13:56:08.883
    !MESSAGE Could not delete 'C:\Development\Workspaces\ws_liferay_cportal\liferay-plugins-sdk-6.0.5\portlets\xxxxx-portlet\docroot\WEB-INF\lib\xxxxx-ejb-interfaces.jar'.
    !STACK 1
    org.eclipse.core.runtime.CoreException: Problems encountered while deleting files.
        at org.eclipse.core.internal.filesystem.local.LocalFile.delete(LocalFile.java:125)
        at org.eclipse.core.internal.resources.ResourceTree.internalDeleteFile(ResourceTree.java:304)
        at org.eclipse.core.internal.resources.ResourceTree.standardDeleteFile(ResourceTree.java:785)
        at org.eclipse.team.internal.ccvs.core.util.MoveDeleteHook$1.run(MoveDeleteHook.java:62)
        at org.eclipse.team.internal.ccvs.core.resources.EclipseSynchronizer.performMoveDelete(EclipseSynchronizer.java:1710)
        at org.eclipse.team.internal.ccvs.core.util.MoveDeleteHook.deleteFile(MoveDeleteHook.java:57)
        at org.eclipse.team.internal.core.MoveDeleteManager.deleteFile(MoveDeleteManager.java:50)
        at org.eclipse.core.internal.resources.Resource.unprotectedDelete(Resource.java:1935)
        at org.eclipse.core.internal.resources.Resource.delete(Resource.java:786)
        at org.eclipse.core.internal.resources.Resource.delete(Resource.java:745)
        at org.eclipse.jdt.internal.corext.refactoring.changes.CopyResourceChange.deleteIfAlreadyExists(CopyResourceChange.java:113)
        at org.eclipse.jdt.internal.corext.refactoring.changes.CopyResourceChange.perform(CopyResourceChange.java:73)
        at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278)
        at org.eclipse.jdt.internal.corext.refactoring.changes.DynamicValidationStateChange.access$0(DynamicValidationStateChange.java:1)
        at org.eclipse.jdt.internal.corext.refactoring.changes.DynamicValidationStateChange$1.run(DynamicValidationStateChange.java:98)
        at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39)
        at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
        at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:4777)
        at org.eclipse.jdt.internal.corext.refactoring.changes.DynamicValidationStateChange.perform(DynamicValidationStateChange.java:101)
        at org.eclipse.jdt.internal.corext.refactoring.reorg.JavaCopyProcessor$1.perform(JavaCopyProcessor.java:112)
        at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278)
        at org.eclipse.ltk.core.refactoring.PerformChangeOperation$1.run(PerformChangeOperation.java:258)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
        at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:306)
        at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:223)
        at org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper$Operation.run(RefactoringExecutionHelper.java:106)
        at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39)
        at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
        at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:4777)
        at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:106)
        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.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:191)
        at org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper.perform(RefactoringExecutionHelper.java:151)
        at org.eclipse.jdt.internal.ui.refactoring.reorg.ReorgCopyStarter.run(ReorgCopyStarter.java:68)
        at org.eclipse.jdt.internal.ui.refactoring.reorg.PasteAction$JavaElementAndResourcePaster.paste(PasteAction.java:1314)
        at org.eclipse.jdt.internal.ui.refactoring.reorg.PasteAction.run(PasteAction.java:270)
        at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
        at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
        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$5.handleEvent(ActionContributionItem.java:411)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
        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)
        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 com.genuitec.pulse.eclipse.launcher.Main.main(Main.java:110)
    Contains: Could not delete: C:\Development\Workspaces\ws_liferay_cportal\liferay-plugins-sdk-6.0.5\portlets\xxxxx-portlet\docroot\WEB-INF\lib\xxxxx-ejb-interfaces.jar.
    !SUBENTRY 2 org.eclipse.core.filesystem 4 273 2011-04-18 13:56:08.883
    !MESSAGE Problems encountered while deleting files.
    !SUBENTRY 3 org.eclipse.core.filesystem 4 273 2011-04-18 13:56:08.883
    !MESSAGE Could not delete: C:\Development\Workspaces\ws_liferay_cportal\liferay-plugins-sdk-6.0.5\portlets\xxxxx-portlet\docroot\WEB-INF\lib\xxxxx-ejb-interfaces.jar.
    
    #316152 Reply

    support-swapna
    Moderator

    ifmEssen,

    Thanks for the information.

    Can you answer some more questions for me?

    1) What kind of a project it is? Are the jars located in the WEB-INF folder?

    2) When does this problem occur ? Is it straight after starting MyEclipse or after deploying the project or after running the project ?

    3) How are you trying to replace the jar? Do you see the same issue if you do a copy in Windows but a paste in MyEclipse ?

    #316166 Reply

    ifmEssen
    Participant

    1) It is a web project built for liferay portal using the liferay-portal-sdk toolset. The “WebRoot” property is set to a folder called “docroot”. The jars are in the WEB-INF/lib folder.
    2) The problem occurs in most cases straight after start of MyEclipse. However, I managed to copy the jars files one or two times when I did it directly after start. Cannot reproduce it now.
    3) I tried to do copy&paste within MyEclipse. Interesting: When I use Windows Explorer for copy and paste the jar into MyEclipse, it seems to work. Nice workaround 😉

    #316195 Reply

    support-swapna
    Moderator

    ifmEssen,

    I am unable to replicate it at my end. Glad that the workaround works for you.
    Do let us know if you have any other issues.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: MyEclipse 9 holds exclusive file access to jar files

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