OBP-API
OBP-API copied to clipboard
Build and start Api failing
Hi guys,
I forked and downloaded the code yesterday, and tried 'clean install' and 'jetty:run' and getting the issue below. Can anybody please point me in the right direction and I will try to fix it. I am new to the project
21:31:03.208 [qtp40170008-14-selector-ServerConnectorManager@239105a8/3] DEBUG org.eclipse.jetty.io.SelectorManager - Selector loop waiting on select 21:31:03.209 [ScalaTest-main] DEBUG org.eclipse.jetty.util.component.ContainerLifeCycle - ServerConnector@72ef8d15{HTTP/1.1}{0.0.0.0:8000} added {acceptor-0@5c87bfe2,POJO} 21:31:03.209 [ScalaTest-main] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@72ef8d15{HTTP/1.1}{0.0.0.0:8000} 21:31:03.209 [ScalaTest-main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - STARTED @4319ms ServerConnector@72ef8d15{HTTP/1.1}{0.0.0.0:8000} 21:31:03.209 [ScalaTest-main] WARN org.eclipse.jetty.util.component.AbstractLifeCycle - FAILED org.eclipse.jetty.server.Server@163370c2: java.lang.ExceptionInInitializerError java.lang.ExceptionInInitializerError: null at bootstrap.liftweb.Boot.boot(Boot.scala:187) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:357) at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:355) at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:2151) at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:2151) at net.liftweb.common.Full.map(Box.scala:813) at net.liftweb.http.DefaultBootstrap$.boot(LiftRules.scala:2151) at net.liftweb.http.provider.HTTPProvider$class.bootLift(HTTPProvider.scala:88) at net.liftweb.http.LiftFilter.bootLift(LiftServlet.scala:1071) at net.liftweb.http.provider.servlet.ServletFilterProvider$class.init(ServletFilterProvider.scala:40) at net.liftweb.http.LiftFilter.init(LiftServlet.scala:1071) at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:138) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:852) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298) at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) at org.eclipse.jetty.server.Server.start(Server.java:387) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) at org.eclipse.jetty.server.Server.doStart(Server.java:354) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) at code.TestServer$.
(TestServer.scala:22) at code.TestServer$. (TestServer.scala) at code.setup.ServerSetup$class.$init$(ServerSetup.scala:57) at code.model.AuthUserTest. (AuthUserTest.scala:13) 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$1.apply(DiscoverySuite.scala:38) at org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:37) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) at scala.collection.Iterator$class.foreach(Iterator.scala:893) at scala.collection.AbstractIterator.foreach(Iterator.scala:1336) at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) at scala.collection.AbstractIterable.foreach(Iterable.scala:54) at scala.collection.TraversableLike$class.map(TraversableLike.scala:234) at scala.collection.AbstractTraversable.map(Traversable.scala:104) at org.scalatest.tools.DiscoverySuite. (DiscoverySuite.scala:37) at org.scalatest.tools.Runner$.genDiscoSuites$1(Runner.scala:1165) at org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:1250) at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1011) at org.scalatest.tools.Runner$$anonfun$runOptionallyWithPassFailReporter$2.apply(Runner.scala:1010) at org.scalatest.tools.Runner$.withClassLoaderAndDispatchReporter(Runner.scala:1500) at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:1010) at org.scalatest.tools.Runner$.main(Runner.scala:827) at org.scalatest.tools.Runner.main(Runner.scala) Caused by: 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:2082) at code.api.util.APIUtil$. (APIUtil.scala) ... 58 common frames omitted [36mDiscovery completed in 3 seconds, 895 milliseconds.[0m [36mRun starting. Expected test count is: 10[0m [32mAuthUserTest:[0m [31mcode.model.AuthUserTest *** ABORTED [0m [31m java.lang.RuntimeException: Unable to load a Suite class that was discovered in the runpath: code.model.AuthUserTest[0m [31m at org.scalatest.tools.DiscoverySuite$.getSuiteInstance(DiscoverySuite.scala:81)[0m [31m at org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:38)[0m [31m at org.scalatest.tools.DiscoverySuite$$anonfun$1.apply(DiscoverySuite.scala:37)[0m [31m at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)[0m [31m at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)[0m [31m at scala.collection.Iterator$class.foreach(Iterator.scala:893)[0m [31m at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)[0m [31m at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)[0m [31m at scala.collection.AbstractIterable.foreach(Iterable.scala:54)[0m [31m at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)[0m [31m ...[0m [31m Cause: java.lang.ExceptionInInitializerError:[0m [31m at bootstrap.liftweb.Boot.boot(Boot.scala:187)[0m [31m at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[0m [31m at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[0m [31m at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[0m [31m at java.lang.reflect.Method.invoke(Method.java:498)[0m [31m at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:357)[0m [31m at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:355)[0m [31m at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:2151)[0m [31m at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:2151)[0m [31m at net.liftweb.common.Full.map(Box.scala:813)[0m [31m ...[0m [31m Cause: java.lang.NullPointerException: An Empty Box was opened. The justification for allowing the openOrThrowException was OBP-10013: Attempted to open an empty Box.[0m [31m at net.liftweb.common.EmptyBox.openOrThrowException(Box.scala:867)[0m [31m at net.liftweb.common.EmptyBox.openOrThrowException(Box.scala:862)[0m [31m at code.api.util.APIUtil$. (APIUtil.scala:2082)[0m [31m at code.api.util.APIUtil$. RUN ABORTED ***[0m [31m java.lang.ExceptionInInitializerError:[0m [31m at bootstrap.liftweb.Boot.boot(Boot.scala:187)[0m [31m at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[0m [31m at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[0m [31m at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[0m [31m at java.lang.reflect.Method.invoke(Method.java:498)[0m [31m at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:357)[0m [31m at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:355)[0m [31m at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:2151)[0m [31m at net.liftweb.http.DefaultBootstrap$$anonfun$boot$1.apply(LiftRules.scala:2151)[0m [31m at net.liftweb.common.Full.map(Box.scala:813)[0m [31m ...[0m [31m Cause: java.lang.NullPointerException: An Empty Box was opened. The justification for allowing the openOrThrowException was OBP-10013: Attempted to open an empty Box.[0m [31m at net.liftweb.common.EmptyBox.openOrThrowException(Box.scala:867)[0m [31m at net.liftweb.common.EmptyBox.openOrThrowException(Box.scala:862)[0m [31m at code.api.util.APIUtil$.(APIUtil.scala)[0m [31m at bootstrap.liftweb.Boot.boot(Boot.scala:187)[0m [31m at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[0m [31m at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[0m [31m at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[0m [31m at java.lang.reflect.Method.invoke(Method.java:498)[0m [31m at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:357)[0m [31m ...[0m [31m (APIUtil.scala:2082)[0m [31m at code.api.util.APIUtil$. (APIUtil.scala)[0m [31m at bootstrap.liftweb.Boot.boot(Boot.scala:187)[0m [31m at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[0m [31m at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[0m [31m at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[0m [31m at java.lang.reflect.Method.invoke(Method.java:498)[0m [31m at net.liftweb.util.ClassHelpers$$anonfun$createInvoker$1.apply(ClassHelpers.scala:357)[0m [31m ...[0m
hi @krisrr3. Have you fixed the problem?
nope mate...is there a configuration issue there or should I checkout a different version of the code?
i started obp without tests and works
Checkout the latest develop did the same thing.
- build (without tests). Runs fine
- start jetty (without tests). Same error (java.lang.NullPointerException: An Empty Box was opened. The justification for allowing the openOrThrowException was OBP-10013: Attempted to open an empty Box.).
I did a mvn --version, below. Do you think there are version incompatibilities there?
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T03:41:47+11:00) Maven home: /Users/test/research/OBP-API/EMBEDDED Java version: 1.8.0_92, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "10.11.6", arch: "x86_64", family: "mac"
same problem here, any one managed to solve this?
This issue is most likely related to missing configuration. Create a file name default.props and place it in src/main/resources. This is the minimum configuration I have been able to use:
connector=mapped
db.driver=org.h2.Driver
db.url=jdbc:h2:./lift_proto.db;DB_CLOSE_ON_EXIT=FALSE
hostname=http://127.0.0.1:8080
Check out the file sample.props.template in src/main/resources/props for all config options.