legacy-knowledge-base
公開されました Sep. 10, 2025

DXPで、多くのjar依存関係を持つWARファイルのデプロイメントが非常に遅くなる

written-by

Zalán Szakolci

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • WEB-INF/libに多くのjarの依存関係を含むwarファイルがある場合、DXPのosgiフレームワークへのデプロイに時間がかかりすぎ、1つのwarに20分かかることもあります。

環境

  • Liferay DXP 7.0+

解像度

  • LPS-86820を含むHotfixを構築するため、Liferayサポートにお問い合わせください。

追加情報

  • osgi フレームワークに war ファイルをデプロイするとき、WAB ジェネレーターは注釈をチェックするためにすべてのクラスをスキャンするので、 ServletContainerInitializer に対してクラスパスの完全スキャンが実行されます(すべてのスキャンを 1 回行うのではなく)これは 2 次的な時間を必要とします。
    また、osgiフレームワークが扱えるオープンファイルの数には制限があり、デフォルトでは100に設定されています。 この制限には簡単に達してしまい、一旦達すると新しいファイルの処理に大きなオーバーヘッドが発生します。
  • LPS-86820 は、多くの最適化を含んでいます。 :
  • module.framework.properties.osgi.bundlefile.limit=100000 ファイル制限を増やすためにを追加しています。
  • アノテーションスキャンは、例えばポータルプロパティで ブラックリスト に登録できるようになりました:
    module.framework.web.servlet.annotation.scanning.blacklist=\
        antlr/,\
        ch/qos/logback/,\
        com/ctc/wstx/,\
        com/fasterxml/jackson/,\
        com/google/,\
        com/ibm/,\
        com/liferay/,\
        com/netflix/,\
        com/sun/,\
        com/thoughtworks/,\
        de/odysseus/el/,\
        edu/umd/cs/findbugs/,\
        io/swagger/annotations/,\
        javassist/,\
        javax/,\
        jersey/repackaged/,\
        net/jcip/,\
        net/logstash/,\
        net/minidev/,\
        net/oauth/,\
        net/sf/cglib/,\
        net/sf/ehcache/,\
        nu/validator/,\
        ognl/,\
        org/antlr/,\
        org/aopalliance/,\
        org/apache/axis/,\
        org/apache/commons/,\
        org/apache/cxf/,\
        org/apache/el/,\
        org/apache/http/,\
        org/apache/log4j/,\
        org/apache/neethi/,\
        org/apache/sanselan/,\
        org/apache/shindig/,\
        org/apache/shiro/,\
        org/apache/taglibs/,\
        org/apache/tools/,\
        org/apache/velocity/,\
        org/apache/ws/,\
        org/apache/xml/,\
        org/codehaus/,\
        org/cyberneko/,\
        org/eclipse/,\
        org/glassfish/,\
        org/hibernate/,\
        org/jboss/logging/,\
        org/jdom/,\
        org/joda/,\
        org/json/,\
        org/jsoup/,\
        org/jvnet/,\
        org/objectweb/asm/,\
        org/osgi/,\
        org/slf4j/,\
        org/springframework/aop/,\
        org/springframework/asm/,\
        org/springframework/beans/,\
        org/springframework/cache/,\
        org/springframework/cglib/,\
        org/springframework/context/,\
        org/springframework/core/,\
        org/springframework/ejb/,\
        org/springframework/expression/,\
        org/springframework/format/,\
        org/springframework/http/,\
        org/springframework/instrument/,\
        org/springframework/jmx/,\
        org/springframework/jndi/,\
        org/springframework/lang/,\
        org/springframework/mail/,\
        org/springframework/mock/,\
        org/springframework/objenesis/,\
        org/springframework/remoting/,\
        org/springframework/scheduling/,\
        org/springframework/scripting/,\
        org/springframework/stereotype/,\
        org/springframework/test/,\
        org/springframework/ui/,\
        org/springframework/util/,\
        org/springframework/validation/,\
        org/springframework/web/,\
        org/thymeleaf/,\
        org/unbescape/,\
        org/xmlpull/,\
        org/yaml/

  • アノテーション付きクラスがキャッシュ 0>されるようになりました(これにより、2回目の起動がはるかに高速になります)
  • bnd プラグインを無効にするサポートの追加
    ポータルのプロパティで、WAB の bnd プラグインを無効にすることができるようになりました。
    WAR に bnd プラグインが必要ないことが分かっている場合、これを無効にすることで起動時のパフォーマンスが向上するはずです。

    #
    # Set These to False to Disable Web Generator Bnd Plugins
    #
    #module.framework.web.generator.bnd.plugin.enabled[aQute.bnd.cdi.CDIAnnotations]=false
    #module.framework.web.generator.bnd.plugin.enabled[aQute.bnd.metatype.MetatypeAnnotations]=false
did-this-article-resolve-your-issue

legacy-knowledge-base