【问题标题】:How to deploy Clojure/Luminus uberwar in Weblogic 12.c如何在 Weblogic 12.c 中部署 Clojure/Luminus uberwar
【发布时间】:2016-11-10 10:06:09
【问题描述】:

我使用 Clojure 和 Luminus Web 框架创建了一个微服务 PoC,并通过 lein uberwar 打包成一个 WAR。

它已经过测试,并且在 ImmutantTomcat 服务器中正确部署和运行。我们的生产环境是 Oracle Weblogic 12c。为了避免一些错误,我在战争中创建了一个 weblogic.xml 文件,内容如下:

<?xml version='1.0' encoding='UTF-8'?>
<weblogic-web-app
    xmlns="http://www.bea.com/ns/weblogic/90"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
<container-descriptor>
  <filter-dispatched-requests-enabled>false</filter-dispatched-requests-enabled>
  <prefer-web-inf-classes>true</prefer-web-inf-classes>      
</container-descriptor>

但是我得到这个内部错误,好像服务器没有检测到应用程序的入口点。

<Nov 10, 2016 9:25:57 AM UTC> <Warning> <HTTP> <BEA-101162> <User defined listener mu_publisher.listener failed: java.lang.RuntimeException: could not start [#'mu-publisher.handler/init-app] due to.
java.lang.RuntimeException: could not start [#'mu-publisher.handler/init-app] due to
at mount.core$up$fn__4349.invoke(core.cljc:92)
at mount.core$up.invokeStatic(core.cljc:92)
at mount.core$up.invoke(core.cljc:90)
at mount.core$bring.invokeStatic(core.cljc:206)
at mount.core$bring.invoke(core.cljc:198)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalArgumentException: No implementation of method: :enabled? of protocol: #'clojure.tools.logging.impl/Logger found for class: org.slf4j.impl.JDK14LoggerAdapter
at clojure.core$_cache_protocol_fn.invokeStatic(core_deftype.clj:568)
at clojure.core$_cache_protocol_fn.invoke(core_deftype.clj:560)
at clojure.tools.logging.impl$fn__51$G__44__58.invoke(impl.clj:16)
at mu_publisher.env$fn__225.invokeStatic(env.clj:7)
at mu_publisher.env$fn__225.invoke(env.clj:6)
Truncated. see log file for complete stacktrace

【问题讨论】:

    标签: clojure weblogic12c luminus


    【解决方案1】:

    作为更新。我将 weblogic.xml 修改为:

    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-web-app
        xmlns="http://www.bea.com/ns/weblogic/90"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
    <container-descriptor>
      <filter-dispatched-requests-enabled>false</filter-dispatched-requests-enabled>
      <prefer-application-packages>
          <package-name>org.slf4j</package-name>
          <package-name>org.joda.*</package-name>
      </prefer-application-packages>    </container-descriptor>
    

    所以我不再收到错误消息。但是当我尝试通过 http://localhost:8001/mu-publisher 访问 web 应用程序时,我得到一个 ERROR 500:发生了非常糟糕的事情,并且在控制台日志中没有反映或打印任何错误。

    【讨论】:

    • 如果这是更新,您应该更新您的问题。
    猜你喜欢
    • 1970-01-01
    • 2018-01-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-22
    • 2021-03-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多