You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tibor Digana (JIRA)" <ji...@apache.org> on 2019/04/01 14:02:00 UTC
[jira] [Commented] (SUREFIRE-1427) Surefire-plugin throws
NoClassDefFoundError with static initialiser
[ https://issues.apache.org/jira/browse/SUREFIRE-1427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16806780#comment-16806780 ]
Tibor Digana commented on SUREFIRE-1427:
----------------------------------------
[~mgainty@hotmail.com]
This stil does not help me.
I have to see the "test classpath" from the logs.
Run the build "mvn -X test" and the surefire prints classpaths. There are several classpaths, you will see. Pls check it. And which jar is missing from the logs?
> Surefire-plugin throws NoClassDefFoundError with static initialiser
> -------------------------------------------------------------------
>
> Key: SUREFIRE-1427
> URL: https://issues.apache.org/jira/browse/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
> Assignee: Tibor Digana
> Priority: Minor
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> when maven-surefire-plugin encounters static initialiser such as
> public class AxisDescription {
> org.apache.axiom.om.OMFactory omFactory = org.apache.axiom.om.OMAbstractFactory.getOMFactory();
> //surefire throws NoClassDefFoundError on OMAbstractFactory ?!?!?
> //but if i remove static initialiser to wait until runtime to load OMAbstractFactory it loads ok
> org.apache.axis2.description.AxisDescription:
> public void setDocumentation(String documentation) {
> org.apache.axiom.om.OMFactory omFactory = org.apache.axiom.om.OMAbstractFactory.getOMFactory();
> 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
(v7.6.3#76005)