luminus-framework / luminus-template

a template project for the Luminus framework
http://www.luminusweb.net/
MIT License
648 stars 147 forks source link

Could not load template, failed with: Syntax error compiling . at (cheshire/factory.clj:79:7). #490

Closed mokr closed 3 years ago

mokr commented 4 years ago

Hi,

At some point the Luminus template stopped working for me with the message in the title. Still applies to latest v3.75.

I suspect that this is a local issue, but I'm not able to track it down. Are there more places to clean out than what I document below?

Info from lein re-install and project generation attempts:

REMOVE EVERYTHING AND START CLEAN

# rm -rf ~/.m2

# rm ~/bin/lein

# rm -rf ~/.lein

# which lein
-------------------------
-------------------------

REINSTALL

# curl -s https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein > ~/bin/lein

# chmod a+x ~/bin/lein

# which lein
-------------------------
/Users/mokr/bin/lein
-------------------------

# lein --version
-------------------------
Downloading Leiningen to /Users/mokr/.lein/self-installs/leiningen-2.9.3-standalone.jar now...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   637  100   637    0     0   1145      0 --:--:-- --:--:-- --:--:--  1145
100 13.9M  100 13.9M    0     0  3618k      0  0:00:03  0:00:03 --:--:-- 4373k
/Users/mokr/.lein/self-installs/leiningen-2.9.3-standalone.jar.pending: OK
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Retrieving lein-pprint/lein-pprint/1.1.2/lein-pprint-1.1.2.pom from clojars
Retrieving lein-ancient/lein-ancient/0.6.10/lein-ancient-0.6.10.pom from clojars
Retrieving com/amazonaws/aws-java-sdk-s3/1.9.0/aws-java-sdk-s3-1.9.0.pom from central
Retrieving com/amazonaws/aws-java-sdk-pom/1.9.0/aws-java-sdk-pom-1.9.0.pom from central
Retrieving com/amazonaws/aws-java-sdk-core/1.9.0/aws-java-sdk-core-1.9.0.pom from central
Retrieving commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom from central
Retrieving org/apache/commons/commons-parent/5/commons-parent-5.pom from central
Retrieving org/apache/apache/4/apache-4.pom from central
Retrieving org/apache/httpcomponents/httpclient/4.2/httpclient-4.2.pom from central
Retrieving org/apache/httpcomponents/httpcomponents-client/4.2/httpcomponents-client-4.2.pom from central
Retrieving org/apache/httpcomponents/project/5/project-5.pom from central
Retrieving org/apache/httpcomponents/httpcore/4.2/httpcore-4.2.pom from central
Retrieving org/apache/httpcomponents/httpcomponents-core/4.2/httpcomponents-core-4.2.pom from central
Retrieving org/apache/httpcomponents/project/6/project-6.pom from central
Retrieving commons-codec/commons-codec/1.6/commons-codec-1.6.pom from central
Retrieving org/apache/commons/commons-parent/22/commons-parent-22.pom from central
Retrieving org/apache/apache/9/apache-9.pom from central
Retrieving com/fasterxml/jackson/core/jackson-core/2.1.1/jackson-core-2.1.1.pom from central
Retrieving com/fasterxml/oss-parent/4/oss-parent-4.pom from central
Retrieving com/fasterxml/jackson/core/jackson-databind/2.1.1/jackson-databind-2.1.1.pom from central
Retrieving com/fasterxml/jackson/core/jackson-annotations/2.1.1/jackson-annotations-2.1.1.pom from central
Retrieving lein-codox/lein-codox/0.10.3/lein-codox-0.10.3.pom from clojars
Retrieving leinjacker/leinjacker/0.4.2/leinjacker-0.4.2.pom from clojars
Retrieving org/clojure/core.contracts/0.0.1/core.contracts-0.0.1.pom from central
Retrieving org/clojure/pom.contrib/0.0.26/pom.contrib-0.0.26.pom from central
Retrieving org/sonatype/oss/oss-parent/5/oss-parent-5.pom from central
Retrieving org/clojure/core.unify/0.5.3/core.unify-0.5.3.pom from central
Retrieving org/clojure/clojure/1.4.0/clojure-1.4.0.pom from central
Retrieving com/keminglabs/cljx/0.6.0/cljx-0.6.0.pom from clojars
Retrieving org/clojure/clojure/1.5.1/clojure-1.5.1.pom from central
Retrieving org/clojure/core.match/0.2.0/core.match-0.2.0.pom from central
Retrieving org/clojure/pom.contrib/0.1.2/pom.contrib-0.1.2.pom from central
Retrieving org/sonatype/oss/oss-parent/7/oss-parent-7.pom from central
Retrieving net/cgrand/sjacket/0.1.1/sjacket-0.1.1.pom from clojars
Retrieving net/cgrand/regex/1.1.0/regex-1.1.0.pom from clojars
Retrieving net/cgrand/parsley/0.9.2/parsley-0.9.2.pom from clojars
Retrieving com/cemerick/piggieback/0.1.5/piggieback-0.1.5.pom from central
Retrieving org/clojure/clojure/1.6.0/clojure-1.6.0.pom from central
Retrieving org/clojure/clojurescript/0.0-2665/clojurescript-0.0-2665.pom from central
Retrieving com/google/javascript/closure-compiler/v20140625/closure-compiler-v20140625.pom from central
Retrieving com/google/javascript/closure-compiler-parent/v20140625/closure-compiler-parent-v20140625.pom from central
Retrieving org/sonatype/oss/oss-parent/9/oss-parent-9.pom from central
Retrieving com/google/javascript/closure-compiler-externs/v20140625/closure-compiler-externs-v20140625.pom from central
Retrieving args4j/args4j/2.0.26/args4j-2.0.26.pom from central
Retrieving args4j/args4j-site/2.0.26/args4j-site-2.0.26.pom from central
Retrieving org/kohsuke/pom/6/pom-6.pom from central
Retrieving com/google/guava/guava/17.0/guava-17.0.pom from central
Retrieving com/google/guava/guava-parent/17.0/guava-parent-17.0.pom from central
Retrieving com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom from central
Retrieving com/google/google/1/google-1.pom from central
Retrieving org/json/json/20090211/json-20090211.pom from central
Retrieving com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.pom from central
Retrieving org/clojure/google-closure-library/0.0-20140718-946a7d39/google-closure-library-0.0-20140718-946a7d39.pom from central
Retrieving org/clojure/google-closure-library-third-party/0.0-20140718-946a7d39/google-closure-library-third-party-0.0-20140718-946a7d39.pom from central
Retrieving org/clojure/data.json/0.2.3/data.json-0.2.3.pom from central
Retrieving org/mozilla/rhino/1.7R4/rhino-1.7R4.pom from central
Retrieving org/clojure/tools.reader/0.8.10/tools.reader-0.8.10.pom from central
Retrieving watchtower/watchtower/0.1.1/watchtower-0.1.1.pom from clojars
Retrieving org/clojure/clojure/1.3.0/clojure-1.3.0.pom from central
Retrieving lein-cljsbuild/lein-cljsbuild/1.1.5/lein-cljsbuild-1.1.5.pom from clojars
Retrieving fs/fs/1.1.2/fs-1.1.2.pom from clojars
Retrieving org/apache/commons/commons-compress/1.3/commons-compress-1.3.pom from central
Retrieving com/amazonaws/aws-java-sdk-s3/1.9.0/aws-java-sdk-s3-1.9.0.jar from central
Retrieving com/amazonaws/aws-java-sdk-core/1.9.0/aws-java-sdk-core-1.9.0.jar from central
Retrieving commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar from central
Retrieving org/apache/httpcomponents/httpclient/4.2/httpclient-4.2.jar from central
Retrieving org/apache/httpcomponents/httpcore/4.2/httpcore-4.2.jar from central
Retrieving com/fasterxml/jackson/core/jackson-core/2.1.1/jackson-core-2.1.1.jar from central
Retrieving commons-codec/commons-codec/1.6/commons-codec-1.6.jar from central
Retrieving com/fasterxml/jackson/core/jackson-databind/2.1.1/jackson-databind-2.1.1.jar from central
Retrieving com/fasterxml/jackson/core/jackson-annotations/2.1.1/jackson-annotations-2.1.1.jar from central
Retrieving org/clojure/core.contracts/0.0.1/core.contracts-0.0.1.jar from central
Retrieving org/clojure/core.unify/0.5.3/core.unify-0.5.3.jar from central
Retrieving org/clojure/core.match/0.2.0/core.match-0.2.0.jar from central
Retrieving org/clojure/clojure/1.5.1/clojure-1.5.1.jar from central
Retrieving com/cemerick/piggieback/0.1.5/piggieback-0.1.5.jar from central
Retrieving org/clojure/clojurescript/0.0-2665/clojurescript-0.0-2665.jar from central
Retrieving com/google/javascript/closure-compiler-externs/v20140625/closure-compiler-externs-v20140625.jar from central
Retrieving args4j/args4j/2.0.26/args4j-2.0.26.jar from central
Retrieving com/google/javascript/closure-compiler/v20140625/closure-compiler-v20140625.jar from central
Retrieving com/google/guava/guava/17.0/guava-17.0.jar from central
Retrieving com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar from central
Retrieving org/json/json/20090211/json-20090211.jar from central
Retrieving com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar from central
Retrieving org/clojure/google-closure-library/0.0-20140718-946a7d39/google-closure-library-0.0-20140718-946a7d39.jar from central
Retrieving org/clojure/google-closure-library-third-party/0.0-20140718-946a7d39/google-closure-library-third-party-0.0-20140718-946a7d39.jar from central
Retrieving org/clojure/data.json/0.2.3/data.json-0.2.3.jar from central
Retrieving org/mozilla/rhino/1.7R4/rhino-1.7R4.jar from central
Retrieving org/clojure/tools.reader/0.8.10/tools.reader-0.8.10.jar from central
Retrieving org/apache/commons/commons-compress/1.3/commons-compress-1.3.jar from central
Retrieving lein-pprint/lein-pprint/1.1.2/lein-pprint-1.1.2.jar from clojars
Retrieving net/cgrand/sjacket/0.1.1/sjacket-0.1.1.jar from clojars
Retrieving leinjacker/leinjacker/0.4.2/leinjacker-0.4.2.jar from clojars
Retrieving com/keminglabs/cljx/0.6.0/cljx-0.6.0.jar from clojars
Retrieving net/cgrand/regex/1.1.0/regex-1.1.0.jar from clojars
Retrieving lein-codox/lein-codox/0.10.3/lein-codox-0.10.3.jar from clojars
Retrieving lein-ancient/lein-ancient/0.6.10/lein-ancient-0.6.10.jar from clojars
Retrieving net/cgrand/parsley/0.9.2/parsley-0.9.2.jar from clojars
Retrieving watchtower/watchtower/0.1.1/watchtower-0.1.1.jar from clojars
Retrieving lein-cljsbuild/lein-cljsbuild/1.1.5/lein-cljsbuild-1.1.5.jar from clojars
Retrieving fs/fs/1.1.2/fs-1.1.2.jar from clojars
Leiningen 2.9.3 on Java 14.0.1 OpenJDK 64-Bit Server VM
-------------------------

