Fork me on GitHub
#luminus
<
2017-08-24
>
okwori01:08:27

Hi, I used Luminus for a project about 7months ago and now when I started a new project now, I am getting this error when I run (-main) in REPL with Cursive InvalidConnectionAttributeException The server time zone value 'Central Europe Summer Time' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support. sun.reflect.NativeConstructorAccessorImpl.newInstance0 (NativeConstructorAccessorImpl.java:-2)

okwori02:08:27

BTW, earlier I didn't get the same error, could this be because the earlier project was using mysql-connector-java 5.1.6 instead of the new 6.0.5? ALSO The earlier project runs clojurescript showing the content in \resources\docs\docs.md(Or atleast it redirects to after about a sec) But this one is showing the content in \resources\templates\home.html. I thought this was because I didn't load the db.core file in repl, when I did, I got the earlier mysql related error earlier

okwori02:08:45

BTW, I started the project with lein new luminus <App Name> +auth-jwe +re-frame +swagger +mysql +datomic on windows env using cursive on Intellij Idea

gdeer8115:08:26

@simon what happens when you do lein run ?

okwori15:08:22

I did but I got this: t clojure.main.<clinit>(main.java:20) Caused by: java.lang.UnsupportedClassVersionError: from/riddley/Util : Unsupported major.minor version 52.0, compiling:(from/riddley/compiler.clj:1:1)

okwori15:08:55

@gdeer81 Am just used to running the app from REPL instead of terminal

gdeer8115:08:18

@simon that error means that there is a mismatch between the java version used to compile the jar and the java version used to run the jar

gdeer8115:08:25

usually it's a matter of compiling with java 8 and trying to run it with java 7 but riddley's project.clj file indicates that it is compiled with java 1.6

okwori17:08:23

What could be the possible solution? Do I downgrade the project JDK from 1.8 to 1.6 maybe then?

gdeer8117:08:59

what version of java do you have on your machine?

gdeer8117:08:15

java is backwards compatible so running code compiled with java 6 should still run with a java 8 jre

okwori17:08:52

I have 1.8 on my machine

okwori17:08:00

So the project JDK should be 1.6 then? I even think my riddlley might be targeting 1.5 😕

gdeer8118:08:17

let me try to spin up a repl using lein try with riddley and see if it gives me any errors

gdeer8118:08:19

@simon what version of riddley are you using?

gdeer8118:08:54

yeah, that version was built with 1.5; try bumping riddley to the latest version and then running

okwori18:08:01

Since it is not in the project.clj? Looks like a some sort of nested dep

okwori18:08:47

@yogthos Did anyone maybe reported similar issue earlier?

gdeer8118:08:26

@simon run lein deps :tree that should help you find which one of your deps is depping on riddley

okwori18:08:48

So apparently the nesting looks like this compojure-api=>ring-swagger=>potemkin 0.4.3=>riddley 0.1.12. The latest version of potemkin: 0.4.4 still uses riddley 0.1.12

gdeer8118:08:08

hmm, I created a new project with the luminus template you mentioned and lein run works for me. can you try lein clean and then lein run maybe you have some cobwebs in your project folder

gdeer8119:08:59

@simon is this the tmse project?

okwori19:08:55

Currently I am running a new project and just trying to be sure I got the foundation and everything right as my capacity is a bit more improved comparatively

gdeer8119:08:54

so you spun up a new project and you're still getting the error? when you do java -version what does it say?

okwori19:08:03

Yes, I got the same error on a new project

gdeer8119:08:40

are you on windows, mac, or *nix machine?

okwori19:08:14

windows 10

gdeer8119:08:33

and when you run lein repl it says that it is using java 8?

okwori19:08:41

Well, within the project I get the UnsupportedClassVersionError with hikari But globally it runs:

okwori19:08:17

So maybe it is using 1.7 here?

gdeer8119:08:31

for some reason lein is picking up java 7

gdeer8119:08:17

so your LEIN_JAVA_CMD environment variable might need to be updated to point to your java 8 jdk

gdeer8119:08:24

there are a few other places to check if that's not it; ~/.lein/profiles.clj :java-cmd setting, IDE built in JDK, :java-cmd setting in your lein project.clj file

gdeer8119:08:53

those should point to the same place that where java points to

gdeer8119:08:08

or if you used the windows installer you can run the "configure leiningen installation" tool and set the jdk there

okwori20:08:07

Yeah, so I pointed it to java 8 from 7

okwori20:08:46

And I used this instead to just to make sure and reconfigure otherwise...

okwori20:08:32

Its fine now...

okwori22:08:11

Ohh, I cleared the cached for the past hour and its fine now 🙂