Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to create a component for modbus communication. I run Talend ESB 5.5.1
When I try to instanciate a objet of the external jar EasyModbusJava.jar I face an error:
Exécution en erreur :Échec de la génération du code.
[----------
1. ERROR in C:\Workspace_talend_esb\.JETEmitters\src\org\talend\designer\codegen\translators\laita\TModbusBeginJava.java (at line 35)
de.re.easymodbus.modbusclient.ModbusClient modbusClient = new de.re.easymodbus.modbusclient.ModbusClient("192.168.0.10",502);
^^
de cannot be resolved to a type
Jar is referenced in tModbus_java.xml:
<CODEGENERATION> <IMPORTS> <IMPORT NAME="modbus" MODULE="EasyModbusJava.jar" REQUIRED="true"/> </IMPORTS> </CODEGENERATION>
The jar has been copied in:
TalendDirectory/plugins/org.talend.designer.components.localprovider_5.5.1.r118616/components/tModbus
and
TalendDirectory/lib/java directory
An extract of tModbus_begin.javajet:
<%@ jet imports=" org.talend.core.model.process.INode org.talend.core.model.process.ElementParameterParser org.talend.designer.codegen.config.CodeGeneratorArgument java.util.Map java.util.List " %> <% CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument; INode node = (INode)codeGenArgument.getArgument(); String cid = node.getUniqueName(); de.re.easymodbus.modbusclient.ModbusClient modbusClient = new de.re.easymodbus.modbusclient.ModbusClient("192.168.0.10",502);
I've searched on you forum but didn't find anything that help me
MadProf
Nobody has an idea ?
Thx you for your help Shong, now it works