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

HTML resource not found #154

Open
owenRiddy opened this issue Jan 17, 2022 · 0 comments
Open

HTML resource not found #154

owenRiddy opened this issue Jan 17, 2022 · 0 comments

Comments

@owenRiddy
Copy link

I can't figure out why following the quickstart guide is giving me an error. This may be a bug.

/enlive % tree
.
├── deps.edn
├── main.clj
└── templates
    └── application.html

1 directory, 3 files

/enlive % cat deps.edn 
{:deps
 {
  enlive/enlive {:mvn/version "1.1.6"}
  }}

/enlive % cat main.clj 
(require '[net.cgrand.enlive-html :as html])

(html/deftemplate main-template "templates/application.html"
  [])

/enlive % cat templates/application.html 
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>This is a title placeholder</title>
  </head>
  <body>
  </body>
</html>

/enlive % clojure -M main.clj
Execution error (NullPointerException) at net.cgrand.tagsoup/parser (tagsoup.clj:30).
HTML resource not found.

Full stacktrace:

{:clojure.main/message
 "Execution error (NullPointerException) at net.cgrand.tagsoup/parser (tagsoup.clj:30).\nHTML resource not found.\n",
 :clojure.main/triage
 {:clojure.error/class java.lang.NullPointerException,
  :clojure.error/line 30,
  :clojure.error/cause "HTML resource not found.",
  :clojure.error/symbol net.cgrand.tagsoup/parser,
  :clojure.error/source "tagsoup.clj",
  :clojure.error/phase :execution},
 :clojure.main/trace
 {:via
  [{:type clojure.lang.Compiler$CompilerException,
    :message "Syntax error macroexpanding at (main.clj:3:1).",
    :data
    {:clojure.error/phase :execution,
     :clojure.error/line 3,
     :clojure.error/column 1,
     :clojure.error/source "main.clj"},
    :at [clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 3711]}
   {:type java.lang.NullPointerException,
    :message "HTML resource not found.",
    :at [net.cgrand.tagsoup$parser invokeStatic "tagsoup.clj" 30]}],
  :trace
  [[net.cgrand.tagsoup$parser invokeStatic "tagsoup.clj" 30]
   [net.cgrand.tagsoup$parser invoke "tagsoup.clj" 27]
   [net.cgrand.enlive_html$eval258$fn__259 invoke "enlive_html.clj" 89]
   [clojure.lang.MultiFn invoke "MultiFn.java" 234]
   [net.cgrand.enlive_html$html_resource
    invokeStatic
    "enlive_html.clj"
    69]
   [net.cgrand.enlive_html$html_resource invoke "enlive_html.clj" 66]
   [net.cgrand.enlive_html$html_resource
    invokeStatic
    "enlive_html.clj"
    72]
   [net.cgrand.enlive_html$html_resource invoke "enlive_html.clj" 66]
   [user$fn__1022 invokeStatic "main.clj" 3]
   [user$fn__1022 invoke "main.clj" 3]
   [clojure.lang.AFn applyToHelper "AFn.java" 152]
   [clojure.lang.AFn applyTo "AFn.java" 144]
   [clojure.lang.Compiler$InvokeExpr eval "Compiler.java" 3706]
   [clojure.lang.Compiler$DefExpr eval "Compiler.java" 457]
   [clojure.lang.Compiler eval "Compiler.java" 7186]
   [clojure.lang.Compiler load "Compiler.java" 7640]
   [clojure.lang.Compiler loadFile "Compiler.java" 7578]
   [clojure.main$load_script invokeStatic "main.clj" 475]
   [clojure.main$script_opt invokeStatic "main.clj" 535]
   [clojure.main$script_opt invoke "main.clj" 530]
   [clojure.main$main invokeStatic "main.clj" 664]
   [clojure.main$main doInvoke "main.clj" 616]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.main main "main.java" 40]],
  :cause "HTML resource not found.",
  :phase :execution}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant