maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Harper (JIRA)" <>
Subject [jira] Created: (SUREFIRE-429) surefire-report plugin not compatible with Jrockit JVM
Date Mon, 14 Jan 2008 22:00:57 GMT
surefire-report plugin not compatible with Jrockit JVM

                 Key: SUREFIRE-429
             Project: Maven Surefire
          Issue Type: Bug
          Components: plugin
    Affects Versions: 2.3.1
         Environment: Linux Jrockit : jrockit-j2sdk1.4.2_08
            Reporter: Brian Harper

When running mvn surefire-report:report (or report-only), I encountered an exception:
[INFO] An error has occurred in Maven Surefire Report report generation.
Embedded error: String index out of range: -44

The stack trace shows the following:
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -44
        at java.lang.String.substring(II)Ljava/lang/String;(Unknown Source)

Looking at the code for, I see that in getErrorLineNumber, the
following code is used to parse the test error report to find the line number:

if ( token.startsWith( className ) )
                int idx = token.indexOf( ":" );
                lineNo = token.substring( idx + 1, token.indexOf( ")" ) );

This works fine if the Sun JVM's stack trace format:

But here's what the stack trace looks like with Jrockit:

Sure enough, if I swith to the Sun JVM and rerun, the report is generated successfully.

The parsing logic should be fixed to look for the last occurence of a close parentheses rather
than the first. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message