# java --version
-------------------------
openjdk 14.0.1 2020-04-14
OpenJDK Runtime Environment (build 14.0.1+7)
OpenJDK 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)
-------------------------

CREATE A WORKING PROJECT WITH DEFAULT TEMPALTE

# lein new workingproj
-------------------------
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Generating a project called workingproj based on the 'default' template.
The default template is intended for library projects, not applications.
To see other templates (app, plugin, etc), try `lein help new`.
-------------------------

# file workingproj
-------------------------
workingproj: directory
-------------------------

ATTEMPT LUMINUS GENERATION

# lein new luminus myproj
-------------------------
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Retrieving luminus/lein-template/3.75/lein-template-3.75.pom from clojars
Retrieving selmer/selmer/1.11.7/selmer-1.11.7.pom from clojars
Retrieving org/clojure/clojure/1.7.0/clojure-1.7.0.pom from central
Retrieving joda-time/joda-time/2.9.6/joda-time-2.9.6.pom from central
Retrieving commons-codec/commons-codec/1.10/commons-codec-1.10.pom from central
Retrieving org/apache/commons/commons-parent/35/commons-parent-35.pom from central
Retrieving org/apache/apache/15/apache-15.pom from central
Retrieving json-html/json-html/0.4.0/json-html-0.4.0.pom from clojars
Retrieving hiccup/hiccup/1.0.5/hiccup-1.0.5.pom from clojars
Retrieving org/clojure/clojure/1.2.1/clojure-1.2.1.pom from central
Retrieving hiccups/hiccups/0.3.0/hiccups-0.3.0.pom from clojars
Retrieving org/clojure/clojurescript/0.0-2069/clojurescript-0.0-2069.pom from central
Retrieving com/google/javascript/closure-compiler/v20130603/closure-compiler-v20130603.pom from central
Retrieving args4j/args4j/2.0.16/args4j-2.0.16.pom from central
Retrieving args4j/args4j-site/2.0.16/args4j-site-2.0.16.pom from central
Retrieving com/google/guava/guava/14.0.1/guava-14.0.1.pom from central
Retrieving com/google/guava/guava-parent/14.0.1/guava-parent-14.0.1.pom from central
Retrieving com/google/protobuf/protobuf-java/2.4.1/protobuf-java-2.4.1.pom from central
Retrieving org/clojure/google-closure-library/0.0-20130212-95c19e7f0f5f/google-closure-library-0.0-20130212-95c19e7f0f5f.pom from central
Retrieving org/clojure/google-closure-library-third-party/0.0-20130212-95c19e7f0f5f/google-closure-library-third-party-0.0-20130212-95c19e7f0f5f.pom from central
Retrieving org/clojure/tools.reader/0.8.0/tools.reader-0.8.0.pom from central
Retrieving cheshire/cheshire/5.6.1/cheshire-5.6.1.pom from clojars
Retrieving com/fasterxml/jackson/core/jackson-core/2.7.3/jackson-core-2.7.3.pom from central
Retrieving com/fasterxml/jackson/jackson-parent/2.7/jackson-parent-2.7.pom from central
Retrieving com/fasterxml/oss-parent/25/oss-parent-25.pom from central
Retrieving com/fasterxml/jackson/dataformat/jackson-dataformat-smile/2.7.3/jackson-dataformat-smile-2.7.3.pom from central
Retrieving com/fasterxml/jackson/jackson-parent/2.7-1/jackson-parent-2.7-1.pom from central
Retrieving com/fasterxml/oss-parent/26/oss-parent-26.pom from central
Retrieving com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.7.3/jackson-dataformat-cbor-2.7.3.pom from central
Retrieving tigris/tigris/0.1.1/tigris-0.1.1.pom from clojars
Retrieving cheshire/cheshire/5.6.3/cheshire-5.6.3.pom from clojars
Retrieving com/fasterxml/jackson/core/jackson-core/2.7.5/jackson-core-2.7.5.pom from central
Retrieving com/fasterxml/jackson/dataformat/jackson-dataformat-smile/2.7.5/jackson-dataformat-smile-2.7.5.pom from central
Retrieving com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.7.5/jackson-dataformat-cbor-2.7.5.pom from central
Retrieving luminus/lein-template/3.75/lein-template-3.75.jar from clojars
Retrieving joda-time/joda-time/2.9.6/joda-time-2.9.6.jar from central
Retrieving org/clojure/clojure/1.7.0/clojure-1.7.0.jar from central
Retrieving commons-codec/commons-codec/1.10/commons-codec-1.10.jar from central
Retrieving org/clojure/clojurescript/0.0-2069/clojurescript-0.0-2069.jar from central
Retrieving args4j/args4j/2.0.16/args4j-2.0.16.jar from central
Retrieving com/google/javascript/closure-compiler/v20130603/closure-compiler-v20130603.jar from central
Retrieving com/google/guava/guava/14.0.1/guava-14.0.1.jar from central
Retrieving com/google/protobuf/protobuf-java/2.4.1/protobuf-java-2.4.1.jar from central
Retrieving org/clojure/google-closure-library/0.0-20130212-95c19e7f0f5f/google-closure-library-0.0-20130212-95c19e7f0f5f.jar from central
Retrieving org/clojure/google-closure-library-third-party/0.0-20130212-95c19e7f0f5f/google-closure-library-third-party-0.0-20130212-95c19e7f0f5f.jar from central
Retrieving org/clojure/tools.reader/0.8.0/tools.reader-0.8.0.jar from central
Retrieving com/fasterxml/jackson/core/jackson-core/2.7.5/jackson-core-2.7.5.jar from central
Retrieving com/fasterxml/jackson/dataformat/jackson-dataformat-smile/2.7.5/jackson-dataformat-smile-2.7.5.jar from central
Retrieving com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.7.5/jackson-dataformat-cbor-2.7.5.jar from central
Retrieving selmer/selmer/1.11.7/selmer-1.11.7.jar from clojars
Retrieving cheshire/cheshire/5.6.3/cheshire-5.6.3.jar from clojars
Retrieving hiccup/hiccup/1.0.5/hiccup-1.0.5.jar from clojars
Retrieving tigris/tigris/0.1.1/tigris-0.1.1.jar from clojars
Retrieving json-html/json-html/0.4.0/json-html-0.4.0.jar from clojars
Retrieving hiccups/hiccups/0.3.0/hiccups-0.3.0.jar from clojars
Could not load template, failed with: Syntax error compiling . at (cheshire/factory.clj:79:7).
-------------------------

