You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2010/12/03 22:14:04 UTC

[jira] Closed: (MNG-4924) Running Maven 2.2.1 in Linux gives nullpointerexception

     [ http://jira.codehaus.org/browse/MNG-4924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-4924.
----------------------------------

    Resolution: Duplicate
      Assignee: Benjamin Bentmann

>From your {{m2.conf}}:
{noformat}
set maven.home /home/vn39238/apache-maven-2.2.1
set MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m"
{noformat}

Those lines violate the syntax of the file. Furthermore, the environment variable {{MAVEN_OPTS}} can't be set this way at all (btw. it was the cause for the error reported as MNG-4865, not the solution). So just stop messing with the Maven installation and live a happy life.

> Running Maven 2.2.1 in Linux gives nullpointerexception
> -------------------------------------------------------
>
>                 Key: MNG-4924
>                 URL: http://jira.codehaus.org/browse/MNG-4924
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Command Line
>    Affects Versions: 2.2.1
>         Environment: Linux, Maven 2.2.1, Hudson, 1.362, JDK 1.6.0_14,
>            Reporter: Debanjan Chakraborty
>            Assignee: Benjamin Bentmann
>         Attachments: mvnjira.zip
>
>
> Our requirement is to be able to invoke application builds using Maven. The invokation would be done from Hudson (running as a webapp on Glassfish App Server). We have been able to get this config up and running in Windows XP using a sample project. However, when we try to do the same thing in Linux, we get the following stacktrace (both when I try to run MVN install from BASH as well as from Hudson Console). In fact, we get the stacktrace even when we try to verify the Maven version from command line (using "mvn --version")
> Started by user anonymous
> [workspace] $ /home/vn39238/apache-maven-2.2.1/bin/mvn -f /home/vn39238/PATWITHMAVEN/PATEJB/pom.xml install
> java.lang.NullPointerException: key can't be null
> 	at java.lang.System.checkKey(System.java:771)
> 	at java.lang.System.getProperty(System.java:647)
> 	at org.codehaus.classworlds.Configurator.configure(Configurator.java:240)
> 	at org.codehaus.classworlds.Launcher.configure(Launcher.java:156)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:426)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Finished: FAILURE
> The M2_HOME (/home/vn39238/apache-maven-2.2.1) and JAVA_HOME(/usr/java/jdk1.6.0_14) have been set in the environment. In spite of that, this error occurs. 
> I was looking for some more info on troubleshooting and came across this thread:
> http://jira.codehaus.org/browse/MNG-4865?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel 
> However, in spite of doing this, the problem still remains. Attached is the m2.conf and the mvn file. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira