Scriptella:使用Jaybird的ResourceException

时间:2013-12-03 01:19:41

标签: linux ubuntu scriptella 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 / JATROPHA / 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>

批处理命令的脚本var $ _SCRIPTELLA_CP scriptella / scriptella-1.1 / bin / scriptella.sh导致

:/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

非常感谢任何帮助。 提前谢谢。

2 个答案:

答案 0 :(得分:2)

您缺少必需的依赖项connector-api-1.5.jar,或者您需要使用jaybird-full-2.2.3.jar(包括正常的Jaybird和connector-api)。请参阅releasenotes of Jaybird 2.2.3

答案 1 :(得分:1)

错误意味着您可能会错过类路径上的其他J2EE类。尝试从http://www.firebirdsql.org/en/jdbc-driver/下载mini-j2ee.jar并将其添加到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"