Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Play framework logging implementation is not configurable #3808

Closed
firasdib opened this issue Aug 7, 2017 · 6 comments · Fixed by SkymindIO/deeplearning4j#199

Comments

@firasdib
Copy link

commented Aug 7, 2017

Issue Description

Whenever I try to use the UI I get an exception:

java.lang.NoClassDefFoundError: ch/qos/logback/core/Context
    at play.api.libs.CryptoConfigParser.<init>(Crypto.scala:201)
    at play.api.BuiltInComponents$class.cryptoConfig(Application.scala:284)
    at play.api.BuiltInComponentsFromContext.cryptoConfig$lzycompute(ApplicationLoader.scala:100)
    at play.api.BuiltInComponentsFromContext.cryptoConfig(ApplicationLoader.scala:100)
    at play.api.BuiltInComponents$class.crypto(Application.scala:285)
    at play.api.BuiltInComponentsFromContext.crypto$lzycompute(ApplicationLoader.scala:100)
    at play.api.BuiltInComponentsFromContext.crypto(ApplicationLoader.scala:100)
    at play.api.BuiltInComponents$class.injector(Application.scala:270)
    at play.api.BuiltInComponentsFromContext.injector$lzycompute(ApplicationLoader.scala:100)
    at play.api.BuiltInComponentsFromContext.injector(ApplicationLoader.scala:100)
    at play.api.BuiltInComponents$class.application(Application.scala:279)
    at play.api.BuiltInComponentsFromContext.application$lzycompute(ApplicationLoader.scala:100)
    at play.api.BuiltInComponentsFromContext.application(ApplicationLoader.scala:100)
    at play.core.server.JavaServerHelper$.forRouter(Server.scala:153)
    at play.core.server.JavaServerHelper.forRouter(Server.scala)
    at play.server.Server.forRouter(Server.java:96)
    at org.deeplearning4j.ui.play.PlayUIServer.runMain(PlayUIServer.java:197)
    at org.deeplearning4j.ui.api.UIServer.getInstance(UIServer.java:27)
    at se.lth.cs.nlp.EntityRecognizer.NeuralNetwork.NeuralNetwork$Builder.build(NeuralNetwork.java:214)
    at se.lth.cs.nlp.EntityRecognizer.EntityRecognizer.<init>(EntityRecognizer.java:104)
    at se.lth.cs.nlp.EntityRecognizer.EntityRecognizer.main(EntityRecognizer.java:124)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.core.Context
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 21 more

Version Information

Please indicate relevant versions, including, if relevant:

  • Deeplearning4j version 0.9.0
  • platform information OSX/Linux
@AlexDBlack

This comment has been minimized.

Copy link
Contributor

commented Aug 8, 2017

I've been able to reproduce this issue (process: exclude logback, add log4j).

Play uses SLF4J, and hence the logging implementation should be configurable by simply adding the appropriate SLF4J implementation to the classpath (as is the case with most libraries). However, it seems like this is not the case.

Note that we use Play 2.4 (last version with scala 2.10 support).

Documentation for Play 2.6: suggests that other logging frameworks are supported, but additional (play-specific) configuration is required.
https://www.playframework.com/documentation/2.6.x/SettingsLogger#using-a-custom-logging-framework

Note however that this is NOT listed under 2.4 documentation:
https://www.playframework.com/documentation/2.4.x/SettingsLogger

It's not clear if this was added later (I can't find it in the change log https://www.playframework.com/changelog) or if it is supported, and is just a documentation issue.

Even if it is supported in 2.4, it's not clear how to configure this in maven.

@AlexDBlack AlexDBlack changed the title Unable to use UI UI: Play framework logging implementation is not configurable Aug 8, 2017

@raver119

This comment has been minimized.

Copy link
Contributor

commented Apr 26, 2018

@AlexDBlack is this issue still relevant?

@AlexDBlack

This comment has been minimized.

Copy link
Contributor

commented Apr 27, 2018

Yes, still relevant. This may be a reason to upgrade Play (that requires dropping scala 2.10 support) as this was made possible in 2.6 (we're still on 2.4)

@raver119 raver119 added Bug Java labels Apr 27, 2018

@apatzer

This comment has been minimized.

Copy link

commented Jul 10, 2018

+1 for upgrading to Play 2.6 support. I'm running a Play 2.6 server with DL4J on it and cannot use any of the visualizations due to the incompatibility between Play 2.4 and 2.6.

@agibsonccc

This comment has been minimized.

Copy link

commented Jul 10, 2018

@apatzer we will when scala 2.10 is phased out of spark. Right now, it's not possible for the reasons alex used above.
We're not against it with the right timing.

@AlexDBlack

This comment has been minimized.

Copy link
Contributor

commented Jul 10, 2018

Related: #5804

We'll need to upgrade Play to add Java 10 (and 9?) support also (not sure yet what version we'll need to upgrade to). But Java 9/10 is a bigger task that we're not looking at tackling in the immediate future...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.