immutant

http://immutant.org Note: dev discussion happens in #immutant on FreeNode IRC.
trancehime 2016-02-02T03:06:10.000019Z

@tcrawley: https://gist.github.com/trancehime/eabce83bce9eb849aa8c here is the gist of the stack trace. It's the same error for every single static file in the WAR deployment, so I'm just putting it in the gist once

2016-02-02T12:49:58.000021Z

@trancehime: odd, there is no immutant code in that stack. how are you deploying your servlet?

2016-02-02T12:51:10.000022Z

I suspect if you (require 'immutant.web.internal.ring), your problem will go away, since that's what triggers the defmethod call for vfs: urls

2016-02-02T12:51:24.000023Z

and that must not be happening with whatever code path you are using

2016-02-02T12:52:07.000024Z

we should probably move that trigger to another namespace to cover cases where the ring ns doesn't get loaded

2016-02-02T12:53:33.000025Z

hmm, are you creating your war file with lein immutant war, or some other method?

trancehime 2016-02-02T12:59:38.000026Z

Yes, I am using lein immutant war

2016-02-02T12:59:52.000027Z

howdy!

trancehime 2016-02-02T13:00:00.000028Z

Hallo~

2016-02-02T13:00:01.000029Z

our timezones align!

trancehime 2016-02-02T13:00:16.000030Z

Yes, it surely is inconvenient that I am located in Asia :^)

2016-02-02T13:00:34.000031Z

let's say it's inconvenient that I'm located in the US :)

2016-02-02T13:01:20.000032Z

how are you deploying your servlet within your :main?

trancehime 2016-02-02T13:01:23.000033Z

Wait, hold on a second. I think there is a miscommunication

trancehime 2016-02-02T13:02:05.000034Z

The stack trace has no immutant code in it because it wasn't made using Immutant, I got mixed up with a separate web app that I am actually building with lein immutant war which has a totally different issue (I'm getting 403 errors)

2016-02-02T13:03:34.000035Z

ah, for the non-immutant app, you'll need to copy https://github.com/immutant/immutant/blob/master/web/src/immutant/web/internal/ring.clj#L155-L171 into your app, since WildFly will give you :vfs urls, and ring won't understand those

2016-02-02T13:04:10.000037Z

except you won't have try-resolve, since that's an immutant fn

trancehime 2016-02-02T13:04:34.000038Z

Hmm. I see

trancehime 2016-02-02T13:05:34.000039Z

Interestingly, the webapp I built with lein immutant war seems to produce no errors upon deployment, but when I try to access it, I get 403 errors. Which realy confused me. Then again it's being fronted by nginx. So I dunno

2016-02-02T13:05:53.000040Z

but try-resolve is pretty simple: https://github.com/immutant/immutant/tree/master/core/src/immutant/internal/util.clj#L61

2016-02-02T13:06:09.000042Z

can you try accessing it directly (bypassing nginx)?

trancehime 2016-02-02T13:07:10.000043Z

I was unable to

2016-02-02T13:08:14.000044Z

can you access it from the machine it is running on via curl?

trancehime 2016-02-02T13:09:00.000045Z

I can't try that right now but if I could, what would that mean?

2016-02-02T13:09:47.000046Z

if you can curl routes in WildFly and not get a 403, that would point to a misconfiguration in nginx I'd think

trancehime 2016-02-02T13:10:51.000047Z

Hmm. Okay

trancehime 2016-02-02T13:11:13.000048Z

Thanks for your patience and everything

2016-02-02T13:11:21.000049Z

I'm happy to help!

trancehime 2016-02-02T13:13:34.000050Z

It's a big deal for me 😃