One Star frb
One Star

The import org.apache cannot be resolved

Hi all,
I've created a custom Talend component, which at certain step connects to an external Http service. For that, I'm using

through javajet imports. I've seen the modules already exist in the Modules view. Nevertheless, when running a job the console outputs:
Execution failed : Failed to generate code.

This is my begin code:
<%@ jet 
   // Get the CID
   CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument;
   INode node = (INode)codeGenArgument.getArgument();
   String cid = node.getUniqueName();
   // Get the component parameters
   String orionEndpoint = ElementParameterParser.getValue(node, "__ORION_ENDPOINT__");
   String authEndpoint = ElementParameterParser.getValue(node, "__AUTH_ENDPOINT__");
   String authUsername = ElementParameterParser.getValue(node, "__AUTH_USERNAME__");
   String authPassword = ElementParameterParser.getValue(node, "__AUTH_PASSWORD__");
   String entityIdField = ElementParameterParser.getValue(node, "__ENTITY_ID_FIELD__");
   String entityTypeField = ElementParameterParser.getValue(node, "__ENTITY_TYPE_FIELD__");
   String defaultEntityType = ElementParameterParser.getValue(node, "__DEFAULT_ENTITY_TYPE__");
   String ignoredFilds = ElementParameterParser.getValue(node, "__IGNORED_FIELDS__");
   System.out.println("I am the begin section");
   HttpClient client = new HttpClient();
   PostMethod method = new PostMethod(<%=authEndpoint%>);
   method.setRequestHeader(new Header("Content-Type", "application/json"));
   method.setRequestBody("{\"username\":\"" + <%=authUsername%> + "\",\"password\":\"" + <%=authPassword%> + "\"}");
   try {
       int statusCode = client.executeMethod(method);
       if (statusCode != HttpStatus.SC_OK) {
           System.err.println("Method failed: " + method.getStatusLine());
       } // if
       byte[] responseBody = method.getResponseBody();
       System.out.println(new String(responseBody));
   } catch (HttpException e) {
     System.err.println("Fatal protocol violation: " + e.getMessage());
   } catch (IOException e) {
     System.err.println("Fatal transport error: " + e.getMessage());
   } finally {
   } // try

And this is my imports secton in the Component Descriptor file:

In the modules view I'm able to see the following:

Any hints about how to fix this issue? My Talend version is 6.2.0.
Community Manager

Re: The import org.apache cannot be resolved

Have you put the commons-httpclient-3.1.jar file in your custom component folder?
Talend | Data Agility for Modern Business
One Star

Re: The import org.apache cannot be resolved

Here I simply did restart the IDE and my custom component recognized the importation.