datacraft-dsc / starfish-clj

Developer Toolkit for Decentralised Data Ecosystems
Apache License 2.0
5 stars 1 forks source link

Tests involving surfer fail due to nosuchmethoderror #3

Closed shark8me closed 5 years ago

shark8me commented 5 years ago

I created a test (that exercises asset registration with surfer), the register_with_surfer branch. However the test fails due to:

kiran@kiran-ThinkPad-L460:~/src/ocn/starfish-clj$ lein test

lein test starfish.samples.demo

lein test starfish.test-core

lein test starfish.test-surfer

lein test :only starfish.test-surfer/register-with-surfer

ERROR in (register-with-surfer) (LogFactoryImpl.java:392)
registration 
expected: (not (nil? (s/register sf a1)))
  actual: java.lang.NoSuchMethodError: org.apache.commons.logging.LogFactory.getClassLoader(Ljava/lang/Class;)Ljava/lang/ClassLoader;
 at org.apache.commons.logging.impl.LogFactoryImpl.getClassLoader (LogFactoryImpl.java:392)
    org.apache.commons.logging.impl.LogFactoryImpl.initDiagnostics (LogFactoryImpl.java:420)
    org.apache.commons.logging.impl.LogFactoryImpl.<init> (LogFactoryImpl.java:87)
    sun.reflect.NativeConstructorAccessorImpl.newInstance0 (NativeConstructorAccessorImpl.java:-2)
    sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62)
    sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
    java.lang.reflect.Constructor.newInstance (Constructor.java:423)
    java.lang.Class.newInstance (Class.java:442)
    org.apache.commons.logging.LogFactory$2.run (LogFactory.java:531)
    java.security.AccessController.doPrivileged (AccessController.java:-2)
    org.apache.commons.logging.LogFactory.newFactory (LogFactory.java:517)
    org.apache.commons.logging.LogFactory.getFactory (LogFactory.java:316)
    org.apache.commons.logging.LogFactory.getLog (LogFactory.java:351)
    org.apache.http.conn.ssl.DefaultHostnameVerifier.<init> (DefaultHostnameVerifier.java:82)
    org.apache.http.impl.client.HttpClientBuilder.build (HttpClientBuilder.java:966)
    org.apache.http.impl.client.HttpClients.createDefault (HttpClients.java:56)
    sg.dex.starfish.impl.remote.RemoteAgent.registerAsset (RemoteAgent.java:128)
    sg.dex.starfish.impl.remote.RemoteAgent.registerAsset (RemoteAgent.java:42)
    starfish.core$register.invokeStatic (core.clj:317)
    starfish.core$register.invoke (core.clj:314)
    starfish.test_surfer$fn__779.invokeStatic (test_surfer.clj:9)
    starfish.test_surfer/fn (test_surfer.clj:5)
    clojure.test$test_var$fn__9707.invoke (test.clj:717)
    clojure.test$test_var.invokeStatic (test.clj:717)
    clojure.test$test_var.invoke (test.clj:708)
    clojure.test$test_vars$fn__9733$fn__9738.invoke (test.clj:735)
    clojure.test$default_fixture.invokeStatic (test.clj:687)
    clojure.test$default_fixture.invoke (test.clj:683)
    clojure.test$test_vars$fn__9733.invoke (test.clj:735)
    clojure.test$default_fixture.invokeStatic (test.clj:687)
    clojure.test$default_fixture.invoke (test.clj:683)
    clojure.test$test_vars.invokeStatic (test.clj:731)
    clojure.test$test_all_vars.invokeStatic (test.clj:737)
    clojure.test$test_ns.invokeStatic (test.clj:758)
    clojure.test$test_ns.invoke (test.clj:743)
    user$eval224$fn__285.invoke (form-init6742350984048295432.clj:1)
    clojure.lang.AFn.applyToHelper (AFn.java:156)
    clojure.lang.AFn.applyTo (AFn.java:144)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)
    leiningen.core.injected$compose_hooks$fn__154.doInvoke (form-init6742350984048295432.clj:1)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:665)
    clojure.core$apply.invoke (core.clj:660)
    leiningen.core.injected$run_hooks.invokeStatic (form-init6742350984048295432.clj:1)
    leiningen.core.injected$run_hooks.invoke (form-init6742350984048295432.clj:1)
    leiningen.core.injected$prepare_for_hooks$fn__159$fn__160.doInvoke (form-init6742350984048295432.clj:1)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:31)
    clojure.lang.RestFn.invoke (RestFn.java:408)
    clojure.core$map$fn__5851.invoke (core.clj:2755)
    clojure.lang.LazySeq.sval (LazySeq.java:42)
    clojure.lang.LazySeq.seq (LazySeq.java:51)
    clojure.lang.Cons.next (Cons.java:39)
    clojure.lang.RT.next (RT.java:709)
    clojure.core$next__5371.invokeStatic (core.clj:64)
    clojure.core$reduce1.invokeStatic (core.clj:944)
    clojure.core$reduce1.invokeStatic (core.clj:934)
    clojure.core$merge_with.invokeStatic (core.clj:3059)
    clojure.core$merge_with.doInvoke (core.clj:3051)
    clojure.lang.RestFn.applyTo (RestFn.java:139)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.test$run_tests.invokeStatic (test.clj:768)
    clojure.test$run_tests.doInvoke (test.clj:768)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:665)
    clojure.core$apply.invoke (core.clj:660)
    user$eval224$fn__297$fn__330.invoke (form-init6742350984048295432.clj:1)
    user$eval224$fn__297$fn__298.invoke (form-init6742350984048295432.clj:1)
    user$eval224$fn__297.invoke (form-init6742350984048295432.clj:1)
    user$eval224.invokeStatic (form-init6742350984048295432.clj:1)
    user$eval224.invoke (form-init6742350984048295432.clj:1)
    clojure.lang.Compiler.eval (Compiler.java:7176)
    clojure.lang.Compiler.eval (Compiler.java:7166)
    clojure.lang.Compiler.load (Compiler.java:7635)
    clojure.lang.Compiler.loadFile (Compiler.java:7573)
    clojure.main$load_script.invokeStatic (main.clj:452)
    clojure.main$init_opt.invokeStatic (main.clj:454)
    clojure.main$init_opt.invoke (main.clj:454)
    clojure.main$initialize.invokeStatic (main.clj:485)
    clojure.main$null_opt.invokeStatic (main.clj:519)
    clojure.main$null_opt.invoke (main.clj:516)
    clojure.main$main.invokeStatic (main.clj:598)
    clojure.main$main.doInvoke (main.clj:561)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.Var.applyTo (Var.java:705)
    clojure.main.main (main.java:37)

Ran 3 tests containing 34 assertions.
0 failures, 1 errors.
Tests failed.