maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty (JIRA)" <>
Subject [jira] [Created] (SUREFIRE-1427) Surefire-plugin throws NoClassDefFoundError with static initialiser
Date Mon, 02 Oct 2017 13:29:00 GMT
Martin Gainty created SUREFIRE-1427:

             Summary: Surefire-plugin throws NoClassDefFoundError with static initialiser
                 Key: SUREFIRE-1427
             Project: Maven Surefire
          Issue Type: Bug
          Components: Maven Surefire Plugin
    Affects Versions: 2.20
         Environment: jdk 1.8
maven 3.3.3
            Reporter: Martin Gainty
            Priority: Minor

when maven-surefire-plugin encounters static initialiser such as
public class AxisDescription { omFactory =;
//surefire throws NoClassDefFoundError on OMAbstractFactory ?!?!?

//but if i remove static initialiser to wait until runtime to load OMAbstractFactory it loads

  public void setDocumentation(String documentation) { omFactory =;
        if (!"".equals(documentation)) {
            this.documentation = omFactory.createOMText(documentation);

why does surefire not find classes referenced by static initialiser?

This message was sent by Atlassian JIRA

View raw message