Axis: No engine configuration file - aborting

2019-07-27 08:38发布

问题:

My application - which is a WAR file - calls different web services using Axis. Yesterday we had a strange error regarding to Axis client_config.wsdd file. When we restart the application server (Weblogic 10.3.2), application began to write error logs saying:

org.apache.axis.ConfigurationException: No engine configuration file - aborting!
    at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:175)
    at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
    at org.apache.axis.AxisEngine.<init>(AxisEngine.java:156)
    at org.apache.axis.client.AxisClient.<init>(AxisClient.java:52)
    at org.apache.axis.client.Service.getAxisClient(Service.java:104)
    at org.apache.axis.client.Service.<init>(Service.java:113)

However, there is a client_config.wsdd file in axis.jar. We restarted the application server, the error is gone. How could it be possible that axis couldn't file the wsdd file that is already in axis.jar? Should I do anything to prevent this situation happen again (like copying the same file to WEB-INF/classes or some other folder)?

Thank you

回答1:

I solved this by copying the client_config.wsdd file to WEB-INF/classes folder. Axis did not complaint yet :)



回答2:

Se puede solucionar pasando el Path al constructor de FileProvider

    EngineConfiguration engineConfiguration;
    try {
        engineConfiguration = new FileProvider("Path","client-config.wsdd");
        engine = new AxisClient(engineConfiguration);
    } catch (ConfigurationException e) {

    logger.debug("exception ",e);
    }