Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am trying to create custom component for one CRM.I need get values which are passing in talend for service.java . when I am using getter methods of datastore ,its getting null pointer exception.please me help me out. Any possibility is there get like..
String serverAddr = ElementParameterParser.getValue(node, "__SERVERADDR__");
thank you,
venkat.
Hi Venkat_C,
are you using javajet or Component kit? if your using kit then either pass the configuration object directly to the method that needs it in service or create a constructor in the service like this
@Service public class myService{ private MyService myservice; public MyService(MyService myservice){ this.myservice=myservice; } }
The create an instance of the service class like this , in either the source class for an input component, or processor for a processing component.
public CompanyComponent1Processor(@Option("configuration") final CompanyComponent1ProcessorConfiguration configuration,final CompanyComponentService service) {
this.configuration = configuration;this.service = new service(this.configuration);
}
best regards
Os