This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-14
Channels
- # beginners (74)
- # boot (23)
- # braid-chat (7)
- # cider (5)
- # clara (3)
- # cljsjs (17)
- # cljsrn (1)
- # clojure (105)
- # clojure-austin (9)
- # clojure-new-zealand (34)
- # clojure-poland (2)
- # clojure-russia (177)
- # clojure-uk (41)
- # clojure-ukraine (2)
- # clojurescript (130)
- # component (1)
- # core-async (2)
- # core-matrix (6)
- # cursive (7)
- # data-science (103)
- # datomic (24)
- # emacs (15)
- # funcool (4)
- # hoplon (21)
- # immutant (151)
- # ldnclj (76)
- # melbourne (1)
- # off-topic (8)
- # om (152)
- # om-next (1)
- # onyx (26)
- # parinfer (38)
- # re-frame (13)
- # reagent (14)
- # spacemacs (1)
- # vim (92)
- # yada (1)
Any tips on creating a WAR from BOOT that will work in wildfly 8.2? Going from the original deps in my POM that creates a working WAR, adding in hoplon front end deps,etc. When deploying it fails on NoClassDefFoundError: org/jboss/modules/Module. I never need this before. I add the dep to build.boot. The new WAR fails, says weld.weldclassintrospector is missing. Any Ides?
@symbit: how are you creating the war? are you using http://github.com/immutant/boot-immutant?
hmm, looks like we don't mention it in the WildFly guide, only lein-immutant: http://immutant.org/documentation/2.1.3/apidoc/guide-wildfly.html#h5392
Immutant-based wars need a little extra sauce in them so Immutant can tie in to WildFly internals
I'm not sure if it's relevant, but the NPE is at https://github.com/projectodd/wunderboss-release/blob/master/wildfly/core/src/main/java/org/projectodd/wunderboss/as/CoreServiceActivator.java#L33
Caused by: java.lang.NullPointerException at org.projectodd.wunderboss.as.CoreServiceActivator.activate(CoreServiceActivator.java:33) at org.jboss.as.server.deployment.service.ServiceActivatorProcessor.deploy(ServiceActivatorProcessor.java:70) [wildfly-server-8 .2.0.Final.jar:8.2.0.Final] at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.2.0.Final.jar:8.2.0.Final]
either no module of the identifier is null. I haven't used/need this before when using mvn package and the clojure-maven-plugin
interesting. are you inserting a jboss-deployment-structure.xml in that war? otherwise, you should see the NCDFE
the NPE likely means the module isn't found, which is probably happening because you are now bundling jboss-modules in the war, so there are two copies of the classes
and your app sees the "local" copy, instead of the one provided by the container, and the local copy can't find the correct module
hmm, I don't have an example beyond https://github.com/immutant/boot-immutant/blob/master/test-app/build.boot
the boot.immutant/immutant-war
task works similarly to lein immutant war
, and the options are doc'ed at: https://github.com/immutant/boot-immutant/blob/master/resources/deployment-guide.md
I'd expect a deftask like create-war that calls you boot-war task or something like that.
that test-app was there for me to manually confirm behavior via boot immutant-war
on the command-line
actually, I'll add a build.boot to the feature-demo now, that will be more useful/comprehensive I think
see if replacing (war)
with (boot.immutant/immutant-war)
(after adding [boot-immutant "0.5.0" :scope "test"]
as a dep) works
note that boot-immutant calls the uber task for you, but really should expect the uberjar to be in the fileset
I'm assuming I should remove/rename my statif files webapp/app.properties and WEB-INF/jboss-deployment-structure.xml andjboss-web.xml ?
added [boot-immutant "0.5.0" :scope "test"] to my deps. not requiring since it has the full path.., but getting ClassNotFoundException on boot.immutant
I'm getting a FNFE with my test-app now, so it may be that I haven't kept up with boot itself
I'm looking at what it would take to use the uberjar in the fileset instead of creating one
right, it currently calls uber no matter what, and expects the result to be in target/, unfortunately
sorry, trying to juggle a couple of things. right now, I can't seem to find any jars in the fileset after calling uber
(comp (hoplon) (cljs :optimizations :advanced) (aot) (pom) (web) (i/immutant-war) (target))
Adding target actually writes to the target directory, otherwise it goes through all steps, but does write anything at all.
ok, let me see if I can give you a hack that works for today as a SNAPSHOT, and try to fix it for real after
if you get exceptions, it's likely you don't have a valid war, since the war task calls uber w/o calling target, then looks for the jar in target/ for the war
The only thing written the target dir are the 3 config files. web.xml,jboss-web.xml and jboss-deplyment-structure.xml I think those are written by a different task.
those probably get put in the fileset by the immutant plugin before it tries to build the war
I just pushed a snapshot - can you try "0.6.0-SNAPSHOT" and see if it works for you?
this one, to be exact: https://clojurians.slack.com/archives/immutant/p1457986826000084
if it runs without exception, but you have no war output in target/, remove the (target)
call from the end of the chain, since I think it cleans by default
the immutant task breaks the rules and writes to target/ directly instead of to the fileset
it got farther. Wrote to the target dir, created a war in the wildfly dir. Then exception.
ah, can you try adding (set-env! :resource-paths #{"src"})
as well? (using whatever path you have for the source there)
:resource-paths #{"src/main/clojure" "......." "......."} :source-paths #{"src/main/clojure"})
clojure.lang.ArityException: Wrong number of args (0) passed to: not -modified/wrap-not-modified/fn--11837
https://github.com/pandeiro/boot-http/blob/master/src/pandeiro/boot_http/impl.clj#L126
and inside the container, you may be trying to start up http-kit instead of using the container's web server
When I created the 3 files 1 year ago with lein-immutant that was the hook to call into the client app.
there is an entry in app.properties that calls your init fn that you specify with :init-fn 'your.app/main
given that stack, it looks like something that is triggered in your init-fn. are you calling wrap-not-modified directly in your code?
https://github.com/immutant/immutant/blob/2.1.2/wildfly/src/immutant/wildfly.clj#L90 is the last non-clojure line in that stack, which is what makes me think it's an issue somewhere in your init-fn
it may be a version mismatch between the ring you bring in and the one immutant depends on, maybe
ugh, I just realized, my init-fn is pointing to the def handler and not the function where (run/handler is defined. Small difference between running dev in lein/jetty and prod in wildfly