Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commons-text NoSuchMethod due to version conflict #292

Open
olwett opened this issue Jun 8, 2021 · 2 comments
Open

commons-text NoSuchMethod due to version conflict #292

olwett opened this issue Jun 8, 2021 · 2 comments

Comments

@olwett
Copy link

olwett commented Jun 8, 2021

I get this Exception in Obevo 8.2.1. Version 8.0.0 is working

java.lang.NoSuchMethodError: org.apache.commons.text.lookup.StringLookupFactory.base64DecoderStringLookup()Lorg/apache/commons/text/lookup/StringLookup;

at org.apache.commons.configuration2.interpol.DefaultLookups.<clinit>(DefaultLookups.java:68)
at org.apache.commons.configuration2.interpol.ConfigurationInterpolator.<clinit>(ConfigurationInterpolator.java:111)
at org.apache.commons.configuration2.convert.DefaultConversionHandler.<clinit>(DefaultConversionHandler.java:72)
at org.apache.commons.configuration2.beanutils.DefaultBeanFactory.<init>(DefaultBeanFactory.java:84)
at org.apache.commons.configuration2.beanutils.DefaultBeanFactory.<init>(DefaultBeanFactory.java:71)
at org.apache.commons.configuration2.beanutils.DefaultBeanFactory.<clinit>(DefaultBeanFactory.java:56)
at org.apache.commons.configuration2.beanutils.BeanHelper.<init>(BeanHelper.java:118)
at org.apache.commons.configuration2.beanutils.BeanHelper.<init>(BeanHelper.java:106)
at org.apache.commons.configuration2.beanutils.BeanHelper.<clinit>(BeanHelper.java:80)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at com.sun.proxy.$Proxy45.<clinit>(Unknown Source)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.base/java.lang.reflect.Proxy.newProxyInstance(Proxy.java:1022)
at java.base/java.lang.reflect.Proxy.newProxyInstance(Proxy.java:1008)
at org.apache.commons.configuration2.builder.fluent.Parameters.createParametersProxy(Parameters.java:306)
at org.apache.commons.configuration2.builder.fluent.Parameters.hierarchical(Parameters.java:220)
at com.gs.obevo.api.factory.PlatformConfigReader.loadPropertiesFromUrl(PlatformConfigReader.java:182)
at com.gs.obevo.api.factory.PlatformConfigReader.readConfigPackages(PlatformConfigReader.java:112)
at com.gs.obevo.api.factory.PlatformConfigReader.readPlatformProperties(PlatformConfigReader.java:58)
at com.gs.obevo.api.factory.PlatformConfiguration.<init>(PlatformConfiguration.java:51)
at com.gs.obevo.api.factory.PlatformConfiguration.<clinit>(PlatformConfiguration.java:38)
at com.gs.obevo.api.appdata.Environment.<init>(Environment.java:62)
at com.gs.obevo.db.api.appdata.DbEnvironment.<init>(DbEnvironment.java:71)

The cause seems to be that commons-text is ommited as a transitive dependency of commons-configuration2 because of conflict with commons-text which org.jgrapht dependes on. From maven dependency:tree:
[INFO] +- com.goldmansachs.obevo:obevo-core:jar:8.2.1:compile
[INFO] | +- (org.slf4j:slf4j-api:jar:1.7.18:compile - omitted for conflict with 1.7.30)
[INFO] | +- org.jetbrains.kotlin:kotlin-stdlib:jar:1.3.61:compile
[INFO] | | +- org.jetbrains.kotlin:kotlin-stdlib-common:jar:1.3.61:compile
[INFO] | | - org.jetbrains:annotations:jar:13.0:compile
[INFO] | +- org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:1.3.61:compile
[INFO] | | +- (org.jetbrains.kotlin:kotlin-stdlib:jar:1.3.61:compile - omitted for duplicate)
[INFO] | | - org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.3.61:compile
[INFO] | | - (org.jetbrains.kotlin:kotlin-stdlib:jar:1.3.61:compile - omitted for duplicate)
[INFO] | +- org.jgrapht:jgrapht-core:jar:1.3.0:compile
[INFO] | | - org.jheaps:jheaps:jar:0.9:compile
[INFO] | +- org.jgrapht:jgrapht-io:jar:1.3.0:compile
[INFO] | | +- (org.jgrapht:jgrapht-core:jar:1.3.0:compile - omitted for duplicate)
[INFO] | | - org.apache.commons:commons-text:jar:1.5:compile
[INFO] | | - (org.apache.commons:commons-lang3:jar:3.8.1:compile - omitted for conflict with 3.9)
[INFO] | +- commons-io:commons-io:jar:2.0:compile
[INFO] | +- com.google.code.cli-parser:cli:jar:7:compile
[INFO] | +- org.apache.commons:commons-configuration2:jar:2.7:compile
[INFO] | | +- (org.apache.commons:commons-lang3:jar:3.9:compile - omitted for conflict with 3.1)
[INFO] | | - (org.apache.commons:commons-text:jar:1.8:compile - omitted for conflict with 1.5)
[INFO] | +- (commons-beanutils:commons-beanutils:jar:1.9.4:compile - scope updated from runtime; omitted for duplicate)

@mohrezaei
Copy link

from https://issues.apache.org/jira/browse/CONFIGURATION-796?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel

It looks like your classpath is messed up. Check you command line or POM. You have an old version of Apche Commons Text that kicks in before the one specified by Commons Configuration.

@olwett
Copy link
Author

olwett commented Jun 8, 2021

I don't have dependencies to any commons libraries in my project. I think the solution here is that obevo should update the org.jgrapth-dependency to 1.5.1, which also has a transitive dependency on commons-text:1.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants