You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "jay vyas (JIRA)" <ji...@codehaus.org> on 2014/03/19 16:45:59 UTC

[jira] (MNG-5603) Excludes tags result in unprovoked ClassNotFound Exceptions

jay vyas created MNG-5603:
-----------------------------

             Summary: Excludes tags result in unprovoked ClassNotFound Exceptions
                 Key: MNG-5603
                 URL: https://jira.codehaus.org/browse/MNG-5603
             Project: Maven 2 & 3
          Issue Type: Bug
            Reporter: jay vyas


My full pom file is here for reference: https://gist.github.com/jayunit100/9644221 (this is a version of hadoop that im playing with in the source code).

Ive found some very odd behaviour in surefire:
{noformat}
mvn test
{noformat}
With the following exclusion filter under the "excludes" tag:
{noformat}
<groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
      <systemPropertyVariables>
        <startKdc>${startKdc}</startKdc>
        <kdc.resource.dir>${kdc.resource.dir}</kdc.resource.dir>
      </systemPropertyVariables>
      <properties>
        <property>
          <name>listener</name>
          <value>org.apache.hadoop.test.TimedOutTestsListener</value>
        </property>
      </properties>
      <excludes>
      <exclude>asbdfoin</exclude>
  </excludes>
    </configuration>
{noformat}
Results in an exception like this:

{noformat}
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test 
(default-test) on project hadoop-common: Execution default-test of goal 
org.apache.maven.plugins:maven-surefire-plugin:2.16:test failed: 
java.lang.NoClassDefFoundError: EmptyRequestProto; nested exception is 
java.lang.NoClassDefFoundError: EmptyRequestProto -> [Help 1]
{noformat}
In otherwords: Exclusion filters can result in NoClassDefFoundError messages, when the exclusion filter doesn't match anything at all.

My question : How could the maven surefire exclusion filter cause a ClassNotFound error to manifest ? If anything, I would expect it to REDUCE the amount of attempts to load classes, not increase them.

FYI, some color on this: The class which is causing this "NotFound" exception itself is an inner class:
{noformat}
public static final class EmptyRequestProto extends com.google.protobuf.GeneratedMessage
{noformat}

I have seen SUREFIRE-988‎, and possibly its related, but I the fact that my "exclude" filter doesnt match ANY class in the code base, it might be distinct.




--
This message was sent by Atlassian JIRA
(v6.1.6#6162)