Problem Description:


The cube build job fails with the below error in the /opt/infoworks/cube-engine/log/iw_cube.log.

Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Constructor threw exception; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.fasterxml.jackson.datatype.joda.JodaModule]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.joda.time.format.DateTimeFormatter.withZoneUTC()Lorg/joda/time/format/DateTimeFormatter;


Root cause:


This issue occurs if the incorrect Jackson-datatype-joda*.jar and derby*.jar gets picked up in IWX 2.8.0.1-EMR. There is a JIRA IPD-9121 raised to address this issue in future releases of IWX on EMR.


Solution:

We need to exclude Jackson-datatype-joda*.jar and derby*.jar from the cube-engine classpath.


a) Change IW_HOME/cube-engine/bin/find-hive-dependency.sh as shown below.


Before Change:


hive_lib=`find -L ${hive_lib_dir} -name '.jar' ! -name '*calcite' -printf '%p:' | sed 's/:$//‘`


After Change:


hive_lib=`find -L ${hive_lib_dir} -name '.jar' ! -name '*calcite' ! -name 'jackson-datatype-joda' ! -name 'derby' -printf '%p:' | sed 's/:$//`


Note: This issue happens only in IWX 2.8.0.1-EMR.


Applicable Infoworks Versions:

IWX 2.8.0.1-EMR.