Re: Logging Issues / Standard Maven Dependencies

Jamie Lawson <jamier...@...>

To save others time, here's what I've been able to make work. It's in SBT syntax, but Maven users can translate. If you don't think this is ugly, you're not paying attention. The way I read Marc's links, this looks like it's a problem in Gremlin, and it looks like it has been fixed in Gremlin moving forward, and maybe with the next major Janusgraph release we can remove the mindrot dependency and the excludeAll clause. But until then, this seems, right now, to work. 

+= "org.mindrot" % "jbcrypt" % "0.4"
+= "org.janusgraph" % "janusgraph-core" % "0.1.0" excludeAll(
+= "org.janusgraph" % "janusgraph-cassandra" % "0.1.0"

There is a weird warning about a potential incompatibility (below) and that doesn't give me the warm-and-fuzzies, but things seem to work. Stay tuned. 

[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn] * org.mindrot:jbcrypt:0.3m -> 0.4
[warn] Run 'evicted' to see detailed eviction warnings

On Saturday, April 22, 2017 at 11:03:18 AM UTC-7, HadoopMarc wrote:
Hi Jamie,

I am not part of the JG team, but I just help out with some questions now and then.

The JBCrypt issue sounds familiar to me, possibly you find the answer here:!searchin/gremlin-users/jbcrypt%7Csort:relevance/gremlin-users/TeWm8lvv_LE/W5ztQzc2AwAJ

Cheers,    Marc

Op zaterdag 22 april 2017 17:36:06 UTC+2 schreef Jamie Lawson:
Your instruction gets a very long way to getting things moving with MANAGED dependencies.

But I get the following unresolved dependency. I think my resolvers are right. I'm wondering if the semicolon should be a colon in your dependencies, or if it should be jBCrypt-0.4 instead of jbcrypt-0.4 (case difference). On the github site for JBCrypt, the module name is camelcase. 

sbt.ResolveException: unresolved dependency: com.github.jeremyh#jBCrypt;jbcrypt-0.4: not found
[error] Total time: 2 s, completed Apr 22, 2017 8:20:02 AM
:~/workspace/idsvc$ sbt compile
[info] Loading global plugins from /home/jlawson/.sbt/0.13/plugins
[info] Loading project definition from /home/jlawson/workspace/idsvc/project
[info] Set current project to idsvc (in build file:/home/jlawson/workspace/idsvc/)
[info] Updating {file:/home/jlawson/workspace/idsvc/}idsvc...
[info] Resolving com.github.jeremyh#jBCrypt;jbcrypt-0.4 ...
[warn] module not found: com.github.jeremyh#jBCrypt;jbcrypt-0.4
[warn] ==== local: tried
[warn]   /home/jlawson/.ivy2/local/com.github.jeremyh/jBCrypt/jbcrypt-0.4/ivys/ivy.xml
[warn] ==== public: tried
[warn] ==== Artima Maven Repository: tried
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] ::          UNRESOLVED DEPENDENCIES         ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.github.jeremyh#jBCrypt;jbcrypt-0.4: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] Note: Unresolved dependencies path:
[warn] com.github.jeremyh:jBCrypt:jbcrypt-0.4
[warn]  +- org.apache.tinkerpop:gremlin-groovy:3.2.3
[warn]  +- org.janusgraph:janusgraph-core:0.1.0 (/home/jlawson/workspace/idsvc/build.sbt#L55-56)
[warn]  +- default:idsvc_2.10:1.0

On Saturday, April 22, 2017 at 7:58:32 AM UTC-7, Jamie Lawson wrote:
That's a giant step forward!!!

On Friday, April 21, 2017 at 11:48:37 PM UTC-7, HadoopMarc wrote:
Hi Jamie,

Your last line is almost OK, you have to specify the individual modules as with most large software suites. Start with janusgraph-core and see what deps you still miss. Listing from maven central:

janusgraph/                                                      -         -      
janusgraph-all/                                                  -         -      
janusgraph-berkeleyje/                                           -         -      
janusgraph-cassandra/                                            -         -      
janusgraph-core/                                                 -         -      
janusgraph-es/                                                   -         -      
janusgraph-hadoop/                                               -         -      
janusgraph-hadoop-2/                                             -         -      
janusgraph-hadoop-core/                                          -         -      
janusgraph-hadoop-parent/                                        -         -      
janusgraph-hbase/                                                -         -      
janusgraph-hbase-parent/                                         -         -      
janusgraph-lucene/                                               -         -      
janusgraph-solr/                                                 -         -      
janusgraph-test/                                                 -         -      

Cheers,    Marc

Op zaterdag 22 april 2017 06:28:09 UTC+2 schreef Jamie Lawson:
I've been using the nasty method of building JanusGraph and copying all of jars from the janusgraph/lib directory into the myproject/lib directory. That is, myproject has more than 200 unmanaged dependencies. This has some obvious issues. One is that SBT gives me this unpleasant error message:

[error] SLF4J: Class path contains multiple SLF4J bindings.
[error] SLF4J: Found binding in [jar:file:/home/jlawson/workspace/myproject/lib/slf4j-log4j12-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[error] SLF4J: Found binding in [jar:file:/home/jlawson/workspace/myproject/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[error] SLF4J: See for an explanation.
[error] SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

This seems, with high assurance, to be a consequence of the unmanaged dependencies. It also seems that when I remove the slf4j jar file from the JanusGraph stuff, it changes the behavior of the logger dramatically. There is a whole bunch of other log output that I don't want or need to see. So when will I just be able to include a line in my SBT file that says something like:

libraryDependencies += "org.janusgraph" % "janusgraph" % "0.1.0"

And let SBT deal with all of the cross-dependencies?

Short of that, how do I get SLF4J to play nicely?

Join { to automatically receive all group messages.