Skip to content

Getting error ava.lang.NoSuchMethodError: org.apache.commons.lang3.SystemUtils.getHostName()Ljava/lang/String; #778

@abhijita

Description

@abhijita

Before submission, please check that ...

  • [x ] this is related specifically to recheck-web and recheck itself.
  • [x ] the documentation does not mention a fix (e.g. wrong API usage, ...).
  • [x ] the bug is not related to a customization (e.g. custom implementations).
  • [x ] there are no open or closed issues that are related to this problem.

Describe the Bug

Trying to implement the self healing tests for selenium. during execution getting below error.

I do not have admin rights on my machine. According to the SystemUtil page (https://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apache/commons/lang3/SystemUtils.html#getHostName--)

If a system property cannot be read due to security restrictions, the corresponding field in this class will be set to null and a message will be written to System.err.

Recheck error :
java.lang.NoSuchMethodError: org.apache.commons.lang3.SystemUtils.getHostName()Ljava/lang/String;
at de.retest.recheck.meta.global.MachineMetadataProvider.retrieve(MachineMetadataProvider.java:20)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at de.retest.recheck.meta.MultiMetadataProvider.retrieve(MultiMetadataProvider.java:37)
at de.retest.recheck.meta.GlobalMetadataProvider.retrieve(GlobalMetadataProvider.java:30)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at de.retest.recheck.meta.MultiMetadataProvider.retrieve(MultiMetadataProvider.java:37)
at de.retest.recheck.meta.MetadataProviderService.retrieve(MetadataProviderService.java:37)
at de.retest.recheck.ui.descriptors.SutState.<init>(SutState.java:49)
at de.retest.recheck.persistence.RecheckSutState.convert(RecheckSutState.java:28)
at de.retest.recheck.RecheckImpl.createActionReplayResult(RecheckImpl.java:122)
at de.retest.recheck.RecheckImpl.check(RecheckImpl.java:111)
at de.retest.web.RecheckWebImpl.check(RecheckWebImpl.java:36)
at de.retest.recheck.RecheckImpl.check(RecheckImpl.java:101)
at de.retest.web.RecheckWebImpl.check(RecheckWebImpl.java:42)
at de.retest.web.selenium.AutocheckingRecheckDriver.check(AutocheckingRecheckDriver.java:140)
at de.retest.web.selenium.AutocheckingRecheckDriver.get(AutocheckingRecheckDriver.java:95)

How to Reproduce?

Use non admin user to execute the test.

Setup

  • recheck-web: 1.12.0
  • Selenium version: [ 3.141.59]
  • Testing framework: [TestNG
  • OS: [Windows 10
  • Java version: OpenJDK8

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions