0

我使用 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
4

1 回答 1

0

作为更新。我将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访问 webapp 时,我得到一个ERROR 500: Something very bad occurred,并且在控制台日志中没有反映或打印任何错误。

于 2016-11-10T11:14:14.177 回答