Objective:
Before making the CXF interface call, I encountered an error error:unable to find Cxf-manifest.jar when generating the client calling code with the Wsdl2java of CXF.
There was an error while configuring the environment variable, but as a result of many recent internships of new colleagues have encountered this problem, so in the blog record, so that the programmer encounter this problem less toss;
The error is as follows:
In fact, it can be seen from above that the "command environment variable" is configured correctly, otherwise it will be "not an internal command error." ”
So the problem is:cxf in the run/bin directory Wsdl2java need the corresponding dependent jar, and the dependent jar is in the/lib directory;
The environment variable is configured as follows:
The above variable configuration is configured in the CXF/bin directory, referenced in path, it seems that there is no problem, but still error.
Is that
Because the dependent jar under the%cxf_home%/lib directory is automatically run when Wsdl2java is run, that is, the/lib directory is automatically added to the%cxf_home% directory,
However , since the previous cxf_home configuration is E:\cxf_workplace\apache-cxf-3.1.6\bin, is directly configured under the/bin directory, so Cxf went back to find E:\cxf_workplace\ Apache-cxf-3.1.6\bin\lib,
This path must not be found;
So the above error;
Workaround:
Once you know the reason, the solution is simple,
Configure the Cxf_home to: E:\cxf_workplace\apache-cxf-3.1.6
Configure path to:%cxf_home%\bin;
Okay, problem solved.