问题描述
- 在web应用中使用kettle报错
-
事先使用kettle的工具写好一个转换.xml,然后使用java执行它,完全没问题。但是我把调用代码移到web应用中调用就出错了。求大神解答。错误:
Caused by: java.lang.NoClassDefFoundError: org/scannotation/AnnotationDB at org.pentaho.di.core.plugins.BasePluginType.findAnnotatedClassFiles(BasePluginType.java:237) at org.pentaho.di.core.plugins.BasePluginType.registerPluginJars(BasePluginType.java:500) at org.pentaho.di.core.plugins.BasePluginType.searchPlugins(BasePluginType.java:115) at org.pentaho.di.core.plugins.PluginRegistry.init(PluginRegistry.java:420) at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:121) at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:68) at com.zj.kettle.KettleRunner.runTransformation(KettleRunner.java:53) at com.zj.quartz.KettleQuartzJob.execute(KettleQuartzJob.java:31) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) ... 1 more Caused by: java.lang.ClassNotFoundException: org.scannotation.AnnotationDB at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1856) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1705) ... 10 more
解决方案
缺少jar包吧,,找个jar包放进去不就行了吗
解决方案二:
少了个scannotation.jar 。晕倒。之前用普通的java工程运行没问题,以为不可能是jar包的问题。
时间: 2024-10-02 15:27:59