Scriptella: ResourceException with Jaybird



我是Linux/Java/Scriptella的新手,我正在Firebird本地数据库上尝试与Scriptella进行jdbc连接,但我收到了以下错误:

2-dic-2013 1.03.34 <INFO> Execution Progress.Initializing properties: 1%
2-dic-2013 1.03.34 <GRAVE> Script /home/maurizio/Scrivania/JATROPHA/applicazioni/prova_per_scriptella.etl execution failed.
javax/resource/ResourceException
2-dic-2013 1.03.34 <GRAVE> Scriptella bug report. Submit to issue tracker.
Scriptella version: 1.1
Exception:
scriptella.execution.EtlExecutorException: javax/resource/ResourceException
    at scriptella.execution.EtlExecutor.execute(EtlExecutor.java:190)
    at scriptella.tools.launcher.EtlLauncher.execute(EtlLauncher.java:276)
    at scriptella.tools.launcher.EtlLauncher.launch(EtlLauncher.java:193)
    at scriptella.tools.launcher.EtlLauncher.main(EtlLauncher.java:321)
Caused by: java.lang.NoClassDefFoundError: javax/resource/ResourceException
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:270)
    at scriptella.core.DriverFactory.getDriver(DriverFactory.java:53)
    at scriptella.core.ConnectionManager.<init>(ConnectionManager.java:70)
    at scriptella.core.Session.<init>(Session.java:51)
    at scriptella.execution.EtlExecutor.prepare(EtlExecutor.java:248)
    at scriptella.execution.EtlExecutor.execute(EtlExecutor.java:178)
    ... 3 more
Caused by: java.lang.ClassNotFoundException: javax.resource.ResourceException
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
    ... 10 more

我使用的是Ubuntu 10.04 Lucid Lynx。

我通过目录/home/maurizio/Scrivania/JOPHA/applicazioni/中的控制台启动scriptella,命令为scriptella/scriptella-1.1/bin/scriptella.sh-debug"prova_per_scriptella.etl"我的ETL文件prova_per_scriptella.ETL包含以下行:

<!DOCTYPE etl SYSTEM "http://scriptella.javaforge.com/dtd/etl.dtd">
<etl>
  <description>Prova connessione Firebird</description>
  <connection
    id="fb_destination"
    driver="org.firebirdsql.jdbc.FBDriver"
    url="jdbc:firebirdsql:localhost/3050:/home/maurizio/Scrivania/JATROPHA/db/jatrofa.fdb"
    user="user"
    password="password"
    classpath="/home/maurizio/Scrivania/JATROPHA/applicazioni/jaybird/Jaybird-2.2.3JDK_1.6/jaybird-2.2.3.jar"
  />
</etl>

批处理命令SCRIPTELLA/SCRIPTELLA-1.1/bin/SCRIPTELLA.sh的env var$_SCRIPTELLA_CP导致

:/home/maurizio/Scrivania/JATROPHA/applicazioni/scriptella/scriptella-1.1/lib/commons-jexl.jar:
/home/maurizio/Scrivania/JATROPHA/applicazioni/scriptella/scriptella-1.1/lib/commons-logging.jar:
/home/maurizio/Scrivania/JATROPHA/applicazioni/scriptella/scriptella-1.1/lib/jaybird-2.2.3.jar:
/home/maurizio/Scrivania/JATROPHA/applicazioni/scriptella/scriptella-1.1/lib/jsqlparser-0.8.0.jar:
/home/maurizio/Scrivania/JATROPHA/applicazioni/scriptella/scriptella-1.1/lib/scriptella-core.jar:
/home/maurizio/Scrivania/JATROPHA/applicazioni/scriptella/scriptella-1.1/lib/scriptella-drivers.jar:
/home/maurizio/Scrivania/JATROPHA/applicazioni/scriptella/scriptella-1.1/lib/scriptella-tools.jar:
/home/maurizio/Scrivania/JATROPHA/applicazioni/scriptella/scriptella-1.1/lib/sqlsheet-6.5.jar

如有任何帮助,我们将不胜感激。提前谢谢。

您缺少所需的依赖项connector-api-1.5.jar,或者您需要使用jaybird-full-2.2.3.jar(包括普通的Jaybird和连接器api)。参见Jaybird 2.2.3 的发布版本

该错误意味着您可能会错过类路径上的其他J2EE类。尝试从下载mini-j2ee.jarhttp://www.firebirdsql.org/en/jdbc-driver/并将其添加到etl.xml中的classpath属性:

classpath="/path/to/mini-j2ee.jar:/home/maurizio/Scrivania/JATROPHA/applicazioni/jaybird/Jaybird-2.2.3JDK_1.6/jaybird-2.2.3.jar"

相关内容

  • 没有找到相关文章

最新更新