0

Can't i have commons-httpclient.jar and httpclient-4.2.3 jar as referenced libraries in my project build path ?

The ant-build fails with message

[javac]  Note: Some input files use unchecked or unsafe operations.
[javac]  Note: Recompile with -Xlint:unchecked for details.

I tried passing -Xlint:unchecked option to javac within ant, and now all my unchecked castings in the projects are getting thrown as errors and warnings. Is there a way to successfully build my project by having both jars ?

Any help is appreciated

Thanks

Srikanth Sridhar
  • 2,317
  • 7
  • 30
  • 50
  • Are you sure your build is failing? Or are those messages just warnings? – mthmulders Mar 28 '13 at 07:13
  • [javac] 15 errors [javac] 73 warnings BUILD FAILED /sreekanth/Txt2ORA/apsrtc-oprs/src/build.xml:129: The following error occurred while executing this line: /sreekanth/Txt2ORA/apsrtc-oprs/src/apps/build.xml:30: The following error occurred while executing this line: /sreekanth/Txt2ORA/apsrtc-oprs/src/apps/apsrtc-oprs-app/src/build.xml:247: The following error occurred while executing this line: /sreekanth/Txt2ORA/apsrtc-oprs/src/apps/apsrtc-oprs-app/src/build.xml:71: Compile failed; see the compiler error output for details. – Srikanth Sridhar Mar 28 '13 at 07:16
  • Usually the messages you mentioned in your question are warnings, not errors. Could you post the full log, or double check whether there aren't any **real** errors? – mthmulders Mar 28 '13 at 07:18
  • why it says [javac]` 15 errors `[javac] `73 warnings` `BUILD FAILED` – Srikanth Sridhar Mar 28 '13 at 07:22
  • Hard to tell for me... Take a look at [this question](http://stackoverflow.com/questions/4597968/how-to-recompile-with-xlintunchecked-in-ant-build-task), it should take away any warnings... I suspect your build will still fail after that. – mthmulders Mar 28 '13 at 07:25
  • yes, in my question i already mentioned about it, -Xlint:unchecked option to javac within ant and still it fails. Thanks for your time. will try to figure it out.. – Srikanth Sridhar Mar 28 '13 at 07:33

1 Answers1

0

the only way i found till now is to migrate from httpclient 3.1 to httpclient 4.2. After migration the files which i migrated works fine with version 4.2 jar.

http://blog.teamextension.com/migrating-from-httpclient-3-1-to-4-0-34 this link helped me a lot

Srikanth Sridhar
  • 2,317
  • 7
  • 30
  • 50