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

Bug in Tomcat startup caused by missing path #55

Open
simon-brooke opened this issue Feb 12, 2022 · 1 comment
Open

Bug in Tomcat startup caused by missing path #55

simon-brooke opened this issue Feb 12, 2022 · 1 comment
Labels

Comments

@simon-brooke
Copy link
Collaborator

I'm seeing repeated instances of this in the Goldsmith tomcat localhost log:

12-Feb-2022 10:51:10.686 SEVERE [localhost-startStop-1] org.apache.catalina.core
.StandardContext.listenerStart Exception sending context initialized event to li
stener instance of class [smeagol.listener]

...
	Caused by: java.lang.Exception: Directory does not exist: resources/publ
ic/content
		at ring.middleware.file$ensure_dir.invokeStatic(file.clj:17)
		at ring.middleware.file$ensure_dir.invoke(file.clj:12)
		at ring.middleware.file$wrap_file.invokeStatic(file.clj:47)
		at ring.middleware.file$wrap_file.invoke(file.clj:35)
		at smeagol.middleware$fn__13563.invokeStatic(middleware.clj:54)
		at smeagol.middleware$fn__13563.invoke(middleware.clj:51)

It's not altogether clear where this comes from, but it may come from #(wrap-resource % "public") in:

(def production-middleware
  [#(wrap-internal-error % :log (fn [e] (log/error e)))
   wrap-anti-forgery
   #(wrap-resource % "public")
   smeagol-wrap-content-type
   #(try
      (wrap-file % util/content-dir
                 {:index-files? false :prefer-handler? true})
      (catch Exception error
        (log/fatal "Could not locate content dir" util/content-dir error)
        %))
   wrap-not-modified])
@simon-brooke
Copy link
Collaborator Author

This does not stop Tomcat starting up, and as far as I can see it doesn't stop any Smeagol instances starting up, but it isn't good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant