Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[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?
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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...

View solution in original post

13 Replies
Anonymous
Not applicable
Author

Hello
Which version of TOS are you using? Does the job work fine in the studio?
Best regards
Shong
Anonymous
Not applicable
Author

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...
Anonymous
Not applicable
Author

Hi
Ok, good news!
Best regards
Shong
Anonymous
Not applicable
Author

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!
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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

0683p000009MBfx.jpg
Anonymous
Not applicable
Author

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

0683p000009MBzq.jpg
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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.