axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Schöning (JIRA) <>
Subject [jira] [Created] (AXIS2-5747) NullPointerException in DeploymentFileData.getName on failed tests
Date Mon, 14 Mar 2016 09:57:33 GMT
Thorsten Schöning created AXIS2-5747:

             Summary: NullPointerException in DeploymentFileData.getName on failed tests
                 Key: AXIS2-5747
             Project: Axis2
          Issue Type: Bug
          Components: kernel
    Affects Versions: 1.7.1
         Environment: Windows 8.1 x86-64, jdk1.7.0_80 x86-64
            Reporter: Thorsten Schöning

I tried to build 1.7.1 from src using mvn and get the following NullPointerException:

Running org.apache.axis2.transport.http.SimpleHTTPServerTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.318 sec <<< FAILURE!
 Time elapsed: 0.317 sec  <<< ERROR!
java.lang.NullPointerException: null
        at org.apache.axis2.deployment.repository.util.DeploymentFileData.getName(
        at org.apache.axis2.deployment.ModuleDeployer.deoloyFromUrl(
        at org.apache.axis2.deployment.ModuleDeployer.deploy(
        at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(
        at org.apache.axis2.deployment.DeploymentEngine.doDeploy(
        at org.apache.axis2.deployment.repository.util.WSInfoList.update(
        at org.apache.axis2.deployment.RepositoryListener.update(
        at org.apache.axis2.deployment.DeploymentEngine.loadRepositoryFromURL(
        at org.apache.axis2.transport.CustomAxisConfigurator.getAxisConfiguration(
        at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(
        at org.apache.axis2.transport.UtilsTransportServer.<init>(
        at org.apache.axis2.transport.testkit.axis2.endpoint.AxisTestEndpointContext.setUp(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.apache.axis2.transport.testkit.tests.TestResource$MethodInvocation.execute(
        at org.apache.axis2.transport.testkit.tests.TestResource.setUp(
        at org.apache.axis2.transport.testkit.tests.TestResourceSet.setUp(
        at org.apache.axis2.transport.testkit.tests.TestResourceSet.setUp(

ModuleDeployer.deoloyFromUrl is failing for some reason and instead of logging a proper error
message it tries to access deploymentFileData.getName(), which throws a NPE.

public String getName() {
    return file.getName(); // No need to check for null due to constructor check

Please recognize the comment, which makes false claims about a null-check:

public DeploymentFileData(File file) {
    this.file = file;

So from my point of view getName or the CTR needs to be made null safe, so the caller can
easier log error messages when things fail for any resons, like in my test run. Currently
the NPE is hiding the root cause for the failing test.

The code is still the same in trunk, but I don't know if the test fails there as well, because
it fails in my case for other reasons already before that test.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message