0

我在我的 Mac 上安装和使用 scriptella 时遇到问题。我下载了二进制文件并将其解压缩。我跑了

export PATH=${PATH}:/Documents/*/*/*/scriptella-1.1/bin

星号是 bin 的其他文件夹。当 echo $PATH 运行时,我也会看到它。

但是当我运行 scriptella 时,它说找不到命令。

我也尝试使用 java 命令运行它。java -jar scriptella-1.1/scriptella.jar etl.xml

我有一个带有两个表的简单 mysql 数据库,我只是想从一个表中选择行

etl.xml 是

<!DOCTYPE etl SYSTEM "http://scriptella.javaforge.com/dtd/etl.dtd">
<etl>
  <connection classpath = "scriptella-1.1/scriptella/driver/mysql/Driver.java" url="jdbc:mysql://localhost:3306/EmpDept" >
      </connection>
      <query >
       SELECT * from Department
       </query>
</etl>

我也尝试使用 driver = "mysql" 而不是 classpath = 但它没有任何区别

感谢您阅读!!!!

长错误信息是这样的:

 LindsayMacbook:MQ llastname$ java -jar scriptella-1.1/scriptella.jar etl.xml
Jan 19, 2019 12:29:12 PM <INFO> Execution Progress.Initializing properties: 1%
Jan 19, 2019 12:29:12 PM <SEVERE> Script /Users/llastname/Documents/Official Stuff/JobStuff/MQ/etl.xml execution failed.
Unable to instantiate driver for class scriptella.driver.mysql.Driver
JDBC provider exception: Couldn't find appropriate jdbc driver : com.mysql.jdbc.Driver. Please check class path settings
Error codes: []
Jan 19, 2019 12:29:12 PM <SEVERE> Scriptella bug report. Submit to issue tracker.
Scriptella version: 1.1
Exception: 
scriptella.execution.EtlExecutorException: Unable to instantiate driver for class scriptella.driver.mysql.Driver
JDBC provider exception: Couldn't find appropriate jdbc driver : com.mysql.jdbc.Driver. Please check class path settings
Error codes: []
    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.IllegalStateException: Unable to instantiate driver for class scriptella.driver.mysql.Driver
    at scriptella.core.DriverFactory.getDriver(DriverFactory.java:98)
    at scriptella.core.DriverFactory.getDriver(DriverFactory.java:58)
    at scriptella.driver.auto.Driver.getConnection(Driver.java:96)
    at scriptella.driver.auto.Driver.connect(Driver.java:77)
    at scriptella.core.ConnectionManager.getConnection(ConnectionManager.java:81)
    at scriptella.core.Session.<init>(Session.java:57)
    at scriptella.execution.EtlExecutor.prepare(EtlExecutor.java:248)
    at scriptella.execution.EtlExecutor.execute(EtlExecutor.java:178)
    ... 3 more
Caused by: scriptella.jdbc.JdbcException: Couldn't find appropriate jdbc driver : com.mysql.jdbc.Driver. Please check class path settings
    at scriptella.jdbc.GenericDriver.loadDrivers(GenericDriver.java:87)
    at scriptella.driver.mysql.Driver.<init>(Driver.java:32)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at scriptella.core.DriverFactory.getDriver(DriverFactory.java:96)
    ... 10 more
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at scriptella.jdbc.GenericDriver.loadDrivers(GenericDriver.java:69)
    ... 17 more
