Problem description:
Create a Java project in eclipse and use pio3.7 to read the content in the Word Document Table. Use the main method to correctly execute and obtain the table content.
However, if you put the class in the boup project and execute the main method, the following message is displayed:
Exception in thread "Main" Java. Lang. nosuchmethoderror: org. Apache. Poi. poidocument. <init> (lorg/Apache/poi/poifs/filesystem/directorynode;) V
At org. Apache. Poi. hwpf. hwpfdocumentcore. <init> (hwpfdocumentcore. Java: 146)
At org. Apache. Poi. hwpf. hwpfdocument. <init> (hwpfdocument. Java: 218)
At org. Apache. Poi. hwpf. hwpfdocument. <init> (hwpfdocument. Java: 186)
At CN. CCB. boup. util. Poi. operateword. readwordcell (operateword. Java: 37)
At CN. CCB. boup. util. Poi. operateword. Main (operateword. Java: 87)
Open properties-> JAVA build path-> order and export of the project, find that the two jar packages of POI are put to the end, and move the poi package to the top. Solve the problem!
However, after the Weblogic service of the project is started in the boup, after the transaction calls the method implemented above, the following error will be reported: Java. Lang. nosuchmethoderror: org. Apache. Poi. poidocument!
After research, it is found that because the imported pio-3.7.jar conflicts with the class library (poi-3.2-FINAL-20081019.jar) carried by the sup platform itself, in the "sort and export" setting when an error occurs, the imported pio-3.7.jar In the sup platform itself with the class library (poi-3.2-FINAL-20081019.jar), resulting in the boup platform to run the application, the platform based on the poi-3.2-FINAL-20081019.jar, and do not recognize the pio-3.7.jar, sup comes with poi-3.2-FINAL-20081019.jar only provides the Excel operation API, but does not provide the word operation API, so in the real run application, will report: Java. lang. nosuchmethoderror:
Org. Apache. Poi. poidocument error!
Work und: Right-click on the package where the call reads the content of the Word Table, click Properties, go to the sort and export tab, move the location of the pio-3.7.jar over the poi-3.2-FINAL-20081019.jar, as shown in figure 2.