# ls ~/.m2/repository/cheshire/cheshire
-------------------------
5.6.1   5.6.3
-------------------------

ATTEMPT LUMINUS GENERATION WITH OLD TEMPLATE

# lein new luminus myproject --template-version "3.10.24"
-------------------------
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Retrieving luminus/lein-template/3.10.24/lein-template-3.10.24.pom from clojars
Retrieving luminus/lein-template/3.10.24/lein-template-3.10.24.jar from clojars
Could not load template, failed with: Syntax error compiling . at (cheshire/factory.clj:79:7).
-------------------------

# ls ~/.m2/repository/cheshire/cheshire
-------------------------
5.6.1   5.6.3
-------------------------
yogthos commented 4 years ago

One more thing to check would be to see if you have any plugins in your ~/.lein/profiles.clj that might be conflicting. It looks like there's an incompatible version of cheshire that's being pulled from somewhere.

mokr commented 4 years ago

Thanks for the quick response, @yogthos. I guess it got lost in the information flow, but my 3rd step above was to delete the entire ~/.lein directory.

That said, I have attempted to add {:user {:managed-dependencies [[cheshire "5.10.0"]]}} to ~/.lein/profiles.clj, but it made no difference.

Forgot to mention; this is on MacOS 10.15.5

yogthos commented 4 years ago

Yeah that's an interesting one, I can't really think where the conflict might be coming from.

mokr commented 3 years ago

Downgrading Java solved this issue.

From:

➜  java --version
openjdk 14.0.1 2020-04-14
OpenJDK Runtime Environment (build 14.0.1+7)
OpenJDK 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)

To:

➜  java --version
openjdk 11.0.9 2020-10-20
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.9+11)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.23.0, JRE 11 Mac OS X amd64-64-Bit Compressed References 20201130_830 (JIT enabled, AOT enabled)
OpenJ9   - 0394ef754
OMR      - 582366ae5
JCL      - 3b09cfd7e9 based on jdk-11.0.9+11)