weavejester / ragtime

Database-independent migration library
Eclipse Public License 1.0
610 stars 85 forks source link

Compilation Error (Windows) #95

Closed jbeja closed 8 years ago

jbeja commented 8 years ago

Hi, I am trying your duct template with the +ragtime flag and I am getting the following exception while starting the repl:

java.lang.ExceptionInInitializerError
        at clojure.main.<clinit>(main.java:20)
Caused by: java.util.regex.PatternSyntaxException: Unclosed character class near i
([^\]*)\?$
         ^, compiling:(ragtime/jdbc.clj:83:1)
        at clojure.lang.Compiler.load(Compiler.java:7239)
        at clojure.lang.RT.loadResourceScript(RT.java:371)
        at clojure.lang.RT.loadResourceScript(RT.java:362)
        at clojure.lang.RT.load(RT.java:446)
        at clojure.lang.RT.load(RT.java:412)
        at clojure.core$load$fn__5448.invoke(core.clj:5866)
        at clojure.core$load.doInvoke(core.clj:5865)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invoke(core.clj:5671)
        at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
        at clojure.core$load_lib.doInvoke(core.clj:5710)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invoke(core.clj:632)
        at clojure.core$load_libs.doInvoke(core.clj:5749)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:632)
        at clojure.core$require.doInvoke(core.clj:5832)
        at clojure.lang.RestFn.invoke(RestFn.java:482)
        at duct.component.ragtime$eval3668$loading__5340__auto____3669.invoke(ragt
        at duct.component.ragtime$eval3668.invoke(ragtime.clj:1)
        at clojure.lang.Compiler.eval(Compiler.java:6782)
        at clojure.lang.Compiler.eval(Compiler.java:6771)
        at clojure.lang.Compiler.load(Compiler.java:7227)
        at clojure.lang.RT.loadResourceScript(RT.java:371)
        at clojure.lang.RT.loadResourceScript(RT.java:362)
        at clojure.lang.RT.load(RT.java:446)
        at clojure.lang.RT.load(RT.java:412)
        at clojure.core$load$fn__5448.invoke(core.clj:5866)
        at clojure.core$load.doInvoke(core.clj:5865)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invoke(core.clj:5671)
        at clojure.core$load_lib$fn__5397.invoke(core.clj:5711)
        at clojure.core$load_lib.doInvoke(core.clj:5710)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invoke(core.clj:632)
        at clojure.core$load_libs.doInvoke(core.clj:5749)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:632)
        at clojure.core$require.doInvoke(core.clj:5832)
        at clojure.lang.RestFn.invoke(RestFn.java:1289)
        at user$eval3$loading__5340__auto____4.invoke(user.clj:1)
        at user$eval3.invoke(user.clj:1)
        at clojure.lang.Compiler.eval(Compiler.java:6782)
        at clojure.lang.Compiler.eval(Compiler.java:6771)
        at clojure.lang.Compiler.load(Compiler.java:7227)
        at clojure.lang.RT.loadResourceScript(RT.java:371)
        at clojure.lang.RT.loadResourceScript(RT.java:358)
        at clojure.lang.RT.maybeLoadResourceScript(RT.java:354)
        at clojure.lang.RT.doInit(RT.java:468)
        at clojure.lang.RT.<clinit>(RT.java:330)
        ... 1 more
Caused by: java.util.regex.PatternSyntaxException: Unclosed character class near i
([^\]*)\?$
         ^
        at java.util.regex.Pattern.error(Pattern.java:1955)
        at java.util.regex.Pattern.clazz(Pattern.java:2548)
        at java.util.regex.Pattern.sequence(Pattern.java:2063)
        at java.util.regex.Pattern.expr(Pattern.java:1996)
        at java.util.regex.Pattern.group0(Pattern.java:2905)
        at java.util.regex.Pattern.sequence(Pattern.java:2051)
        at java.util.regex.Pattern.expr(Pattern.java:1996)
        at java.util.regex.Pattern.compile(Pattern.java:1696)
        at java.util.regex.Pattern.<init>(Pattern.java:1351)
        at java.util.regex.Pattern.compile(Pattern.java:1028)
        at clojure.core$re_pattern.invoke(core.clj:4641)
        at ragtime.jdbc$eval4485.invoke(jdbc.clj:83)
        at clojure.lang.Compiler.eval(Compiler.java:6782)
        at clojure.lang.Compiler.load(Compiler.java:7227)
        ... 50 more
Exception in thread "main" Exception in thread "Thread-3" clojure.lang.ExceptionIn
        at clojure.core$ex_info.invoke(core.clj:4593)
        at leiningen.core.eval$fn__5830.invoke(eval.clj:255)
        at clojure.lang.MultiFn.invoke(MultiFn.java:233)
        at leiningen.core.eval$eval_in_project.invoke(eval.clj:356)
        at leiningen.repl$server$fn__11848.invoke(repl.clj:243)
        at clojure.lang.AFn.applyToHelper(AFn.java:152)
        at clojure.lang.AFn.applyTo(AFn.java:144)
        at clojure.core$apply.invoke(core.clj:630)
        at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1868)
        at clojure.lang.RestFn.invoke(RestFn.java:425)
        at clojure.lang.AFn.applyToHelper(AFn.java:156)
        at clojure.lang.RestFn.applyTo(RestFn.java:132)
        at clojure.core$apply.invoke(core.clj:634)
        at clojure.core$bound_fn_STAR_$fn__4439.doInvoke(core.clj:1890)
        at clojure.lang.RestFn.invoke(RestFn.java:397)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.lang.Thread.run(Thread.java:745)

I suppose is related to this line:

83: (let [pattern (re-pattern (str "([^\\" File/separator "]*)\\" File/separator "?$"))]

Anyways I am in a Windows 8 machine using Java8.

weavejester commented 8 years ago

This should already be fixed in Ragtime 0.5.2, but the Duct template hasn't been updated to match.

weavejester commented 8 years ago

This should now be fixed in the Duct template. To fix it in an existing project, update the duct/ragtime-component dependency to "0.1.3".