0

i am trying this solution for my application: Sending images using Http Post .(first answer) At frist i had problem with eclipse not wanting to import external jars, bat when i solved that problem i got this error:

The type org.apache.james.mime4j.message.SingleBody cannot be resolved. It is indirectly referenced from required .class files

on lines:

entity.addPart(nameValuePairs.get(index).getName(), new FileBody(new File(nameValuePairs.get(index).getValue())));

and

entity.addPart(nameValuePairs.get(index).getName(), new StringBody(nameValuePairs.get(index).getValue()));

any help?

5
  • stackoverflow.com/questions/1067655/… Commented Mar 19, 2013 at 12:46
  • i was looking at that post, but there is nothing that can help me with this problem... Commented Mar 19, 2013 at 12:49
  • Have you seen the second comment of the first answer? Commented Mar 19, 2013 at 12:50
  • yes, but i am using httpmime-4.0.1.jar, and in post i was looking at (in post) it is not saying about importing httpClinet or httpCore jars, and they are much biger then this httpmime. So is there a way i can fix this without importing them insted? Commented Mar 19, 2013 at 12:56
  • Problem solved. It just started working without any change. i dont know how and i dont know why... Commented Mar 21, 2013 at 11:45

2 Answers 2

1

Simple, The jar file which you are using is wrong file..

Same issue irritate me several times..

Download jar file from Grep code Which is Binary Download

the package name in Source Download jar file is not proper like org.apache.james.mime4j_.XXXXXX

and the Packages in Binary Download jar file is proper like org.apache.james.mime4j.XXXXXX

Wasted a lot of time on it today :( finally solved

Sign up to request clarification or add additional context in comments.

Comments

0

Having same problem and download the lib from here (only) solve the problem. I did download from other sites somehow they just did not resolved the problem.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.