Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8951277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:37:34+00:00 2026-06-15T13:37:34+00:00

I was able to use these commands to generate and run a sample web

  • 0

I was able to use these commands to generate and run a sample web app from instrcution on this web site

https://github.com/ibdknox/lein-noir

lein new noir my-project-name
lein run

( I am using Leiningen 2.0.0-preview10 on Java 1.7.0_09 Java HotSpot(TM) Client VM )

The starter web app does run ok but I want to generate the war file which I can deploy manually to my application server (Websphere).

What command or configuration for Leingen 2 is needed to generate a war file for a Noir project?

To clarify, this command “lein new noir webpoc2” generate a noir project with this .clj file

(defproject webpoc1 "0.1.0-SNAPSHOT"
            :description "FIXME: write this!"
            :dependencies [[org.clojure/clojure "1.4.0"]
                           [noir "1.3.0-beta3"]]
            :main webpoc1.server)

If I add Ring to the cl file

:ring {
                   :handler webpoc1.server/handler

}

, and run lein ring uberwar, I get this :

Exception in thread "main" java.lang.RuntimeException: No such var: webpoc1.server/handler, compiling:(
/servlet.clj:1)
        at clojure.lang.Compiler.analyze(Compiler.java:6281)
        at clojure.lang.Compiler.analyze(Compiler.java:6223)
        at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3497)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6457)
        at clojure.lang.Compiler.analyze(Compiler.java:6262)
        at clojure.lang.Compiler.analyze(Compiler.java:6223)
        at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5618)
        at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5054)
        at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3674)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6453)
        at clojure.lang.Compiler.analyze(Compiler.java:6262)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6443)
        at clojure.lang.Compiler.analyze(Compiler.java:6262)
        at clojure.lang.Compiler.analyze(Compiler.java:6223)
        at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3548)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6457)
        at clojure.lang.Compiler.analyze(Compiler.java:6262)
        at clojure.lang.Compiler.analyze(Compiler.java:6223)
        at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3497)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6457)
        at clojure.lang.Compiler.analyze(Compiler.java:6262)
        at clojure.lang.Compiler.analyze(Compiler.java:6223)
        at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5618)
        at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5054)
        at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3674)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6453)
        at clojure.lang.Compiler.analyze(Compiler.java:6262)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6443)
        at clojure.lang.Compiler.analyze(Compiler.java:6262)
        at clojure.lang.Compiler.access$100(Compiler.java:37)
        at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:518)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6455)
        at clojure.lang.Compiler.analyze(Compiler.java:6262)
        at clojure.lang.Compiler.analyze(Compiler.java:6223)
        at clojure.lang.Compiler.compile1(Compiler.java:7030)
        at clojure.lang.Compiler.compile1(Compiler.java:7025)
        at clojure.lang.Compiler.compile(Compiler.java:7097)
        at clojure.lang.RT.compile(RT.java:387)
        at clojure.lang.RT.load(RT.java:427)
        at clojure.lang.RT.load(RT.java:400)
        at clojure.core$load$fn__4890.invoke(core.clj:5415)
        at clojure.core$load.doInvoke(core.clj:5414)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invoke(core.clj:5227)
        at clojure.core$compile$fn__4895.invoke(core.clj:5426)
        at clojure.core$compile.invoke(core.clj:5425)
        at user$eval3.invoke(NO_SOURCE_FILE:1)
        at clojure.lang.Compiler.eval(Compiler.java:6511)
        at clojure.lang.Compiler.eval(Compiler.java:6500)
        at clojure.lang.Compiler.eval(Compiler.java:6501)
        at clojure.lang.Compiler.eval(Compiler.java:6477)
        at clojure.core$eval.invoke(core.clj:2797)
        at clojure.main$eval_opt.invoke(main.clj:297)
        at clojure.main$initialize.invoke(main.clj:316)
        at clojure.main$null_opt.invoke(main.clj:349)
        at clojure.main$main.doInvoke(main.clj:427)
        at clojure.lang.RestFn.invoke(RestFn.java:421)
        at clojure.lang.Var.invoke(Var.java:419)
        at clojure.lang.AFn.applyToHelper(AFn.java:163)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.main.main(main.java:37)
Caused by: java.lang.RuntimeException: No such var: webpoc1.server/handler
        at clojure.lang.Util.runtimeException(Util.java:170)
        at clojure.lang.Compiler.resolveIn(Compiler.java:6740)
        at clojure.lang.Compiler.resolve(Compiler.java:6710)
        at clojure.lang.Compiler.analyzeSymbol(Compiler.java:6671)
        at clojure.lang.Compiler.analyze(Compiler.java:6244)
        ... 60 more
Subprocess failed

Since I am new to Noir (and Clojure), I am at a loss trying to figure this out

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:37:35+00:00Added an answer on June 15, 2026 at 1:37 pm

    Answering my question/ documenting my travails in leingen noir ring dependencies for other newbies. You may generate a noir project with “lein new noir … ” command , but update these files as follows if you want a war file .

    project.clj

    (defproject noir3 "0.1.0-SNAPSHOT"
                :description "FIXME: write this!"
                :dependencies [[org.clojure/clojure "1.4.0"]
                               [noir "1.3.0-beta10"]
                               [hiccup "1.0.2"]
                               [cheshire "4.0.3"]
                               ]
                :plugins [[lein-ring "0.7.5"]]
                :ring {:handler noir3.server/handler}            
    
                :main noir3.server)
    

    server.clj

    (ns noir3.server
      (:require [noir.server :as server]))
    
    ;;(server/load-views-ns 'noir3.views)
    
    (server/load-views "src/noir3/views/")
    
    
    (def handler (server/gen-handler {:mode :dev
                                      :ns 'noir3}))
    
    (defn -main [& m]
      (let [mode (keyword (or (first m) :dev))
            port (Integer. (get (System/getenv) "PORT" "8080"))]
        (server/start port {:mode mode
                            :ns 'noir3})))
    

    Then , run the following

    1. “lein run” (check if your pages are accessible),
    2. “lein ring server” (check if your pages are accessible),
    3. and finally “lein ring war” — you should see as war file in
      target dir
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app that needs to be able use either an sqlite3 datebase
The init() is able to use the parameter passed to it in this example:
I was able to use the code in this answer to access a value
I want to be able to use the iPhones Mail.app inside my application so
Is there any way to use an Entity as a model, and be able
I am able to use WebGrid in any controller like: var grid = new
Is anyone able to use Scala IDE in Eclipse with syntax highlighting showing different
I want to be able to use a wildcard in string::find and then fetch
I want to be able to use mklink to create symbolic links on my
I want to be able to use Python to open a .csv file like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.