Hi, > 1. Am I right ? Is the oozie folder of the oozie sharelibs loaded in the > classpath in case of a java action ?
This has given me all sorts of problems too, please see a discussion I had on the Hortonworks Community Connection: https://community.hortonworks.com/questions/25796/oozie-share-lib-for-oozie -contains-a-lot-of-jar-fi.html As far as I can tell there is no way around this. If anyone on the list has a suggestion, I would love to hear it. Thanks, Aaron On 4/7/16, 9:09 AM, "Morgrim Murdargent" <[email protected]> wrote: >Hello ! > >I have an oozie workflow with a java action. >In this java action, I need the following version of httpclient and >httpcore : >- httpclient : 4.4 >- httpcore : 4.4 > >I found that in the oozie sharelibs, only the hive2 folder has these >versions of httpclient and httpcore. >So I added to my workflow the following property : >oozie.action.sharelib.for.java=hive2 > >It solved the first part of my problem with httpclient but did not with >httpcore. >When I check the classpath, I can see two versions for each lib httpcore >and httpclient : >- httpclient : 4.2.5 and 4.4 >- httpcore : 4.2.5 and 4.4 > >By some chances, the httpclient-4.4 is loaded first, so it solved my >problem with httpclient. >But unfortunately, httpcore-4.2.5 is loaded before the version 4.4, so I >got an error message : >### >Failing Oozie Launcher, Main class >[org.apache.oozie.action.hadoop.JavaMain], main() threw exception, >java.lang.NoSuchFieldError: INSTANCE >org.apache.oozie.action.hadoop.JavaMainException: >java.lang.NoSuchFieldError: INSTANCE >### > >I didn't find neither the httpclient-4.2.5 nor the httpcore 4.2.5 in hive2 >folder of oozie sharelib. >But I found them in the oozie folder of oozie sharelib. > >And when we do java action in oozie workflow, the oozie folder is >automatically loaded in the classpath. > >My questions are the following : >1. Am I right ? Is the oozie folder of the oozie sharelibs loaded in the >classpath in case of a java action ? >2. How can I have the latest versions of the libs loaded first in my >classpath ? >3. Can I load in the classpath only the libs contained in hive2 folder ? >If >yes, how ? >4. Can I safely replace the version 4.2.5 of httpclient and httpcore in >the >oozie folder of the oozie sharelibs by the version 4.4 ? >5. Can I do that for all the folders of the oozie sharelibs ? Why do we >have different versions of libraries in each folder of the oozie >sharelibs ? > >Thank you in advanced for your help ! > >Best regards. > >Morgrim.
