java - log error raised by the scriptella scriptella -
i log log file record , making raise of errors in etl file.i see error block executed there nothing logged log file , see nothing logged
<?xml version="1.0" encoding="utf-8"?><!doctype etl system "http://scriptella.javaforge.com/dtd/etl.dtd"> <etl> <description> test script pour table article </description> <connection id="in" driver="oracle" url="jdbc:oracle:thin:@localhost:1521:xe" user="iptech" password="iptech" /> <connection id="out" driver="postgresql" url="jdbc:postgresql://localhost:5432/gemodb" user="postgres" password="maher" /> <connection id="janino" driver="janino" /> <connection id="log" driver="script"></connection> <query connection-id="in"> select codearticle,structure, des,typemark,typ,imploc,marque,gamme,tar iptech.tmp_article ; <query connection-id="janino"> import java.io.*; import java.lang.*; import org.apache.commons.lang3.stringutils; import org.apache.commons.lang3.*; boolean result= false ; object obj =get("codearticle"); if (stringutils.isnumeric(obj.tostring())) { <!-- system.out.println("ok "); --> result=true ;} else{ result=false ;} set("result", result); next(); <script connection-id="out" if="result"> insert public.articles (id, is_enabled,type_marketing,type_tarif,description,gamme,import_local,marque,reference,struct,family_id) values (cast(?codearticle bigint) ,'true',?typemark,?tar,?des,?gamme,?imploc,?marque,?codearticle,?structure,cast(?{structure.substring(0, 2)} bigint)); <onerror> <script connection-id="log"> org.apache.log4j.logger.getlogger("testloggername").info("bad value "+ $codearticle); </script> </onerror> </script> </query> </query> </etl>
any see bad informatio logged log file
Comments
Post a Comment