Есть ли какой-нибудь пример / пример сценария сценария jruby?

Я новый пользователь scripttella.

Есть ли пример или учебник, чтобы использовать jruby в качестве языка сценариев?

Спасибо и С уважением,

Manish

== обновляется после предложений ejboy ==

  • Скопировал jruby.jar (1.7.4) в lib.
  • Однако сценарий не удался со следующим исключением.

14 июня 2013 г. 9:31:36 Сценарий /bigdisk/work/cougar/code/leopard-monitor/analytics/kpoint_usage/scriptella/scripts/jruby_sample.xml выполнить не удалось.

/etl/script[1] failed: keySet
Location: /etl/script[1]
Jun 14, 2013 9:31:36 AM <SEVERE> Scriptella bug report. Submit to issue tracker.
Scriptella version: 1.1
Exception:
scriptella.execution.EtlExecutorException: /etl/script[1] failed: keySet Location: /etl/script[1]
    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: scriptella.core.ExceptionInterceptor$ExecutionException: /etl/script[1] failed: keySet
    at scriptella.core.ExceptionInterceptor.execute(ExceptionInterceptor.java:44)
    at scriptella.core.Session.execute(Session.java:103)
    at scriptella.execution.EtlExecutor.execute(EtlExecutor.java:227)
    at scriptella.execution.EtlExecutor.execute(EtlExecutor.java:183)
    ... 3 more

Ниже приведен мой XML-файл.

<!DOCTYPE etl SYSTEM "http://scriptella.javaforge.com/dtd/etl.dtd">
<etl>
  <description>
    use jruby as scripting language.
  </description>
  <connection id="script-jruby" driver="script" url="out/test-out.csv"> <!-- classpath="path/to/jar:path/to/jar2"> -->
     language=jruby
  </connection>
  <script connection-id="script-jruby">
    puts "Hello world - using jruby"
  </script>
</etl>

1 ответ

Попробуйте установить для свойства языка значение jruby и убедитесь, что требуемые файлы jar доступны в classpath. Вы можете скопировать их в <scriptella_home>/lib каталог или включить в декларацию соединения:

<connection id="script" driver="script" classpath="path/to/jar:path/to/jar2">
   language=jruby
</connection>
Другие вопросы по тегам