Environment: 
{PATH=/Users/llastname/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Library/TeX/texbin, SHELL=/bin/bash, TERM_PROGRAM=Apple_Terminal, OLDPWD=/Users/llastname/Documents/Official Stuff/JobStuff/MQ/scriptella-1.1, TERM=xterm-256color, USER=llastname, CLASSPATH=:/scriptella-1.1/scriptella.jar, LANG=en_US.UTF-8, TMPDIR=/var/folders/0p/jrjhyxwj7p55n6v46xw0t1d80000gn/T/, SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.OI5TtHKJsp/Listeners, DISPLAY=/private/tmp/com.apple.launchd.SMR8rCaiJS/org.macosforge.xquartz:0, XPC_FLAGS=0x0, JAVA_MAIN_CLASS_25326=scriptella.tools.launcher.EtlLauncher, TERM_SESSION_ID=B56C97D2-8A57-4D29-9B4B-C96B062DD395, __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0, Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.k4wnCt2T8O/Render, LOGNAME=llastname, XPC_SERVICE_NAME=0, PWD=/Users/llastname/Documents/Official Stuff/JobStuff/MQ, TERM_PROGRAM_VERSION=388.1.3, HOME=/Users/llastname, SHLVL=1, _=/Users/llastname/anaconda3/bin/java}
System properties: 
{java.runtime.name=OpenJDK Runtime Environment, sun.boot.library.path=/Users/llastname/anaconda3/jre/lib, java.vm.version=25.121-b15, gopherProxySet=false, java.vm.vendor=Azul Systems, Inc., java.vendor.url=http://www.azulsystems.com/, path.separator=:, java.vm.name=OpenJDK 64-Bit Server VM, file.encoding.pkg=sun.io, user.country=US, sun.java.launcher=SUN_STANDARD, sun.os.patch.level=unknown, java.vm.specification.name=Java Virtual Machine Specification, user.dir=/Users/llastname/Documents/Official Stuff/JobStuff/MQ, java.runtime.version=1.8.0_121-b15, java.awt.graphicsenv=sun.awt.CGraphicsEnvironment, java.endorsed.dirs=/Users/llastname/anaconda3/jre/lib/endorsed, os.arch=x86_64, java.io.tmpdir=/var/folders/0p/jrjhyxwj7p55n6v46xw0t1d80000gn/T/, line.separator=
, java.vm.specification.vendor=Oracle Corporation, os.name=Mac OS X, sun.jnu.encoding=UTF-8, java.library.path=/Users/llastname/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:., java.specification.name=Java Platform API Specification, java.class.version=52.0, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, os.version=10.12.6, http.nonProxyHosts=local|*.local|169.254/16|*.169.254/16, user.home=/Users/llastname, user.timezone=America/New_York, java.awt.printerjob=sun.lwawt.macosx.CPrinterJob, file.encoding=UTF-8, java.specification.version=1.8, java.class.path=scriptella-1.1/scriptella.jar, user.name=llastname, java.vm.specification.version=1.8, sun.java.command=scriptella-1.1/scriptella.jar etl.xml, java.home=/Users/llastname/anaconda3/jre, sun.arch.data.model=64, user.language=en, java.specification.vendor=Oracle Corporation, awt.toolkit=sun.lwawt.macosx.LWCToolkit, java.vm.info=mixed mode, java.version=1.8.0_121, java.ext.dirs=/Users/llastname/Library/Java/Extensions:/Users/llastname/anaconda3/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java, sun.boot.class.path=/Users/llastname/anaconda3/jre/lib/resources.jar:/Users/llastname/anaconda3/jre/lib/rt.jar:/Users/llastname/anaconda3/jre/lib/sunrsasign.jar:/Users/llastname/anaconda3/jre/lib/jsse.jar:/Users/llastname/anaconda3/jre/lib/jce.jar:/Users/llastname/anaconda3/jre/lib/charsets.jar:/Users/llastname/anaconda3/jre/lib/jfr.jar:/Users/llastname/anaconda3/jre/classes, java.vendor=Azul Systems, Inc., file.separator=/, java.vendor.url.bug=http://www.azulsystems.com/support/, sun.io.unicode.encoding=UnicodeBig, sun.cpu.endian=little, socksNonProxyHosts=local|*.local|169.254/16|*.169.254/16, ftp.nonProxyHosts=local|*.local|169.254/16|*.169.254/16, sun.cpu.isalist=}
-----------------------------------------------------------------
LindsayMacbook:MQ llastname$ ls
ETLTestData.tsv etl.xml     scriptella-1.1
LindsayMacbook:MQ llastname$ ls
ETLTestData.tsv etl.xml     scriptella-1.1
LindsayMacbook:MQ llastname$ java -jar scriptella-1.1/scriptella.jar etl.xml
Jan 19, 2019 12:29:49 PM <INFO> Execution Progress.Initializing properties: 1%
Jan 19, 2019 12:29:49 PM <SEVERE> Script /Users/llastname/Documents/Official Stuff/JobStuff/MQ/etl.xml execution failed.
Unable to instantiate driver for class scriptella.driver.mysql.Driver
JDBC provider exception: Couldn't find appropriate jdbc driver : com.mysql.jdbc.Driver. Please check class path settings
Error codes: []
Jan 19, 2019 12:29:49 PM <SEVERE> Scriptella bug report. Submit to issue tracker.
Scriptella version: 1.1
Exception: 
scriptella.execution.EtlExecutorException: Unable to instantiate driver for class scriptella.driver.mysql.Driver
JDBC provider exception: Couldn't find appropriate jdbc driver : com.mysql.jdbc.Driver. Please check class path settings
Error codes: []
    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.IllegalStateException: Unable to instantiate driver for class scriptella.driver.mysql.Driver
    at scriptella.core.DriverFactory.getDriver(DriverFactory.java:98)
    at scriptella.core.DriverFactory.getDriver(DriverFactory.java:58)
    at scriptella.driver.auto.Driver.getConnection(Driver.java:96)
    at scriptella.driver.auto.Driver.connect(Driver.java:77)
    at scriptella.core.ConnectionManager.getConnection(ConnectionManager.java:81)
    at scriptella.core.Session.<init>(Session.java:57)
    at scriptella.execution.EtlExecutor.prepare(EtlExecutor.java:248)
    at scriptella.execution.EtlExecutor.execute(EtlExecutor.java:178)
    ... 3 more
Caused by: scriptella.jdbc.JdbcException: Couldn't find appropriate jdbc driver : com.mysql.jdbc.Driver. Please check class path settings
    at scriptella.jdbc.GenericDriver.loadDrivers(GenericDriver.java:87)
    at scriptella.driver.mysql.Driver.<init>(Driver.java:32)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at scriptella.core.DriverFactory.getDriver(DriverFactory.java:96)
    ... 10 more
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at scriptella.jdbc.GenericDriver.loadDrivers(GenericDriver.java:69)
    ... 17 more
Environment: 
{PATH=/Users/llastname/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Library/TeX/texbin, SHELL=/bin/bash, TERM_PROGRAM=Apple_Terminal, OLDPWD=/Users/llastname/Documents/Official Stuff/JobStuff/MQ/scriptella-1.1, TERM=xterm-256color, USER=llastname, CLASSPATH=:/scriptella-1.1/scriptella.jar, LANG=en_US.UTF-8, TMPDIR=/var/folders/0p/jrjhyxwj7p55n6v46xw0t1d80000gn/T/, SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.OI5TtHKJsp/Listeners, DISPLAY=/private/tmp/com.apple.launchd.SMR8rCaiJS/org.macosforge.xquartz:0, XPC_FLAGS=0x0, TERM_SESSION_ID=B56C97D2-8A57-4D29-9B4B-C96B062DD395, JAVA_MAIN_CLASS_25329=scriptella.tools.launcher.EtlLauncher, __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0, Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.k4wnCt2T8O/Render, LOGNAME=llastname, XPC_SERVICE_NAME=0, PWD=/Users/llastname/Documents/Official Stuff/JobStuff/MQ, TERM_PROGRAM_VERSION=388.1.3, HOME=/Users/llastname, SHLVL=1, _=/Users/llastname/anaconda3/bin/java}
System properties: 
{java.runtime.name=OpenJDK Runtime Environment, sun.boot.library.path=/Users/llastname/anaconda3/jre/lib, java.vm.version=25.121-b15, gopherProxySet=false, java.vm.vendor=Azul Systems, Inc., java.vendor.url=http://www.azulsystems.com/, path.separator=:, java.vm.name=OpenJDK 64-Bit Server VM, file.encoding.pkg=sun.io, user.country=US, sun.java.launcher=SUN_STANDARD, sun.os.patch.level=unknown, java.vm.specification.name=Java Virtual Machine Specification, user.dir=/Users/llastname/Documents/Official Stuff/JobStuff/MQ, java.runtime.version=1.8.0_121-b15, java.awt.graphicsenv=sun.awt.CGraphicsEnvironment, java.endorsed.dirs=/Users/llastname/anaconda3/jre/lib/endorsed, os.arch=x86_64, java.io.tmpdir=/var/folders/0p/jrjhyxwj7p55n6v46xw0t1d80000gn/T/, line.separator=
, java.vm.specification.vendor=Oracle Corporation, os.name=Mac OS X, sun.jnu.encoding=UTF-8, java.library.path=/Users/llastname/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:., java.specification.name=Java Platform API Specification, java.class.version=52.0, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, os.version=10.12.6, http.nonProxyHosts=local|*.local|169.254/16|*.169.254/16, user.home=/Users/llastname, user.timezone=America/New_York, java.awt.printerjob=sun.lwawt.macosx.CPrinterJob, file.encoding=UTF-8, java.specification.version=1.8, java.class.path=scriptella-1.1/scriptella.jar, user.name=llastname, java.vm.specification.version=1.8, sun.java.command=scriptella-1.1/scriptella.jar etl.xml, java.home=/Users/llastname/anaconda3/jre, sun.arch.data.model=64, user.language=en, java.specification.vendor=Oracle Corporation, awt.toolkit=sun.lwawt.macosx.LWCToolkit, java.vm.info=mixed mode, java.version=1.8.0_121, java.ext.dirs=/Users/llastname/Library/Java/Extensions:/Users/llastname/anaconda3/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java, sun.boot.class.path=/Users/llastname/anaconda3/jre/lib/resources.jar:/Users/llastname/anaconda3/jre/lib/rt.jar:/Users/llastname/anaconda3/jre/lib/sunrsasign.jar:/Users/llastname/anaconda3/jre/lib/jsse.jar:/Users/llastname/anaconda3/jre/lib/jce.jar:/Users/llastname/anaconda3/jre/lib/charsets.jar:/Users/llastname/anaconda3/jre/lib/jfr.jar:/Users/llastname/anaconda3/jre/classes, java.vendor=Azul Systems, Inc., file.separator=/, java.vendor.url.bug=http://www.azulsystems.com/support/, sun.io.unicode.encoding=UnicodeBig, sun.cpu.endian=little, socksNonProxyHosts=local|*.local|169.254/16|*.169.254/16, ftp.nonProxyHosts=local|*.local|169.254/16|*.169.254/16, sun.cpu.isalist=}
-----------------------------------------------------------------
4

0 回答 0