cider

A channel dedicated to the Clojure Interactive Development Environment that Rocks (aka CIDER). :cider:
piyer 2021-04-21T07:38:13.342200Z

I am struggling to get the logging show in cider. I can see the logging in nrepl-server buffer but not in the cider-repl.

piyer 2021-04-21T07:38:17.342400Z

any pointers?

bozhidar 2021-04-21T07:45:08.343Z

Perhaps you're not using cider-nrepl or you've set the output redirection to nil?

bozhidar 2021-04-21T07:46:12.343800Z

The problem that you're experiencing is that the logger's output got bound to nREPL's terminal output stream.

bozhidar 2021-04-21T07:46:28.344200Z

If you take a look in CIDER's issue tracker, you'll see many related conversations.

piyer 2021-04-21T08:22:32.344300Z

This is my profile

{:user {:plugins [[cider/cider-nrepl "0.25.11"]
                  [refactor-nrepl "2.5.1"]
                  [lein-pprint "1.3.2"]
                  [lein-cprint "1.3.3"]
                  [lein-kibit "0.1.8"]
                  [lein-ancient "0.7.0"]
                  [jonase/eastwood "0.4.0"]
                  [lein-nsort "0.1.14"]]
        :dependencies [[nrepl "0.8.3"]
                       [org.clojure/tools.namespace "1.1.0"]
                       [org.clojure/tools.reader "1.3.5"]]
        :env {:squiggly {:checkers [:eastwood :kibit]
                         :eastwood-exclude-linters [:unlimited-use]}}}
 :repl {:dependencies [[alembic "0.3.2"]
                       ;; [acyclic/squiggly-clojure "0.1.5"]
                       ]}

 :dev {:dependencies [[lambdaisland/kaocha "1.0.829"]
                      [ring/ring-devel "1.9.2"]
                      [ring/ring-mock "0.4.0"]]
       :jvm-opts ["-Dclojure.tools.logging.factory=clojure.tools.logging.impl/log4j2-factory"]
       :repl-options {:init-ns user}
       :source-paths ["env/dev/clj"]
       :plugins [[lein-marginalia "0.9.1"]]
       :aliases {"kaocha" ["run" "-m" "kaocha.runner"]}}}

euccastro 2021-04-21T10:30:06.345400Z

I'm getting this trying to install cider-nrepl 0.26.0 snapshot. I'm asking in other channel how to get the latest release instead, just FYI

error in process sentinel: Could not start nREPL server: Downloading: cider/cider-nrepl/0.26.0-SNAPSHOT/maven-metadata.xml from clojars
Downloading: cider/cider-nrepl/0.26.0-SNAPSHOT/cider-nrepl-0.26.0-20210418.130850-4.pom from clojars
Downloading: org/clojure/clojure/maven-metadata.xml from clojars
Downloading: org/clojure/clojure/maven-metadata.xml from central
Downloading: org/clojure/clojure/maven-metadata.xml from maven-central
Error building classpath. Malformed \uxxxx encoding.
java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
	at java.util.Properties.loadConvert(Properties.java:574)
	at java.util.Properties.load0(Properties.java:390)
	at java.util.Properties.load(Properties.java:341)
	at org.eclipse.aether.internal.impl.TrackingFileManager.read(TrackingFileManager.java:56)
	at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.read(DefaultUpdateCheckManager.java:511)
	at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkMetadata(DefaultUpdateCheckManager.java:250)
	at org.eclipse.aether.internal.impl.DefaultMetadataResolver.resolve(DefaultMetadataResolver.java:302)
	at org.eclipse.aether.internal.impl.DefaultMetadataResolver.resolveMetadata(DefaultMetadataResolver.java:181)
	at org.apache.maven.repository.internal.DefaultVersionResolver.resolveVersion(DefaultVersionResolver.java:213)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:282)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:229)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:207)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:262)
	at clojure.tools.deps.alpha.extensions.maven$get_artifact.invokeStatic(maven.clj:122)
	at clojure.tools.deps.alpha.extensions.maven$get_artifact.invoke(maven.clj:116)
	at clojure.tools.deps.alpha.extensions.maven$eval1084$fn__1086.invoke(maven.clj:137)
	at clojure.lang.MultiFn.invoke(MultiFn.java:244)
	at clojure.tools.deps.alpha$download_libs$fn__811$fn__812.invoke(alpha.clj:462)
	at clojure.tools.deps.alpha.util.concurrent$submit_task$task__502.invoke(concurrent.clj:34)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

bozhidar 2021-04-21T10:41:36.345800Z

@euccastro I can't reproduce this and I can think of no recent changes that might have caused this.

👍 1
bozhidar 2021-04-21T10:41:54.346300Z

Perhaps the artefact got corrupted for you or something like this.

alexmiller 2021-04-21T12:51:13.351300Z

The stack trace indicates the encoding error is encountered while reading a Java properties file while doing an update check while downloading the pom file. I’d wonder about Java version (Unicode support gets bumped periodically), and maybe your platform encoding (although I think Java always uses UTF-8 for prop files), but file corruption is a reasonable guess too. I’ve never seen this error before

euccastro 2021-04-21T16:44:36.352600Z

java version is

es@chu:~$ java -version
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (build 1.8.0_282-8u282-b08-0ubuntu1~20.04-b08)
OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode)
locale is
es@chu:~$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=gl_ES.UTF-8
LC_TIME=gl_ES.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=gl_ES.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=gl_ES.UTF-8
LC_NAME=gl_ES.UTF-8
LC_ADDRESS=gl_ES.UTF-8
LC_TELEPHONE=gl_ES.UTF-8
LC_MEASUREMENT=gl_ES.UTF-8
LC_IDENTIFICATION=gl_ES.UTF-8
LC_ALL=
I'm on Ubuntu 20.04, using spacemacs. this happened after a spacemacs upgrade

euccastro 2021-04-21T16:48:31.353300Z

the version I upgraded from is CIDER 1.1.0snapshot (package: <tel:202104121012|20210412.1012>) , and that works fine

alexmiller 2021-04-21T16:55:32.353700Z

the only properties file I can think of are the ones like ~/.m2/repository/org/clojure/clojure/resolver-status.properties

alexmiller 2021-04-21T16:56:38.354Z

or I guess maybe ~/.m2/repository/org/clojure/clojure/1.10.3/_remote.repositories

alexmiller 2021-04-21T17:01:51.355100Z

from looking at the code, it's probably a resolver-status.properties file

alexmiller 2021-04-21T17:02:32.355700Z

not sure if that got corrupted or maybe something troublesome could be written into that if you had a bad repository id

alexmiller 2021-04-21T17:05:57.356700Z

I was able to repro the stack trace by modifying one of those files and forcing it to be read. I'd be kind of curious what it looks like if you track down which one is bad

piyer 2021-04-21T20:08:09.357400Z

@bozhidar I figured the problem, might save someone's time. It was c3p0 that was messing with the logging.

👍 1
piyer 2021-04-21T20:08:59.357900Z

mchange-log.properties

com.mchange.v2.log.MLog=com.mchange.v2.log.FallbackMLog
com.mchange.v2.log.FallbackMLog.DEFAULT_CUTOFF_LEVEL=WARNING