The share-lib in Oozie is modular, so it only adds necessary jars for each
action type. The java action is the most generic of all action types, and
therefore receives none of the other action type dependencies (such as
hive, pig, distcp, spark, etc.).
The article you've linked to carries an answer to the question of 'how do I
further include jars from action type X into my action type Y', which I've
quoted below for convenience:
"""
For example, if you want all Pig actions in one of your Workflows to
include the HCatalog ShareLib, you would add
oozie.action.sharelib.for.pig=pig,hcatalog to your job.properties.
"""
So in your case, you may want to try and add:
oozie.action.sharelib.for.java=java,hive