MyEclipse 7.1+ – Invalid thread access during Maven import

Home Forums Archived Forums MyEclipse Archived Bugs MyEclipse 7.1+ – Invalid thread access during Maven import

This topic contains 8 replies, has 5 voices, and was last updated by Profile photo of support-swapna support-swapna 4 years, 2 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #296002
    Profile photo of iadams
    iadams
    Member

    General: This issue started after updating to MyEclipse 7.1+ – Worked fine under 7.0GA

    Environment:

    IDE Version(s): MyEclipse 7.1 All-In-One, MyEclipse 7.1.1 Update (based on update from 7.0 or 7.1 All-In-One installs)
    OS: Windows Vista 64-bit
    Java Version(s): Bundled MyEclipse 1.5 JRE, Sun JDK 1.5.x, Sun JDK 1.6.x
    Codebase: AccesStream – http://svn.accesstream.com/accesstream/trunk/ (Maven2 Project with web modules)

    Steps to Reproduce:

    After installing a fresh MyEclipse 7.1 (or 7.1.1 update):

    1) Create a clean workspace (and open it)
    2) Check out head from subversion (if not already on filesystem)
    3) Check “Enable all m2eclipse features” under Window->Preferences->MyEclipse Enterprise Workbench->Maven4MyEclipse
    4) Import full project (accesstream with sub modules) using File->Import->General->Maven Projects

    Outcome:

    This produces a workspace with certain sub-projects (in this example, modules named “testing-shared”, “jaas”, “policy”, “web-admin”, “web-client”) not having project metadata created properly. Manually deleting jaas sub-project and re-importing it fixes the import issue on that project, but there is no workaround for re-import of policy or web project modules (save retrograding to MyEclipse 7.0) at this time.
    ~

    #296015
    Profile photo of iadams
    iadams
    Member

    Update:

    Importing all projects *except* maven2 war projects works (except for a minor hiccup in the policy project import)- Apparently something has gone amok in the Maven4MyEclipse war/web project importing functionality in 7.1+

    #296136
    Profile photo of Loyal Water
    Loyal Water
    Member

    iadams,
    Can you go to <workspace>/.metadata/.log and paste any related errors here for me.

    #296169
    Profile photo of iadams
    iadams
    Member

    No problem:

    !ENTRY org.eclipse.core.jobs 4 2 2009-03-16 19:48:12.127
    !MESSAGE An internal error occurred during: "Importing Maven projects".
    !STACK 0
    org.eclipse.swt.SWTException: Invalid thread access
        at org.eclipse.swt.SWT.error(SWT.java:3777)
        at org.eclipse.swt.SWT.error(SWT.java:3695)
        at org.eclipse.swt.SWT.error(SWT.java:3666)
        at org.eclipse.swt.widgets.Widget.error(Widget.java:463)
        at org.eclipse.swt.widgets.Shell.<init>(Shell.java:276)
        at org.eclipse.swt.widgets.Shell.<init>(Shell.java:365)
        at org.eclipse.jface.window.Window.createShell(Window.java:487)
        at org.eclipse.jface.window.Window.create(Window.java:430)
        at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
        at org.eclipse.jface.window.Window.open(Window.java:790)
        at org.eclipse.jface.dialogs.MessageDialog.openQuestion(MessageDialog.java:371)
        at com.genuitec.eclipse.j2eedt.core.builder.WebProjectConverter.basicConvert(Unknown Source)
        at com.genuitec.eclipse.j2eedt.core.builder.WebProjectConverter.convert(Unknown Source)
        at com.genuitec.eclipse.maven.project.MyEclipseProjectSupport$1.run(MyEclipseProjectSupport.java:83)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1782)
        at com.genuitec.eclipse.maven.project.MyEclipseProjectSupport.configureWebProject(MyEclipseProjectSupport.java:107)
        at com.genuitec.eclipse.maven.project.MyEclipseProjectSupport.configure(MyEclipseProjectSupport.java:58)
        at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:232)
        at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.configureNewMavenProject(ProjectConfigurationManager.java:186)
        at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.importProjects(ProjectConfigurationManager.java:144)
        at org.maven.ide.eclipse.wizards.MavenImportWizard$1.runInWorkspace(MavenImportWizard.java:92)
        at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    #296210

    Importing Maven projects using m2eclipse wizard is not supported. Recommended approach would be to create a new MyEclipse web project with Maven support and properly migrate the contents of the old one.

    #296368
    Profile photo of iadams
    iadams
    Member

    Unfortunately, that won’t be an option for us – Considering our project has a large number of modules including three maven2 war projects (probably more to come), all checked in to Subversion (using the maven2-recommended directory structure, of course), hacking the web projects to use the Maven4MyEclipse/MyEclipse web project structure and breaking the maven2 and Subversion checkin would create too much extra work for contributors. We need them to be able to check out the project, import into their workspace, and start coding. In 7.0, this was a reality – Not so much in 7.1.

    Clearly, this is not a supported feature for now (but probably should be ASAP), so I’ve documented a few key steps that allow a best-practices maven2 project with war modules to work in MyEclipse 7.1+:

    * Import everything that isn’t a web project first (jar and pom)
    * Import maven2 war projects one-at-a-time using m2eclipse import wizard (imports will fail, but they will *mostly* work)
    * Manually add web project capabilities to each maven2 war project using MyEclipse context menu
    * Remove the ** exclude filter from the main/resources in the build path (to allow resources to be deployed to WEB-INF/classes properly), but add a **/.svn exclude filter to prevent deployment of Subversion dirs
    * Update dependencies and clean all projects in the workspace

    This allows us to keep everything in the same directory structure as was checked out from Subversion and projects are still fully Maven2 compatible, allowing seamless integration with Hudson and other external build tools. The bummer is that this all worked automatically in 7.0 – Any chance *full* Maven2 functionality will make it to the “Supported” list soon? Recent builds of the m2eclipse are great and work as expected with standard Maven2 projects – no modification required.

    #299788
    Profile photo of iadams
    iadams
    Member

    Still broken in 7.5, but the workaround above still works.

    #315015
    Profile photo of gbrinkmann
    gbrinkmann
    Member

    Still broken in 8.6. Happens when opening Maven war projects or when choosing Maven4MyEclipse / Update Project Configuration on a Maven2 war project.

    
    org.eclipse.swt.SWTException: Invalid thread access
        at org.eclipse.swt.SWT.error(SWT.java:3884)
        at org.eclipse.swt.SWT.error(SWT.java:3799)
        at org.eclipse.swt.SWT.error(SWT.java:3770)
        at org.eclipse.swt.widgets.Widget.error(Widget.java:463)
        at org.eclipse.swt.widgets.Shell.<init>(Shell.java:282)
        at org.eclipse.swt.widgets.Shell.<init>(Shell.java:373)
        at org.eclipse.jface.window.Window.createShell(Window.java:487)
        at org.eclipse.jface.window.Window.create(Window.java:430)
        at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
        at org.eclipse.jface.window.Window.open(Window.java:790)
        at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:327)
        at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:357)
        at org.eclipse.jface.dialogs.MessageDialog.openQuestion(MessageDialog.java:456)
        at com.genuitec.eclipse.j2eedt.core.internal.project.B.�(Unknown Source)
        at com.genuitec.eclipse.j2eedt.core.internal.project.B.convert(Unknown Source)
        at com.genuitec.eclipse.maven.project.MyEclipseProjectSupport$1.run(MyEclipseProjectSupport.java:81)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1782)
        at com.genuitec.eclipse.maven.project.MyEclipseProjectSupport.configureWebProject(MyEclipseProjectSupport.java:105)
        at com.genuitec.eclipse.maven.project.MyEclipseProjectSupport.configure(MyEclipseProjectSupport.java:57)
        at org.maven.ide.eclipse.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:57)
        at org.maven.ide.eclipse.internal.project.GenericLifecycleMapping.configure(GenericLifecycleMapping.java:48)
        at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:332)
        at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:318)
        at org.maven.ide.eclipse.actions.UpdateSourcesAction$1.runInWorkspace(UpdateSourcesAction.java:93)
        at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    
    #315057
    Profile photo of support-swapna
    support-swapna
    Moderator

    gbrinkmann,

    1) Can you please share the build id from Help > About MyEclipse Workbench for me to be able to replicate it? Please paste it here.

    2) Did you try the workaround suggested in the above replies ? How did it work for you?

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.