NoSuchMethodError when used in combination with commons-configuration2 2.7

Issue #16 new
hans009 created an issue

Hello,

depending on our target deployment environment (linux or win based) we get following error when starting the server:

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.commons.beanutils.PropertyUtilsBean.addBeanIntrospector(Lorg/apache/commons/beanutils/BeanIntrospector;)V
at org.apache.commons.configuration2.beanutils.BeanHelper.initBeanUtilsBean(BeanHelper.java:627)
at org.apache.commons.configuration2.beanutils.BeanHelper.<clinit>(BeanHelper.java:88)

This is apparently a OS dependent bug, as under Win we don’t experience that but under Linux (or Mac OS for developers) we do.

I found out that the following line https://bitbucket.org/leonate/jxls-reader/src/d4d573729661166dd88da51b56c538cdb297eefa/pom.xml#lines-158 pulling in dependency commons-digester3:with-deps ships beanutils 1.8.3 classes as well as some other stuff (commons-logging, … see https://commons.apache.org/proper/commons-digester) inside the digester3.jar.

Unfortunately the class org.apache.commons.beanutils.PropertyUtilsBean of commons-beanutils:1.8.3 does not have the method addBeanIntrospector(BeanIntrospector introspector) whereas commons-beanutils:1.9.2 used by commons-configuration2:2.7 has such method.

So my question is: could you release a version which does only rely on the normal jars of commons-digester3 and not the one with <classifier>with-deps</classifier>?
This would be such a great improvement and I guess would be much more solution-friendly when dependency errors occur. Furthermore due to the “with-deps” jar we have duplicate classes on the class path, which is some how not desirable I guess 🙂

Comments (0)

  1. Log in to comment