OpenBankProject / OpenBankProject/OBP-API

error mvn package command

Open
#1,052 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.7k
Forks
482
Avg merge
1d 12h
Merged PRs (30d)
15

Description

When i try to use mvn package command, I get the following error:

code.api.v2_1_0.UserTests *** ABORTED ***
java.lang.RuntimeException: Unable to load a Suite class that was discovered in the runpath: code.api.v2_1_0.UserTests
at org.scalatest.tools.DiscoverySuite$.getSuiteInstance(DiscoverySuite.scala:81)
at org.scalatest.tools.DiscoverySuite.$anonfun$nestedSuites$1(DiscoverySuite.scala:38)
at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
at scala.collection.Iterator.foreach(Iterator.scala:929)
at scala.collection.Iterator.foreach$(Iterator.scala:929)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1417)
at scala.collection.IterableLike.foreach(IterableLike.scala:71)
at scala.collection.IterableLike.foreach$(IterableLike.scala:70)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at scala.collection.TraversableLike.map(TraversableLike.scala:234)
...
Cause: java.lang.ExceptionInInitializerError:
at code.util.Helper$.getHostname(Helper.scala:250)
at code.util.Helper$MdcLoggable.$init$(Helper.scala:297)
at code.api.v2_1_0.UserTests.(UserTests.scala:14)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.scalatest.tools.DiscoverySuite$.getSuiteInstance(DiscoverySuite.scala:66)
at org.scalatest.tools.DiscoverySuite.$anonfun$nestedSuites$1(DiscoverySuite.scala:38)
...
Cause: java.lang.NullPointerException: An Empty Box was opened. The justification for allowing the openOrThrowException was OBP-10013: Attempted to open an empty Box.
at net.liftweb.common.EmptyBox.openOrThrowException(Box.scala:867)
at net.liftweb.common.EmptyBox.openOrThrowException(Box.scala:862)
at code.api.util.APIUtil$.(APIUtil.scala:1937)
at code.api.util.APIUtil$.(APIUtil.scala)
at code.util.Helper$.getHostname(Helper.scala:250)
at code.util.Helper$MdcLoggable.$init$(Helper.scala:297)
at code.api.v2_1_0.UserTests.(UserTests.scala:14)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
...
*** RUN ABORTED ***
java.lang.ExceptionInInitializerError:
at code.util.Helper$.getHostname(Helper.scala:250)
at code.util.Helper$MdcLoggable.$init$(Helper.scala:297)
at code.api.v2_1_0.UserTests.(UserTests.scala:14)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.scalatest.tools.DiscoverySuite$.getSuiteInstance(DiscoverySuite.scala:66)
at org.scalatest.tools.DiscoverySuite.$anonfun$nestedSuites$1(DiscoverySuite.scala:38)
...
Cause: java.lang.NullPointerException: An Empty Box was opened. The justification for allowing the openOrThrowException was OBP-10013: Attempted to open an empty Box.
at net.liftweb.common.EmptyBox.openOrThrowException(Box.scala:867)
at net.liftweb.common.EmptyBox.openOrThrowException(Box.scala:862)
at code.api.util.APIUtil$.(APIUtil.scala:1937)
at code.api.util.APIUtil$.(APIUtil.scala)
at code.util.Helper$.getHostname(Helper.scala:250)
at code.util.Helper$MdcLoggable.$init$(Helper.scala:297)
at code.api.v2_1_0.UserTests.(UserTests.scala:14)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

My environment is the following:
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T13:49:05-06:00)
Java version: 1.8.0_172, vendor: Azul Systems, Inc.
Default locale: es_MX, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.5", arch: "x86_64", family: "mac"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the reported mvn package command and environment. Start with code/api/util/APIUtil.scala at line 1937, then trace the calls through code/util/Helper.scala line 250 and code/api/v2_1_0/UserTests.scala line 14; done means the package command completes without aborting test discovery.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
api, build-system, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.