Hi,

I tried to use the Immutant app server, some ClojureScript, and this little 
ring middleware https://github.com/jblomo/ring.middleware.clojurescript to 
"automatically" compile the ClojureScript and the resulting js.
Upon a web-request, ClojureScript's build function is called from within 
the ring-handler function as expected, but it crashes with an exception - 
see below.

Looking at some source code of Immutant and ClojureScript, I saw that 
ClojureScript calls getContextClassLoader on the currentThread, and expects 
it to have a 'findResources' function, which the effective classloader at 
that time, the ImmutantClassLoader does not define itself - though it's a 
protected method from the standard base class java.lang.ClassLoader.

So, is that a bug in ClojureScript?
Does anybody have an idea for a workaround (I have little experience with 
all of this, including classloaders)?


Stacktrace:
23:06:01,247 ERROR [stderr] (http-/127.0.0.1:8080-1) Exception: 
java.lang.IllegalArgumentException: No matching method found: findResources 
for class org.immutant.core.ImmutantClassLoader
23:06:01,247 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
       Reflector.java:53 clojure.lang.Reflector.invokeMatchingMethod
23:06:01,247 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
       Reflector.java:28 clojure.lang.Reflector.invokeInstanceMethod
23:06:01,247 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
         closure.clj:849 cljs.closure/get-upstream-deps*
23:06:01,247 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
            AFn.java:159 clojure.lang.AFn.applyToHelper
23:06:01,247 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
            AFn.java:151 clojure.lang.AFn.applyTo
23:06:01,247 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
            core.clj:601 clojure.core/apply
23:06:01,247 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
           core.clj:5620 clojure.core/memoize[fn]
23:06:01,247 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
         RestFn.java:397 clojure.lang.RestFn.invoke
23:06:01,248 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
         closure.clj:868 cljs.closure/build
23:06:01,248 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
    clojurescript.clj:44 
ring.middleware.clojurescript/wrap-clojurescript[fn]
23:06:01,248 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
    clojurescript.clj:38 
ring.middleware.clojurescript/wrap-clojurescript[fn]
23:06:01,248 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
            core.clj:106 compojure.core/routing[fn]
23:06:01,248 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
           core.clj:2390 clojure.core/some
23:06:01,248 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
            core.clj:106 compojure.core/routing
23:06:01,248 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
         RestFn.java:139 clojure.lang.RestFn.applyTo
23:06:01,248 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
            core.clj:603 clojure.core/apply
23:06:01,248 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
            core.clj:111 compojure.core/routes[fn]
23:06:01,248 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
            Var.java:415 clojure.lang.Var.invoke
23:06:01,248 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
           reload.clj:18 ring.middleware.reload/wrap-reload[fn]
23:06:01,248 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
       stacktrace.clj:15 ring.middleware.stacktrace/wrap-stacktrace-log[fn]
23:06:01,248 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
       stacktrace.clj:79 ring.middleware.stacktrace/wrap-stacktrace-web[fn]
23:06:01,248 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
             ring.clj:46 immutant.web.ring/handle-request[fn]
23:06:01,248 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
             ring.clj:42 immutant.web.ring/handle-request
23:06:01,248 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
            Var.java:423 clojure.lang.Var.invoke
23:06:01,248 ERROR [stderr] (http-/127.0.0.1:8080-1)                   
 ClojureRuntimeImpl.java:162 
org.immutant.runtime.impl.ClojureRuntimeImpl.invoke
23:06:01,249 ERROR [stderr] (http-/127.0.0.1:8080-1)                   
 ClojureRuntimeImpl.java:154 
org.immutant.runtime.impl.ClojureRuntimeImpl.invoke
23:06:01,249 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
     RingServlet.java:70 org.immutant.web.servlet.RingServlet.doRing
23:06:01,249 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
     RingServlet.java:47 org.immutant.web.servlet.RingServlet.doGet
23:06:01,249 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
    HttpServlet.java:734 javax.servlet.http.HttpServlet.service
23:06:02,291 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
    HttpServlet.java:847 javax.servlet.http.HttpServlet.service
23:06:02,291 ERROR [stderr] (http-/127.0.0.1:8080-1)               
 ApplicationFilterChain.java:295 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
23:06:02,291 ERROR [stderr] (http-/127.0.0.1:8080-1)               
 ApplicationFilterChain.java:214 
org.apache.catalina.core.ApplicationFilterChain.doFilter
23:06:02,291 ERROR [stderr] (http-/127.0.0.1:8080-1)                 
 StandardWrapperValve.java:230 
org.apache.catalina.core.StandardWrapperValve.invoke
23:06:02,291 ERROR [stderr] (http-/127.0.0.1:8080-1)                 
 StandardContextValve.java:149 
org.apache.catalina.core.StandardContextValve.invoke
23:06:02,291 ERROR [stderr] (http-/127.0.0.1:8080-1)       
SecurityContextAssociationValve.java:169 
org.jboss.as.web.security.SecurityContextAssociationValve.invoke
23:06:02,291 ERROR [stderr] (http-/127.0.0.1:8080-1)                     
StandardHostValve.java:145 org.apache.catalina.core.StandardHostValve.invoke
23:06:02,292 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
ErrorReportValve.java:97 org.apache.catalina.valves.ErrorReportValve.invoke
23:06:02,292 ERROR [stderr] (http-/127.0.0.1:8080-1)                   
StandardEngineValve.java:102 
org.apache.catalina.core.StandardEngineValve.invoke
23:06:02,292 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
  CoyoteAdapter.java:336 org.apache.catalina.connector.CoyoteAdapter.service
23:06:02,292 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
Http11Processor.java:856 org.apache.coyote.http11.Http11Processor.process
23:06:02,292 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
 Http11Protocol.java:653 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
23:06:02,292 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
    JIoEndpoint.java:920 org.apache.tomcat.util.net.JIoEndpoint$Worker.run
23:06:02,292 ERROR [stderr] (http-/127.0.0.1:8080-1)                       
         Thread.java:722 java.lang.Thread.run
23:06:02,292 ERROR [stderr] (http-/127.0.0.1:8080-1) 

 

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to