0

现在我使用 smooks 将 csv 文件转换为 java 所以我得到了 Exception No ClassLoaders found for: au.com.bytecode.opencsv.CSVReader ,

我得到异常是

  15:03:41,263 ERROR [STDERR] org.milyn.SmooksException: Smooks Filtering operation failed.
15:03:41,264 ERROR [STDERR]     at org.milyn.Smooks._filter(Smooks.java:538)
15:03:41,264 ERROR [STDERR]     at org.milyn.Smooks.filterSource(Smooks.java:475)
15:03:41,264 ERROR [STDERR]     at com.manam.mobee.migrationCustomerManagement.MigrationCustomerHome.runSmooksTransform(MigrationCustomerHome.java:76)
15:03:41,264 ERROR [STDERR]     at com.manam.mobee.migrationCustomerManagement.MigrationCustomerHome.displyTempCustomers(MigrationCustomerHome.java:115)
15:03:41,264 ERROR [STDERR]     at com.manam.mobee.migrationCustomerManagement.MigrationCustomerHome.listener(MigrationCustomerHome.java:144)
Caused by: java.lang.NoClassDefFoundError: au/com/bytecode/opencsv/CSVReader
15:03:41,268 ERROR [STDERR]     at org.milyn.csv.CSVReader.parse(CSVReader.java:314)
15:03:41,268 ERROR [STDERR]     at org.milyn.delivery.sax.SAXParser.parse(SAXParser.java:70)
15:03:41,268 ERROR [STDERR]     at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:75)
15:03:41,268 ERROR [STDERR]     at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:61)
15:03:41,268 ERROR [STDERR]     at org.milyn.Smooks._filter(Smooks.java:516)
15:03:41,269 ERROR [STDERR]     ... 92 more
15:03:41,269 ERROR [STDERR] Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: au.com.bytecode.opencsv.CSVReader
15:03:41,269 ERROR [STDERR]     at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
15:03:41,269 ERROR [STDERR]     at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
15:03:41,269 ERROR [STDERR]     at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
15:03:41,269 ERROR [STDERR]     at java.lang.ClassLoader.loadClass(Unknown Source)
15:03:41,269 ERROR [STDERR]     ... 97 more
4

1 回答 1

0

可能您的类路径中缺少 opencsv-XX.jar(XX 代表 opencsv 版本,例如:1.6 或 1.7)。或者它不在您的容器看到它的正确位置(检查 WEB-INF/lib)。

于 2012-10-28T12:22:33.130 回答