Hello There!
I am using CloverETL 2.9.6 embedded in my application and trying to use the try_convert function in a reformat node. I am initializing the component with the following call:
Reformat fmt = new Reformat("testreformat, transform, null, null);
The “transform” variable contains the following string:
//#TL
$0.QUALIFIED_URL := try_convert($0.QUALIFIED_URL, string);
$0.URL_PROTOCOL := try_convert($0.URL_PROTOCOL, string);
$0.URL_USER := try_convert($0.URL_USER, string);
$0.URL_PASSWORD := try_convert($0.URL_PASSWORD, string);
$0.URL_SUBDOMAIN := try_convert($0.URL_SUBDOMAIN, string);
$0.URL_DOMAIN := try_convert($0.URL_DOMAIN, string);
$0.URL_PORT := try_convert($0.URL_PORT, string);
$0.URL_PATH := try_convert($0.URL_PATH, string);
$0.URL_QUERY := try_convert($0.URL_QUERY, string);
$0.URL_FRAGMENT := try_convert($0.URL_FRAGMENT, string);
$0.URL_DOMAIN_COUNTRY := try_convert($0.URL_DOMAIN_COUNTRY, string);
$0.URL_DOMAIN_CATEGORY := try_convert($0.URL_DOMAIN_CATEGORY, string);
$0.URL_IP_ADDRESS := try_convert($0.URL_IP_ADDRESS, string);
$0.URL_QUALIFICATION_FLAG_BRIEF := try_convert($0.URL_QUALIFICATION_FLAG_BRIEF, string);
$0.URL_QUALIFICATION_TEXT_BRIEF := try_convert($0.URL_QUALIFICATION_TEXT_BRIEF, string);
$0.URL_QUALIFICATION_FLAG := try_convert($0.URL_QUALIFICATION_FLAG, string);
$0.URL_QUALIFICATION_TEXT := try_convert($0.URL_QUALIFICATION_TEXT, string);
$0.QUALIFIED_EMAIL := try_convert($0.QUALIFIED_EMAIL, string);
$0.EMAIL_NAME := try_convert($0.EMAIL_NAME, string);
$0.EMAIL_USERNAME := try_convert($0.EMAIL_USERNAME, string);
$0.EMAIL_DOMAIN := try_convert($0.EMAIL_DOMAIN, string);
$0.EMAIL_DOMAIN_COUNTRY := try_convert($0.EMAIL_DOMAIN_COUNTRY, string);
$0.EMAIL_DOMAIN_CATEGORY := try_convert($0.EMAIL_DOMAIN_CATEGORY, string);
$0.EMAIL_QUALIFICATION_FLAG_BRIEF := try_convert($0.EMAIL_QUALIFICATION_FLAG_BRIEF, string);
$0.EMAIL_QUALIFICATION_TEXT_BRIEF := try_convert($0.EMAIL_QUALIFICATION_TEXT_BRIEF, string);
$0.EMAIL_QUALIFICATION_FLAG := try_convert($0.EMAIL_QUALIFICATION_FLAG, string);
$0.EMAIL_QUALIFICATION_TEXT := try_convert($0.EMAIL_QUALIFICATION_TEXT, string);
$0.CPF := try_convert($0.CPF, string);
$0.NOME := try_convert($0.NOME, string);
$0.ENDERECO := try_convert($0.ENDERECO, string);
$0.BAIRRO := try_convert($0.BAIRRO, string);
$0.CEP := try_convert($0.CEP, string);
$0.CIDADE := try_convert($0.CIDADE, string);
$0.UF := try_convert($0.UF, string);
$0.DDD := try_convert($0.DDD, decimal);
$0.TELEFONE := try_convert($0.TELEFONE, string);
$0.DDD1 := try_convert($0.DDD1, string);
$0.TELEFONE1 := try_convert($0.TELEFONE1, string);
$0.DDD2 := try_convert($0.DDD2, string);
$0.TELEFONE2 := try_convert($0.TELEFONE2, string);
$0.DDD3 := try_convert($0.DDD3, string);
$0.TELEFONE3 := try_convert($0.TELEFONE3, string);
$0.DATANASCIMENTO := try_convert($0.DATANASCIMENTO, string);
$0.SEXO := try_convert($0.SEXO, string);
$0.FXRENDA := try_convert($0.FXRENDA, string);
$0.MAE := try_convert($0.MAE, string);
$0.Q_TIPO_LOGRADOURO := try_convert($0.Q_TIPO_LOGRADOURO, string);
$0.Q_NOME_LOGRADOURO := try_convert($0.Q_NOME_LOGRADOURO, string);
$0.Q_TIPO_LOC_HORIZONTAL := try_convert($0.Q_TIPO_LOC_HORIZONTAL, string);
$0.Q_LOC_HORIZONTAL := try_convert($0.Q_LOC_HORIZONTAL, string);
$0.Q_TIPO_LOC_VERTICAL := try_convert($0.Q_TIPO_LOC_VERTICAL, string);
$0.Q_LOC_VERTICAL := try_convert($0.Q_LOC_VERTICAL, string);
$0.Q_COMPLEMENTO := try_convert($0.Q_COMPLEMENTO, string);
$0.Q_BAIRRO_INFERIDO := try_convert($0.Q_BAIRRO_INFERIDO, string);
$0.Q_UF := try_convert($0.Q_UF, string);
$0.Q_LOCALIDADE := try_convert($0.Q_LOCALIDADE, string);
$0.Q_CEP := try_convert($0.Q_CEP, string);
$0.Q_PREPOSICAO := try_convert($0.Q_PREPOSICAO, string);
$0.Q_TITULO_LOGRADOURO := try_convert($0.Q_TITULO_LOGRADOURO, string);
$0.Q_ENDERECO_FLAGS := try_convert($0.Q_ENDERECO_FLAGS, string);
$0.Q_TIPO_LOCALIDADE := try_convert($0.Q_TIPO_LOCALIDADE, string);
$0.Q_MUNICIPIO := try_convert($0.Q_MUNICIPIO, string);
$0.Q_END_COMPLETO := try_convert($0.Q_END_COMPLETO, string);
$0.Q_LONGITUDE := try_convert($0.Q_LONGITUDE, string);
$0.Q_LATITUDE := try_convert($0.Q_LATITUDE, string);
$0.Q_ZONA_CENS_COD := try_convert($0.Q_ZONA_CENS_COD, string);
$0.Q_DENSIDADE_DEMOGRAFICA := try_convert($0.Q_DENSIDADE_DEMOGRAFICA, string);
$0.Q_GEO_PRECISAO := try_convert($0.Q_GEO_PRECISAO, string);
$0.MATCH_ENDERECO := try_convert($0.MATCH_ENDERECO, string);
$0.MATCH_PF_CPF_ENDERECO := try_convert($0.MATCH_PF_CPF_ENDERECO, string);
$0.EXISTE_LB07 := try_convert($0.EXISTE_LB07, string);
$0.DT_NASC := try_convert($0.DT_NASC, string);
$0.QTD1 := try_convert($0.QTD1, string);
$0.ID := try_convert($0.ID, string);
The problem is that when I run the graph, the following error occurs:
[2011-05-06 17:35:13,207] [ERROR] [STDERR] [org.jetel.interpreter.ParseException: function "try_convert" not declared]
[2011-05-06 17:35:13,208] [ERROR] [STDERR] [ at org.jetel.interpreter.TransformLangParser.FunctionCallStatement(TransformLangParser.java:3314)]
[2011-05-06 17:35:13,208] [ERROR] [STDERR] [ at org.jetel.interpreter.TransformLangParser.FunctionCall(TransformLangParser.java:1980)]
[2011-05-06 17:35:13,208] [ERROR] [STDERR] [ at org.jetel.interpreter.TransformLangParser.PrimaryExpression(TransformLangParser.java:1889)]
[2011-05-06 17:35:13,208] [ERROR] [STDERR] [ at org.jetel.interpreter.TransformLangParser.PostfixExpression(TransformLangParser.java:1703)]
[2011-05-06 17:35:13,208] [ERROR] [STDERR] [ at org.jetel.interpreter.TransformLangParser.UnaryExpression(TransformLangParser.java:1849)]
[2011-05-06 17:35:13,208] [ERROR] [STDERR] [ at org.jetel.interpreter.TransformLangParser.MultiplicativeExpression(TransformLangParser.java:1556)]
[2011-05-06 17:35:13,208] [ERROR] [STDERR] [ at org.jetel.interpreter.TransformLangParser.AdditiveExpression(TransformLangParser.java:1476)]
[2011-05-06 17:35:13,208] [ERROR] [STDERR] [ at org.jetel.interpreter.TransformLangParser.RelationalExpression(TransformLangParser.java:1356)]
[2011-05-06 17:35:13,208] [ERROR] [STDERR] [ at org.jetel.interpreter.TransformLangParser.EqualityExpression(TransformLangParser.java:1276)]
[2011-05-06 17:35:13,208] [ERROR] [STDERR] [ at org.jetel.interpreter.TransformLangParser.ConditionalAndExpression(TransformLangParser.java:1234)]
[2011-05-06 17:35:13,208] [ERROR] [STDERR] [ at org.jetel.interpreter.TransformLangParser.ConditionalOrExpression(TransformLangParser.java:1192)]
[2011-05-06 17:35:13,208] [ERROR] [STDERR] [ at org.jetel.interpreter.TransformLangParser.DirectMapping(TransformLangParser.java:1091)]
[2011-05-06 17:35:13,208] [ERROR] [STDERR] [ at org.jetel.interpreter.TransformLangParser.Mapping(TransformLangParser.java:1039)]
[2011-05-06 17:35:13,208] [ERROR] [STDERR] [ at org.jetel.interpreter.TransformLangParser.CompilationUnit(TransformLangParser.java:516)]
[2011-05-06 17:35:13,208] [ERROR] [STDERR] [ at org.jetel.interpreter.TransformLangParser.Start(TransformLangParser.java:297)]
[2011-05-06 17:35:13,209] [ERROR] [STDERR] [ at org.jetel.component.WrapperTL.init(WrapperTL.java:158)]
[2011-05-06 17:35:13,209] [ERROR] [STDERR] [ at org.jetel.component.RecordTransformTL.init(RecordTransformTL.java:64)]
[2011-05-06 17:35:13,209] [ERROR] [STDERR] [ at org.jetel.component.RecordTransformFactory.createTransform(RecordTransformFactory.java:256)]
[2011-05-06 17:35:13,209] [ERROR] [STDERR] [ at org.jetel.component.Reformat.checkConfig(Reformat.java:500)]
[2011-05-06 17:35:13,209] [ERROR] [STDERR] [ at org.jetel.graph.Phase.checkConfig(Phase.java:208)]
[2011-05-06 17:35:13,209] [ERROR] [STDERR] [ at org.jetel.graph.TransformationGraph.checkConfig(TransformationGraph.java:905)]
[2011-05-06 17:35:13,209] [ERROR] [STDERR] [ at br.com.godigital.goquality3g.service.impl.ExecutorBean.execute(ExecutorBean.java:379)]
[2011-05-06 17:35:13,209] [ERROR] [STDERR] [ at br.com.godigital.goquality3g.service.impl.ExecutorBean.execute(ExecutorBean.java:173)]
[2011-05-06 17:35:13,209] [ERROR] [STDERR] [ at br.com.godigital.goquality3g.service.impl.ExecutorBean.execute(ExecutorBean.java:133)]
[2011-05-06 17:35:13,209] [ERROR] [STDERR] [ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)]
[2011-05-06 17:35:13,209] [ERROR] [STDERR] [ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)]
[2011-05-06 17:35:13,209] [ERROR] [STDERR] [ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)]
[2011-05-06 17:35:13,209] [ERROR] [STDERR] [ at java.lang.reflect.Method.invoke(Method.java:597)]
[2011-05-06 17:35:13,210] [ERROR] [STDERR] [ at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)]
[2011-05-06 17:35:13,210] [ERROR] [STDERR] [ at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)]
[2011-05-06 17:35:13,210] [ERROR] [STDERR] [ at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)]
[2011-05-06 17:35:13,210] [ERROR] [STDERR] [ at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)]
[2011-05-06 17:35:13,210] [ERROR] [STDERR] [ at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)]
[2011-05-06 17:35:13,210] [ERROR] [STDERR] [ at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)]
[2011-05-06 17:35:13,210] [ERROR] [STDERR] [ at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)]
[2011-05-06 17:35:13,210] [ERROR] [STDERR] [ at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)]
[2011-05-06 17:35:13,210] [ERROR] [STDERR] [ at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)]
[2011-05-06 17:35:13,210] [ERROR] [STDERR] [ at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)]
[2011-05-06 17:35:13,210] [ERROR] [STDERR] [ at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)]
[2011-05-06 17:35:13,210] [ERROR] [STDERR] [ at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)]
[2011-05-06 17:35:13,210] [ERROR] [STDERR] [ at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)]
[2011-05-06 17:35:13,211] [ERROR] [STDERR] [ at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)]
[2011-05-06 17:35:13,211] [ERROR] [STDERR] [ at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)]
[2011-05-06 17:35:13,211] [ERROR] [STDERR] [ at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)]
[2011-05-06 17:35:13,211] [ERROR] [STDERR] [ at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)]
[2011-05-06 17:35:13,211] [ERROR] [STDERR] [ at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)]
[2011-05-06 17:35:13,211] [ERROR] [STDERR] [ at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)]
[2011-05-06 17:35:13,211] [ERROR] [STDERR] [ at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)]
[2011-05-06 17:35:13,211] [ERROR] [STDERR] [ at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)]
[2011-05-06 17:35:13,211] [ERROR] [STDERR] [ at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)]
[2011-05-06 17:35:13,211] [ERROR] [STDERR] [ at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:304)]
[2011-05-06 17:35:13,211] [ERROR] [STDERR] [ at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:81)]
[2011-05-06 17:35:13,212] [ERROR] [STDERR] [ at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)]
[2011-05-06 17:35:13,212] [ERROR] [STDERR] [ at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)]
[2011-05-06 17:35:13,212] [ERROR] [STDERR] [ at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)]
What I am doing wrong? I am having trouble finding good examples of my specific use.
Thanks in advance!