問題
- system-ext.properties で SAX パーサーを設定すると、次の例外がスローされます。
-
org.xml.sax.SAXException: SAX2 driver class com.sun.org.apache.xerces.internal.parsers.SAXParser not found_java.lang.ClassNotFoundException: com.sun.org.apache.xerces.internal.parsers.SAXParser
Environment
- Liferay DXP 7.2
- Liferay DXP 7.3
解決策
- 1. SAXParser クラスは 7.2 で変更され、system-ext.properties で次のプロパティを使用する必要があります。
org.xml.sax.driver=org.apache.xerces.parsers.SAXParser
- 2. また、 portal-ext.properties の module.framework.properties.org.osgi.framework.bootdelegation プロパティに SAXParser のパッケージを追加する必要があります:
module.framework.properties.org.osgi.framework.bootdelegation=\ __redirected,\ com.liferay.aspectj,\ com.liferay.aspectj.*,\ com.liferay.expando.kernel.model,\ com.liferay.portal.servlet.delegate,\ com.liferay.portal.servlet.delegate*,\ com.sun.ccpp,\ com.sun.ccpp.*,\ com.sun.crypto.*,\ com.sun.image.*,\ com.sun.imageio.plugins.*,\ com.sun.jmx.*,\ com.sun.jna,\ com.sun.jndi.*,\ com.sun.mail.*,\ com.sun.management.*,\ com.sun.media.*,\ com.sun.msv.*,\ com.sun.org.*,\ com.sun.syndication,\ com.sun.tools.*,\ com.sun.xml.*,\ com.yourkit.*,\ javassist.util.proxy,\ jdk.*,\ org.hibernate.proxy,\ sun.*,\ weblogic.jndi,\ weblogic.jndi.*,\ org.apache.xerces.parsers