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

SAMLプラグイン

written-by

Pooja Bhambani

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

問題

  • SAMLプラグイン(saml-opensaml-integration 3.0.30)をサーバーにデプロイした後。 ランタイムエラーが出ます。 しかし、ビルド & デプロイは成功しています。
  • 再現するための手順
    1. SAMLソースコード(v5.0.1) saml-opensaml-integration 3.0.30 をマーケットプレイスからダウンロードします。
    2. 2.build.gradleファイルを少し変更する(コンパイルオンリーのため、プロジェクトからの直接依存となる。 そこで、LPKGファイルにあるのと同じバージョンに変更しました)。
    3. Build & 作成したプロジェクトをデプロイします。
    4. デプロイメントが成功する。
    5. 実行中のサーバーにjarファイルをデプロイします。
    6. デプロイ後、NoClassDefFoundErrorエラーが発生します。

Environment

  • Liferay DXP 7.2
  • SAMLバージョン5.0.1

解決策

  • NoClassDefFoundErrorを解決するためには、build.gradleファイル内の以下の行を変更する必要があります。
    compileOnly project(":apps:portal-security:portal-security-export-import-api")
           compileOnly project(":apps:static:osgi:osgi-util")
           compileOnly project(":apps:static:portal-configuration:portal-configuration-metatype-api")
           compileOnly project(":core:osgi-service-tracker-collections")
           compileOnly project(":core:petra:petra-string")
           compileOnly project(":dxp:apps:saml:saml-api")
           compileOnly project(":dxp:apps:saml:saml-persistence-api")
    

    上記の compileOnly project の依存関係を、以下の CompileOnly group の依存関係に置き換えてください。

    compileOnly group: "com.liferay", name: "com.liferay.portal.security.exportimport.api", version: "4.0.3"
    compileOnly group: "com.liferay", name: "com.liferay.osgi.util", version: "5.1.0"
    compileOnly group: "com.liferay", name: "com.liferay.portal.configuration.metatype.api", version: "2.0.13"
    compileOnly group: "com.liferay", name: "com.liferay.osgi.service.tracker.collections", version: "4.0.0"
    compileOnly group: "com.liferay", name: "com.liferay.petra.string", version: "3.0.3"
    compileOnly group: "com.liferay", name: "com.liferay.saml.api", version: "3.0.15"
    compileOnly group: "com.liferay", name: "com.liferay.saml.persistence.api", version: "3.0.14"
  • また、ビルドしたjarの Import-PackageヘッダMANIFEST.MF ファイルから完全に抜け落ちています。 そのため、bnd.bndファイルに以下の行を追加する必要があります。
    Import-Package:\
    aQute.bnd.annotation.metatype;version="[1.45,2)",com.liferay.document.library.kernel.exception;version="[2.0,3)",com.liferay.document.library.kernel.store;version="[1.2,2)",com.liferay.expando.kernel.model;version="[2.1,3)",com.liferay.osgi.service.tracker.collections.map;version="[2.0,3)",com.liferay.petra.string;version="[1.4,2)",com.liferay.portal.configuration.metatype.annotations;version="[1.3,2)",com.liferay.portal.configuration.metatype.bnd.util;version="[2.0,3)",com.liferay.portal.kernel.bean;version="[7.1,8)",com.liferay.portal.kernel.configuration;version="[6.3,7)",com.liferay.portal.kernel.exception;version="[8.3,9)",com.liferay.portal.kernel.io.unsync;version="[6.2,7)",com.liferay.portal.kernel.json;version="[8.6,9)",com.liferay.portal.kernel.log;version="[7.0,8)",com.liferay.portal.kernel.model;version="[3.0,4)",com.liferay.portal.kernel.security;version="[6.2,7)",com.liferay.portal.kernel.security.auth;version="[2.2,3)",com.liferay.portal.kernel.service;version="[2.8,3)",com.liferay.portal.kernel.theme;version="[2.1,3)",com.liferay.portal.kernel.util;version="[9.19,10)",com.liferay.portal.security.exportimport;version="[1.0,2)",com.liferay.saml.persistence.exception;version="[1.0,2)",com.liferay.saml.persistence.model;version="[2.0,3)",com.liferay.saml.persistence.service;version="[2.0,3)",com.liferay.saml.runtime;version="[1.0,2)",com.liferay.saml.runtime.certificate;version="[1.0,2)",com.liferay.saml.runtime.configuration;version="[2.0,3)",com.liferay.saml.runtime.credential;version="[1.0,2)",com.liferay.saml.runtime.exception;version="[1.0,2)",com.liferay.saml.runtime.metadata;version="[2.0,3)",com.liferay.saml.runtime.servlet.profile;version="[1.0,2)",com.liferay.saml.util;version="[2.1,3)",javax.crypto,javax.crypto.interfaces,javax.crypto.spec,javax.json,javax.json.stream,javax.management,javax.naming,javax.naming.directory,javax.naming.ldap,javax.net,javax.net.ssl,javax.persistence,javax.script,javax.security.auth.callback,javax.security.auth.x500,javax.security.cert,javax.servlet,javax.servlet.http,javax.sql,javax.swing,javax.swing.border,javax.swing.event,javax.swing.text,javax.xml.bind,javax.xml.bind.annotation,javax.xml.bind.annotation.adapters,javax.xml.crypto,javax.xml.crypto.dom,javax.xml.crypto.dsig,javax.xml.crypto.dsig.dom,javax.xml.crypto.dsig.keyinfo,javax.xml.crypto.dsig.spec,javax.xml.datatype,javax.xml.namespace,javax.xml.parsers,javax.xml.stream,javax.xml.stream.events,javax.xml.stream.util,javax.xml.transform,javax.xml.transform.dom,javax.xml.transform.sax,javax.xml.transform.stream,javax.xml.validation,javax.xml.xpath,org.apache.commons.httpclient.params,org.apache.commons.httpclient.protocol,org.apache.commons.logging,org.apache.log4j,org.ietf.jgss,org.jdom,org.jdom.input,org.jdom.output,org.osgi.framework;version="[1.8,2)",org.osgi.framework.wiring;version="[1.2,2)",org.slf4j,org.w3c.dom,org.w3c.dom.events,org.w3c.dom.ls,org.w3c.dom.ranges,org.w3c.dom.traversal,org.w3c.dom.views,org.w3c.dom.xpath,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers,sun.misc,\
    	!bsh,\
    	\
    	!com.beust.jcommander.*,\
    	\
    	!com.google.common.*,\
    	!com.google.errorprone.*,\
    	\
    	!com.sun.*,\
    	\
    	!com.swabunga.*,\
    	\
    	!com.werken.*,\
    	\
    	!javax.annotation.*,\
    	\
    	!net.fortuna.*,\
    	\
    	!net.jcip.*,\
    	\
    	!net.sf.ehcache,\
    	\
    	!net.shibboleth.utilities.java.support.annotation.*,\
    	\
    	!net.spy.memcached.*,\
    	\
    	!nu.xom,\
    	\
    	!org.apache.axis.*,\
    	!org.apache.commons.configuration,\
    	!org.apache.commons.ssl,\
    	!org.apache.log.*,\
    	!org.apache.oro.*,\
    	!org.apache.poi.*,\
    	!org.apache.tools.ant.*,\
    	!org.apache.avalon.framework.logger.*,\	
    	\
    	!org.checkerframework.*,\
    	\
    	!org.joda.convert,\
    	\
    	!org.ldaptive.*,\
    	\
    	!org.owasp.validator.html,\
    	\
    	!org.relaxng.datatype.*,\
    	\
    	!sun.io,\
    	\
    	*

追加情報

  • サーバーに既に存在する既存のlpkgファイルをカスタマイズすることをお勧めします。 そこで、カスタマイズしたlpkgファイルを上書きし、名前を変更することで、コンフリクトの問題を克服する必要があります。
  • また、プライベートなソースコードは、GitHubでお客様に公開することはできません。 サポートに連絡して、ソースを教えてもらうこともできるそうです。 また、ソースコード入手の方針により、ソースと一緒にビルドスクリプトを渡すことはしていません。
  • lpkgファイルのオーバーライド
  • プライベートモジュールのソースコード利用ポリシー
did-this-article-resolve-your-issue

legacy-knowledge-base