This document was written by a renxiong on the Internet. It is very useful and saved. An error occurs when you use axis2_codegen_wizard. When you click Finish in the last step, an error is reported-java. Lang. Reflect. invocationtargetexception. I checked the online information and found many reasons for this problem. Compared with the code generation plug-in of axis2, the solution was found on a foreign forum and tried to be effective:
1. In the axis2-1.4.1-war/axis2/WEB-INF/lib directory, copy
Backport-util-concurrent-3.1.jar
Geronimo-stax-api_1.0_spec-1.0.1.jar
These two files are stored in myeclipse 6.5/Eclipse/plugins/axis2_codegen_wizard_1.3.0/lib, and you need to edit the plugin under myeclipse 6.5/Eclipse/plugins/axis2_codegen_wizard_1.3.0. XML, add these two files (copy and paste the two files, modify the JAR file name to the new token file name), and then use the codegen plug-in to generate code normally.
2. If the problem persists, try to change the JRE used by ECLIPSE, use JRE 1.6, and restart eclipse.
3. If the problem persists, delete the axis2_codegen_wizard directory under $ workspace location/. Metadata/. plugins, switch to the $ eclipse_home directory under the command line, and then execute: eclipse-clear
4. Restart eclipse to solve the problem.
At last, I encountered another exception: exception in thread "Main" org. apache. axis2.wsdl. codegen. codegenerationexception, no one actually solves this problem. I did it myself and finally got it. I analyzed the cause of this error.
The reason is: The axis2_codegen_wizard that was originally installed is wrong, that is, it was downloaded from the official website, but after the installation, it will report Java. lang. reflect. invocationtargetexception, so that the Code cannot be correctly generated. After installing the modified axis2_codegen_wizard plug-in without a bug, follow the steps above to complete the operation. This is simple.
Note: take a closer look at the project. when testing the program, check whether Tomcat is on. If you are not on, report an error, more time is wasted.
Troubleshooting of myeclipse8.0 axis2 plugin installation error: Java. Lang. Reflect. invocationtargetexception