facebook

How to clear and reset the maven dependencies in MyEclipse 9

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #320755 Reply

    gang.yang
    Member

    Hi,

    For whatever the reason, my MyEclipse 9 project got into a state where the “Problems” tag shows that it’s missing a mavent dependency, which is right there in the local maven repository. When I tried to clean and rebuild the project, there was an error about mssing class, which is also not true. I think MyEclipse is messed up internall states.

    How can I clear MyEclipse internal states and reset it as if it were a new project so that I can build?

    Thanks,
    Gang

    #320767 Reply

    support-swapna
    Moderator

    Gang,

    Sorry that you are seeing this issue with MyEclipse.

    1) Can you share your Build ID from Help > About MyEclipse Enterprise Edition > Build ID ? Paste the Build ID here.

    2) Can you please switch to a new workspace, import the project from the old workspace and check if the issue persists ?

    3) If you still see the issue, please send us more details about the kind of project and if you have imported it from elsewhere. Can you also check the .log file which is located at <workspace dir>/.metadata/.log for any errors of interest and paste them here for us ?

    4) Also attach a screenshot of the errors to help us get a visual of the issue you are seeing.

    #320779 Reply

    gang.yang
    Member

    Hi, Swapna,

    Thanks for the reply.

    1) The Build ID is 9.1-20110701.

    2) I’ll try to start a new workspace later. It’s huge workspace and it’ll take some time to rebuiuld it from scratch.

    3) I looked at the log file and found some MyEclipse’s internal messages that may indicate what may have caused the compilation or dependency problems. Attached at the end of this message is section of the log that corresponds to a start/end session of MyEclipse. Notice the resource linking error: ” !MESSAGE Cannot create linked resource ‘/.org.eclipse.jdt.core.external.folders/.link1’. Files cannot be linked to folders”. Not sure what resource MyEclipse is trying to link and why it failed.

    4) Will try to capture the screen later.

    More configuration and env info: I’m running VMWare Workstation 8 on Windows 7. The guest OS is Windows 2008 R2. The VMWare virtual machine resides on an USB 3.0 external HD.

    Gang

    ——————————- start of log
    !SESSION 2011-10-28 17:42:51.396 ———————————————–
    eclipse.buildId=unknown
    java.version=1.6.0_13
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
    Command-line arguments: -os win32 -ws win32 -arch x86_64 -clean -data C:\Projects\TS3\TS3Workspace

    !ENTRY org.eclipse.osgi 0 0 2011-10-28 17:42:51.926
    !MESSAGE The -clean (osgi.clean) option was not successful. Unable to clean the storage area: C:\Java\MyEclipse\MyEclipse 9\configuration\org.eclipse.osgi

    !ENTRY org.eclipse.equinox.registry 2 0 2011-10-28 17:42:55.608
    !MESSAGE The extensions and extension-points from the bundle “org.eclipse.epf.richtext” are ignored. The bundle is not marked as singleton.

    !ENTRY org.eclipse.jface 2 0 2011-10-28 17:43:05.374
    !MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation.
    !SUBENTRY 1 org.eclipse.jface 2 0 2011-10-28 17:43:05.374
    !MESSAGE A conflict occurred for CTRL+F9:
    Binding(CTRL+F9,
    ParameterizedCommand(Command(org.eclipse.mylyn.tasks.ui.command.activateTask,Activate Task,
    ,
    Category(org.eclipse.ui.category.navigate,Navigate,null,true),
    ,
    ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,,,system)
    Binding(CTRL+F9,
    ParameterizedCommand(Command(RunSQLAction,Run SQL,
    Run SQL,
    Category(org.eclipse.ui.category.edit,Edit,null,true),
    ,
    ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,,,system)
    !SUBENTRY 1 org.eclipse.jface 2 0 2011-10-28 17:43:05.374
    !MESSAGE A conflict occurred for SHIFT+DEL:
    Binding(SHIFT+DEL,
    ParameterizedCommand(Command(org.eclipse.datatools.sqltools.result.removeAllInstances,Remove All Visible Results,
    ,
    Category(org.eclipse.datatools.sqltools.result.category,SQL Results View,null,true),
    ,
    ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,,,system)
    Binding(SHIFT+DEL,
    ParameterizedCommand(Command(org.eclipse.ui.edit.cut,Cut,
    Cut the selection to the clipboard,
    Category(org.eclipse.ui.category.edit,Edit,null,true),
    org.eclipse.ui.internal.handlers.WidgetMethodHandler@7186fe17,
    ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.dialogAndWindow,,,system)
    Binding(SHIFT+DEL,
    ParameterizedCommand(Command(org.topcased.modeler.deleteModelObject,Delete From Model,
    Allows the user to delete the selected graph element and its associated model element in a Topcased editor.,
    Category(org.eclipse.ui.category.edit,Edit,null,true),
    ,
    ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,,,system)

    !ENTRY org.eclipse.jdt.core 4 4 2011-10-28 17:44:13.592
    !MESSAGE Exception while initializing all containers
    !STACK 1
    org.eclipse.core.internal.resources.ResourceException: Cannot create linked resource ‘/.org.eclipse.jdt.core.external.folders/.link1’. Files cannot be linked to folders.
    at org.eclipse.core.internal.resources.Resource.assertLinkRequirements(Resource.java:185)
    at org.eclipse.core.internal.resources.Resource.createLink(Resource.java:655)
    at org.eclipse.core.internal.resources.Resource.createLink(Resource.java:629)
    at org.eclipse.jdt.internal.core.ExternalFoldersManager.createLinkFolder(ExternalFoldersManager.java:126)
    at org.eclipse.jdt.internal.core.ExternalFolderChange.updateExternalFoldersIfNecessary(ExternalFolderChange.java:47)
    at org.eclipse.jdt.internal.core.ChangeClasspathOperation.classpathChanged(ChangeClasspathOperation.java:62)
    at org.eclipse.jdt.internal.core.SetContainerOperation.executeOperation(SetContainerOperation.java:110)
    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.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:793)
    at org.eclipse.jdt.internal.core.JavaModelManager$11.run(JavaModelManager.java:2637)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
    at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:2653)
    at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1845)
    at org.eclipse.jdt.core.JavaCore.initializeAfterLoad(JavaCore.java:3463)
    at org.eclipse.jdt.internal.ui.InitializeAfterLoadJob$RealJob.run(InitializeAfterLoadJob.java:35)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    !SUBENTRY 1 org.eclipse.core.resources 4 276 2011-10-28 17:44:13.592
    !MESSAGE Cannot create linked resource ‘/.org.eclipse.jdt.core.external.folders/.link1’. Files cannot be linked to folders.

    !ENTRY org.maven.ide.eclipse 4 0 2011-10-28 17:46:12.527
    !MESSAGE Build errors for ArmyC2Utils
    !STACK 0
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project ArmyC2Utils: Compilation failure
    C:\Projects\TS3\TS3Workspace\ArmyC2Utils\src\main\java\mil\army\security\utils\security\Pkcs11Utils.java:[74,34] package sun.security.pkcs11 does not exist

    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:581)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:324)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:247)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
    at org.maven.ide.eclipse.internal.embedder.MavenImpl.execute(MavenImpl.java:218)
    at org.maven.ide.eclipse.internal.project.GenericBuildParticipant.executePostBuild(GenericBuildParticipant.java:139)
    at org.maven.ide.eclipse.internal.project.GenericBuildParticipant.build(GenericBuildParticipant.java:78)
    at org.maven.ide.eclipse.internal.builder.MavenBuilder.build(MavenBuilder.java:153)
    at com.genuitec.eclipse.maven.project.MyEclipseMavenBuilder.build(MyEclipseMavenBuilder.java:24)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:362)
    at org.eclipse.core.internal.resources.Project$1.run(Project.java:545)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
    at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:524)
    at org.eclipse.core.internal.resources.Project.build(Project.java:115)
    at org.eclipse.ui.actions.BuildAction.invokeOperation(BuildAction.java:222)
    at org.eclipse.ui.actions.WorkspaceAction.execute(WorkspaceAction.java:162)
    at org.eclipse.ui.actions.WorkspaceAction$2.runInWorkspace(WorkspaceAction.java:483)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
    C:\Projects\TS3\TS3Workspace\ArmyC2Utils\src\main\java\mil\army\security\utils\security\Pkcs11Utils.java:[74,34] package sun.security.pkcs11 does not exist

    at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516)
    at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:577)
    … 26 more

    ————————————————

    #320785 Reply

    support-tony
    Keymaster

    Gang,

    There are a few errors in the log which might indicate several problems. The message about the -clean not working may indicate a corrupted installation. It might be worth repairing the installation by running the installer again and then selecting the repair option when it is offered. This should be quite quick.

    However, the error you noticed regarding the linked file/folder might be due to a corrupt workspace. Note that you can export your settings from the current workspace and import them into a new workspace (this can be done via the wizard run from File->Switch Workpace, also). Also, you can import all projects from another workspace at the same time, rather than one by one. If you still see this problem after switching workspaces, can you attach the full log as a file, and please attach the installation details from MyEclipse->Installation Summary->Installation Details.

    From your environment description, I assume that you are running MyEclipse on Windows Server 2008 R2, on a virtual machine. Is that right? This shouldn’t matter but it’s good to have the full information.

    #320800 Reply

    gang.yang
    Member

    Hi, Tony,

    Thanks for looking into this. I followed your instructions and did the following:

    1. Re-installed MyEclipse 9 using repair option with “fixing exsting”
    2. Tried to switch workspace copying settings. It only copied GUI setting, such as window panels arragement, but did not copy other configurations, such as Installed RJE and Mavin plugins.
    3. So I deleted the .metatdata and created a new workspace from scratch and imported all projects.

    But this did not fix the problem. I staill have almost all project marked with red “!” with a lot of errors. And I can compile because it failed with missing classes, which is in the installed JDK libraries.

    Attached is the .log file renamed to dotLog.txt and the Installation Details.

    Earlier I did notice that if I close some of the projects, I could get rid of the problem. I’m wondering if MyEclipse has a limit (or unknow limit) on number of projects tha can be opened at the same time. The .log indicates some thread locking problems. No sure if it’s a load issue.

    Thanks,
    Gang

    Attachments:
    You must be logged in to view attached files.
    #320801 Reply

    gang.yang
    Member

    Sorry, the Installation Details file is empty. Try again.

    Gang

    Attachments:
    You must be logged in to view attached files.
    #320832 Reply

    Brian Fernandes
    Moderator

    Gang,

    1) The amount of resources you can have in your workspace should be limited by the amount of memory you have assigned to MyEclipse, but I know with our default settings you could easily have hundreds of projects with thousands of resources. I have no idea how large your workspace is, but you could try editing the myeclipse.ini file (in the same directory as myeclipse.exe) and increase the Xmx and permgen values.

    2) We’ve improved our Maven support in MyEclipse 10 and you may want to use that. MyEclipse 10 was released yesterday.

    3) To help analyze the problem can you reduce your workspace to the state where you have the least number of representative problems? After this, can you tell us what the actual problems are exactly? To clarify, I’m talking about problems in the problems view and not in the error log.

    The red ! does indicate a build error due often to missing dependencies where it won’t even attempt to build the project, as opposed to coding / compilation errors which appear as a red cross. There should be some obvious build issues, it may very well be a few missing dependencies as you have already indicated.

    4) The dependencies are stored locally in the <user.home>\.m2 folder. You could actually trace the JAR you are missing to that folder, perhaps it is corrupt or actually does not exist. If you delete the containing folder, the next time MyEclipse attempts to resolve that dependency it should re-download it. You could also rename / delete the .m2 folder itself and force MyEclipse to re-download all dependencies.

    5) What JRE do you have set up at Window > Preferences > Java > Installed JREs? Is this a JDK or a JRE? You may want to make sure this is a JDK. Similarly, also ensure that you have the same JDK selected on the Maven preference page, just to avoid confusion.

    Hope this helps

    #320834 Reply

    gang.yang
    Member

    Hi, Brian,

    Thanks for the reply. I’ve recovered my development env by a full system restore. After that, MyEclipse is working fine and handling the same number of projects w/o problem. So it must have been some kind of more fundamental damages to my over all system that caused the problem.

    Still to clarify the problem and help others in case they experience similar problem, let me summarize the problem again in here:

    My dev env is a guest Windows 2008 R2 virtial machine (running VMware Workstation 7.1.4) hosted on Windows 7 x64. The JDK used was 1.6.26 for both MyEclipse and Maven.

    The problems occurred after I upgraded VMware Workstation and the virtual machine image to 8.0. After experiencing some crashes of the VMware Workstation and stablized the system, MyEclipse start to give the problems.

    The MyEclipse problems included both missing Maven dependencies, which indicated by red “!” and missing class compilation erros, which is indicated by red cross. But I verified both the missing dependencies and the missing classes to be NOT true. After all, these are the existing, known-to-work dependencies and JDK classes. Of course I did not check if the jar files were corrupted.

    I did try to revert VMware Workstation back to 7.1.4 and it did not help.

    Any way, the problems is cleared by restoring my system to an earlier point in time. This includes back to VMware Workstation 7.1.4 and earlier content of maven repository.

    Thanks again for looking into the problem,
    Gang

    #320852 Reply

    support-tony
    Keymaster

    Gang,

    Thanks for sharing your observations. It’s often the case that if something that was working stops working, a system, software or programming change are the most likely culprits.

    I’m glad it’s all working for you again.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: How to clear and reset the maven dependencies in MyEclipse 9

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

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