legacy-knowledge-base
公開されました Jun. 30, 2025

DDMFormFieldOptionsFactoryImplによってスローされる "JSONArray text must start with "のDEBUGメッセージがログに多数表示される。

written-by

Sorin Pop

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

問題

  • 「JSONArray text must start with "というDEBUGメッセージが、Liferay Formsのいくつかの操作の実行時にログに書き込まれます。

2023-09-14 11:34:05.180 DEBUG [http-nio-8080-exec-40][DDMFormFieldOptionsFactoryImpl:214] null
com.liferay.portal.kernel.json.JSONException: org.json.JSONException:A JSONArray text must start with '[' at 1 [character 2 line 1]
at com.liferay.portal.json.JSONArrayImpl.<init>(JSONArrayImpl.java:61) ~[portal-impl.jar:?]
at com.liferay.portal.json.JSONFactoryImpl.createJSONArray(JSONFactoryImpl.java:154) ~[portal-impl.jar:?]

...

  • 私たちの開発環境では、100件以上のメッセージが書き込まれることがあります。

  • このメッセージによってFormsが動かなくなるということはないようですが、例えば「エントリーを表示する」に時間がかかるなど、操作が遅くなるようです。 そして、ログを扱いにくくする。

環境

  • 7.4

解像度

<liferay_home>/liferay/osgi/log4j/com.liferay.dynamic.data.mapping.form.field.type-log4j-ext.xml

というような内容である:

<xml version="1.0"?>
<DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<category name="com.liferay.dynamic.data.mapping.form.field.type.internal.DDMFormFieldOptionsFactoryImpl">
<priority value="DEBUG" />
</category>
</log4j:configuration>

DEBUGをINFOに変更することで、これらのメッセージを(サーバーの再起動をまたいでも)取り除くことができるはずだ。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base