question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.NullPointerException (org.apache.commons.lang3)

See original GitHub issue

After build Gaffer, executing my project with Java 8 Update 301 (64-bit), i’ve found this error: Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.apache.commons.lang3.JavaVersion.atLeast(org.apache.commons.lang3.JavaVersion)" because "org.apache.commons.lang3.SystemUtils.JAVA_SPECIFICATION_VERSION_AS_ENUM" is null at org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast(SystemUtils.java:1413) at org.apache.commons.lang3.ClassUtils.isAssignable(ClassUtils.java:594) at org.apache.commons.lang3.reflect.TypeUtils.isAssignable(TypeUtils.java:376) at org.apache.commons.lang3.reflect.TypeUtils.getTypeArguments(TypeUtils.java:900) at org.apache.commons.lang3.reflect.TypeUtils.getTypeArguments(TypeUtils.java:798) at org.apache.commons.lang3.reflect.TypeUtils.getTypeArguments(TypeUtils.java:784) at uk.gov.gchq.koryphe.signature.Signature.createTypeArgsFor(Signature.java:180) at uk.gov.gchq.koryphe.signature.Signature.createSignatureFromTypeVariable(Signature.java:122) at uk.gov.gchq.koryphe.signature.Signature.getInputSignature(Signature.java:72) at uk.gov.gchq.gaffer.store.schema.SchemaElementDefinitionValidator.validateFunctionArgumentTypes(SchemaElementDefinitionValidator.java:141) at uk.gov.gchq.gaffer.store.schema.SchemaElementDefinitionValidator.validate(SchemaElementDefinitionValidator.java:62) at uk.gov.gchq.gaffer.store.schema.SchemaElementDefinition.validate(SchemaElementDefinition.java:123) at uk.gov.gchq.gaffer.store.schema.Schema.validate(Schema.java:218) at uk.gov.gchq.gaffer.store.Store.validateSchemas(Store.java:696) at uk.gov.gchq.gaffer.store.Store.initialise(Store.java:284) at uk.gov.gchq.gaffer.mapstore.MapStore.initialise(MapStore.java:87) at uk.gov.gchq.gaffer.mapstore.SingleUseMapStore.initialise(SingleUseMapStore.java:44) at uk.gov.gchq.gaffer.store.Store.createStore(Store.java:262) at uk.gov.gchq.gaffer.graph.Graph$Builder.updateStore(Graph.java:1082) at uk.gov.gchq.gaffer.graph.Graph$Builder.build(Graph.java:970)

I’ve already solved this by changing commons-lang3 version from 3.3.2 to 3.12.0 in the main pom.xml file. I’m telling you for your knowledge. Best regards.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
t92549commented, Oct 1, 2021

@unclassified02 Thanks for the heads up. Will be closing this issue as we are already tracking the feature to upgrade to Java 11: https://github.com/gchq/Gaffer/issues/2300. This is useful to know though that we will need to look at this dependency.

1reaction
unclassified02commented, Sep 29, 2021

@t92549 i’m using Eclipse IDE Version 2021-06. I also confirm that I’m using JRE 16: thanks to your suggestion I found out that Eclipse have an embedded JRE, not displayed in “Apps & features”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix NullPointerException "org.apache.commons.lang3 ...
You're on an old version of lang3 which does not recognize the Java version you are on. More recent versions are trying to...
Read more >
Fix NullPointerException in isJavaVersionAtLeast on Java 10 ...
Now that Java 10 EA b29 is out, add SystemUtils. ... Fix this NPE: java.lang.NullPointerException at org.apache.commons.lang3.SystemUtils.
Read more >
Used commons-lang3 does not support java 11 #195 - GitHub
Trying to use graphql-java-tools on JDK 11 results in exceptions like: ... java.lang.NullPointerException: null at org.apache.commons.lang3.
Read more >
How to Fix and Avoid NullPointerException in Java - Rollbar
The NullPointerException occurs due to a situation in application code where an uninitialized object is attempted to be accessed or modified.
Read more >
How do you run one a pre-built servers? - Minecraft Forum
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.apache.commons.lang3.JavaVersion.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found