One Star

[resolved] org.apache.commons.httpclient cannot be resolved to a type

Hello everyone,
When trying to run a finished job on a target machine using the generated shellscript ("bis_project_run.sh"), I'm stuck with a Java error:
Exception in thread "main" java.lang.Error: java.lang.Error: Unresolved compilation problems: 
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient.HttpStatus cannot be resolved
at bis.bis_project_0_1.bis_project.tMysqlConnection_1Process(bis_project.java:3603)
at bis.bis_project_0_1.bis_project.runJobInTOS(bis_project.java:3898)
at bis.bis_project_0_1.bis_project.main(bis_project.java:3648)
Caused by: java.lang.Error: Unresolved compilation problems:
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient.HttpStatus cannot be resolved
at bis.bis_project_0_1.bis_project.tFileFetch_1Process(bis_project.java:582)
at bis.bis_project_0_1.bis_project.tMysqlConnection_1Process(bis_project.java:3595)
... 2 more

I thought this would mean that commons-httpclient-3.0.1.jar is not where it's supposed to be. However this file is in ../lib/ as classpath.jar describes it should be.
The error occurs on the machine I'm deploying to (Debian, Sun Java 6 JRE) as well as on my own desktop machine (Ubuntu, also Sun Java 6JRE). Somehow I must be missing something quite obvious here, anybody have a clue where to look?
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

Re: [resolved] org.apache.commons.httpclient cannot be resolved to a type

Thanks for the reply. TOS version 4.1 I'm using.
Actually, just 5 minutes ago, I've re-exported the job and now everything seems to be fine...
13 REPLIES
Community Manager

Re: [resolved] org.apache.commons.httpclient cannot be resolved to a type

Hello
Which version of TOS are you using? Does the job work fine in the studio?
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] org.apache.commons.httpclient cannot be resolved to a type

Thanks for the reply. TOS version 4.1 I'm using.
Actually, just 5 minutes ago, I've re-exported the job and now everything seems to be fine...
Community Manager

Re: [resolved] org.apache.commons.httpclient cannot be resolved to a type

Hi
Ok, good news!
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] org.apache.commons.httpclient cannot be resolved to a type

I am having the same problem with tFileFetch, however exporting and importing has not solved anything. I am getting this error message:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient.cookie cannot be resolved to a variable
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient.HttpStatus cannot be resolved to a variable

How can I fix this!? All I did was place a tFileFetch component in the design area!
Moderator

Re: [resolved] org.apache.commons.httpclient cannot be resolved to a type

Hi rwhelan,
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
org.apache.commons.httpclient.cookie cannot be resolved to a variable

Did you use "" in your url? It seems something wrong with your url. Have you read component reference TalendHelpCenter:tFileFetch. Component setting screenshot will be preferred.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] org.apache.commons.httpclient cannot be resolved to a type

Xiado, thanks for your response. In order to simplify things, I created a job with only a brand new tFileFecth component. A component settings screenshot is below and I am getting these errors:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient.cookie cannot be resolved to a variable
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient cannot be resolved to a type
org.apache.commons.httpclient.HttpStatus cannot be resolved to a variable

One Star

Re: [resolved] org.apache.commons.httpclient cannot be resolved to a type

Now I am getting these errors in my main job:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail.Session cannot be resolved to a type
com.sun.mail cannot be resolved to a type
javax.mail.Folder cannot be resolved to a type
javax.mail.Folder cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail.Flags cannot be resolved to a variable
javax.mail.internet cannot be resolved
javax.mail cannot be resolved to a type
javax.mail.Session cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail.Part cannot be resolved to a variable
javax.mail.Part cannot be resolved to a variable

connecting to socket on port 3453
connected
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail.Part cannot be resolved to a variable
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail cannot be resolved to a type
javax.mail.Part cannot be resolved to a variable
javax.mail.Part cannot be resolved to a variable
com.sun.mail cannot be resolved to a type
com.sun.mail cannot be resolved to a type
org.talend.FileCopy cannot be resolved to a type
javax.mail cannot be resolved to a type

Moderator

Re: [resolved] org.apache.commons.httpclient cannot be resolved to a type

Hi,
Is these any java code error when you switch "Designer" to "Code"? Which talend product build version are you using? Is it back to normal after you restart your studio?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] org.apache.commons.httpclient cannot be resolved to a type

Hi, thank you again for responding,
I see the errors in both designer and code. Here is an example - you can see the talend version in the image. Yes it happens each time I restart.
One Star

Re: [resolved] org.apache.commons.httpclient cannot be resolved to a type

Hi, thank you again for responding,
I see the errors in both designer and code. Here is an example - you can see the talend version in the image. Yes it happens each time I restart.
Moderator

Re: [resolved] org.apache.commons.httpclient cannot be resolved to a type

Hi,
I have made a simple testing on talend open studio for Big data, everything is OK. See my screenshot.
First of all, make sure your component setting is totally correct. If the job has compile error, you are always required to fix the error before executing the job.(check if there is wrong configuration in your component setting and correct it).
If your component setting is fine, do you have another talend product/or re-install a new one in your machine to take a testing to see if this issue repro(with same configuration of component setting).
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] org.apache.commons.httpclient cannot be resolved to a type

Thank you. Reinstalling Talend 5.4 and re-importing my project fixed the problem.
Moderator

Re: [resolved] org.apache.commons.httpclient cannot be resolved to a type

Hi,
Thanks for your feedback. Don't hesitate to post your issue on forum.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.