[
https://jira.codehaus.org/browse/MECLIPSE-550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=307374#comment-307374
]
Aleksandr Panzin commented on MECLIPSE-550:
-------------------------------------------
This is still a problem with Maven 3.0.4 and maven-eclipse-plugin:2.9
> multiple JREs can cause NullPointerException with mvn eclipse:eclipse
> ---------------------------------------------------------------------
>
> Key: MECLIPSE-550
> URL: https://jira.codehaus.org/browse/MECLIPSE-550
> Project: Maven 2.x Eclipse Plugin
> Issue Type: Bug
> Affects Versions: 2.6
> Environment: XUbuntu 8.10. Eclipse 3.4.2. Maven 2.0.10 later
> updated to Maven 2.1.0.
> Reporter: David Craft
>
> This bug appeared when I changed the version of the maven-eclipse-plugin in
> my pom from 2.5.1 to 2.6. After the change when I would try to run 'mvn
> eclipse:eclipse' on the project, I would get the following stacktrace:
> [INFO] Using Eclipse Workspace: /home/xxxxx/workspace
>
> [INFO]
> ------------------------------------------------------------------------
>
> [ERROR] FATAL ERROR
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO] null
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO] Trace
>
> java.lang.NullPointerException
>
> at
> org.apache.maven.plugin.eclipse.reader.ReadWorkspaceLocations.readAvailableJREs(ReadWorkspaceLocations.java:474)
>
> at
> org.apache.maven.plugin.eclipse.reader.ReadWorkspaceLocations.detectDefaultJREContainer(ReadWorkspaceLocations.java:206)
> at
> org.apache.maven.plugin.eclipse.reader.ReadWorkspaceLocations.init(ReadWorkspaceLocations.java:93)
>
> at
> org.apache.maven.plugin.eclipse.EclipsePlugin.getWorkspaceConfiguration(EclipsePlugin.java:1784)
>
> at
> org.apache.maven.plugin.eclipse.EclipsePlugin.fillDefaultClasspathContainers(EclipsePlugin.java:1350)
>
> at
> org.apache.maven.plugin.eclipse.EclipsePlugin.setup(EclipsePlugin.java:807)
>
> at
> org.apache.maven.plugin.ide.AbstractIdeSupportMojo.execute(AbstractIdeSupportMojo.java:498)
>
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
>
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
>
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
>
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
>
> 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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>
> at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO] Total time: 3 seconds
>
> [INFO] Finished at: Wed Apr 08 10:03:15 EDT 2009
>
> [INFO] Final Memory: 24M/136M
>
> [INFO]
> ------------------------------------------------------------------------
> When I would change the version back to 2.5.1 it would again work fine. In
> eclipse preferences -> java -> Installed JREs I had 4 JREs listed. They were
> (in order) The GCJ, Java-6-sun-1.6, Java-6-sun-1.6.0.10, and another GCJ.
> The one selected was the authentic Sun Java-6-sun-1.6.0.10 version.
> Noticing it was complaining on "readAvailableJREs" I deleted all the unused
> ones. It now worked perfectly.
> ~David
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira