This problem keeps happening intermittently, I managed to track it
down to a rare combination of restarting the app but not deleting the
session cookie, so that I restart the app and there is already some
cookie data present that the new app is not expecting. Not sure what
goes wrong, but something does. If anyone else runs into, the solution
was as simple as deleting all cookies when I restart the app.


On 18 Sty, 03:15, larry google groups <lawrencecloj...@gmail.com>
wrote:
> Hmm, strange. I have had a lot of problems trying to get Friend to
> work. I have been wrestling with it, on and off, for 2 days, and I
> have not gotten it to work. I just removed all the paths that had to
> do anything with Friend, and now the paths to my images and CSS and
> Javascript are working. Not sure if that is coincident to something
> else, or whether the cause is somehow direct.
>
> On Jan 18, 3:08 am, larry google groups <lawrencecloj...@gmail.com>
> wrote:
>
>
>
>
>
>
>
> > I searched on Google but found little about this error.
>
> > I was leaving work, where my app was working, and so I did "git push
> > origin master" and sent it all to Github, I got home and did "git pull
> > origin master" to pull everything onto my machine (work is a Mac
> > running OSX 10.8 and at home I've got a Mac running OSX 10.7).
>
> > Then I ran "lein uberjar" and then I started the app with "java -jar
> > discovery-0.9-standalone.jar 30000
>
> > And then I pointed my browser tohttp://localhost:30000
>
> > For all of the static resources, I got errors like this:
>
> > 2013-01-18 02:54:04.900:WARN:oejs.AbstractHttpConnection:/css/
> > bootstrap-and-combined-libraries.css
> > java.lang.NoClassDefFoundError: org/eclipse/jetty/http/MimeTypes
>
> > All of a sudden, the app is not finding the CSS files, or the images,
> > or the Javascript. My routes are setup in Compojure like this:
>
> > (defroutes app-routes
> >   (GET "/" request (index request))
> >   (GET "/search-results" request (search-results request))
> >   (GET "/schema" request (schema request))
> >   (GET "/account" request (friend/authorize #{::user} {} (account
> > request)))
> >   (GET "/admin" request (friend/authorize #{::admin} {} (admin
> > request)))
> >   (friend/logout (ANY "/logout" request (ring.util.response/redirect
> > "/")))
> >   (GET "/login" request (login request))
> >   (route/not-found "Page not found"))
>
> > (def app
> >     (-> app-routes
> >         (friend/authenticate {:credential-fn (partial creds/bcrypt-
> > credential-fn users)
> >                               :workflows [(workflows/interactive-
> > form)]})
> >         (wrap-resource "public")
> >         (wrap-session {:cookie-name "discovery-session" :cookie-attrs
> > {:max-age 10000 }})
> >         (wrap-cookies)
> >         (wrap-keyword-params)
> >         (wrap-nested-params)
> >         (wrap-params)))
>
> > (defn -main [& args]
> >   (let [port (Integer/parseInt (first args))]
> >     (try
> >       (run-jetty #'app {:port (or port 8080) :join? false})
> >       (catch Exception e (debug/print-error-info e)))))
>
> > I actually saw this problem for about 5 minutes this afternoon at
> > work. But then the problem fixed itself so I forgot about it. But now
> > it is back and nothing I do seems to fix it. The CSS and images are
> > paths like this:
>
> > resources
> >     public
> >         css
> >         images
> >         js
> > src
> >     discovery
> >         core.clj
>
> > If I hit "view source" in the browser and then click on the links for
> > the CSS I get a 404 error:
>
> >     <link href="/css/bootstrap-and-combined-libraries.css"
> > rel="stylesheet">
> >     <link href="/css/discovery.css" rel="stylesheet">
>
> > But this was working when I left work, and, as I say, all I did was
> > get home, pull down the changes, rebuild the app and launch it. I am
> > not clear what might have changed to cause this error.
>
> > Any thoughts?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to