ご返信ありがとうございます。
debugモードにしてクロール設定の追加コマンド(↓)を再実行してみました。
curl -L -H “Authorization: (アクセストークン)” -XPUT “localhost/api/admin/scheduler/setting” -d ‘{“name”:“Fess : https://fess.codelibs.org/",“description”:"Enterprise Search Server: Fess”,“urls”:“https://fess.codelibs.org/",“included_urls”:“https://fess.codelibs.org/.*”,“user_agent”:“Mozilla/5.0”,“num_of_thread”:1,“interval_time”:10000,“boost”:1,“available”:true,"sort_order”:0}’
結果、fess.log に「400 Bad Request」が出ていることが確認できました。
サンプル通りに実行しているつもりですが、どこがうまく行っていないかわかりますでしょうか。
(最初に書くのを忘れていましたが、Windows Server 2016 でfess を動かしていて、
curl を別途インストール(zip解凍)し、そこでcurlコマンド発行しています。)
=== fess.log ======================================
2022-10-22 14:57:16,752 [http-nio-80-exec-3] DEBUG * * * * * * * * * * {BEGIN}: /api/admin/scheduler/setting
requestClass=org.apache.catalina.connector.RequestFacade ; sessionId=null
; url=http://localhost/api/admin/scheduler/setting
; method=PUT ; protocol=HTTP/1.1 ; scheme=http ; secure=false ; remoteAddr=127.0.0.1 ; remoteHost=127.0.0.1
; characterEncoding=UTF-8 ; contentLength=255 ; contentType=application/x-www-form-urlencoded ; locale=ja_JP ; locales=ja_JP
[header] accept=/
[header] authorization=(アクセストークン)
[header] content-length=255
[header] content-type=application/x-www-form-urlencoded
[header] host=localhost
[header] user-agent=curl/7.85.0
2022-10-22 14:57:16,792 [http-nio-80-exec-3] DEBUG …Routing to action: name=api_admin_scheduler_apiAdminSchedulerAction params={setting}
2022-10-22 14:57:16,794 [http-nio-80-exec-3] DEBUG by the mapping path: /api/admin/scheduler/setting
2022-10-22 14:57:16,796 [http-nio-80-exec-3] DEBUG …Saving user locale to session: ja_JP
2022-10-22 14:57:16,797 [http-nio-80-exec-3] DEBUG #flow …Parsing JSON from request body:
‘{name:Fess : https://fess.codelibs.org/,description:Enterprise Search Server: Fess,urls:https://fess.codelibs.org/,included_urls:https://fess.codelibs.org/.*,user_agent:Mozilla/5.0,num_of_thread:1,interval_time:10000,boost:1,available:true,sort_order:0}’
2022-10-22 14:57:16,800 [http-nio-80-exec-3] INFO
//////////////////////////////////////////_/
…Sending error as ‘400 Bad Request’ manually #7a93e73d
requestClass=org.apache.catalina.connector.RequestFacade ; sessionId=null
; url=http://localhost/api/admin/scheduler/setting
; method=PUT ; protocol=HTTP/1.1 ; scheme=http ; secure=false ; remoteAddr=127.0.0.1 ; remoteHost=127.0.0.1
; characterEncoding=UTF-8 ; contentLength=255 ; contentType=application/x-www-form-urlencoded ; locale=ja_JP ; locales=ja_JP
[header] accept=/
[header] authorization=(アクセストークン)
[header] content-length=255
[header] content-type=application/x-www-form-urlencoded
[header] host=localhost
[header] user-agent=curl/7.85.0
[request] VirtualHostValue=
[request] api_admin_scheduler_apiAdminSchedulerAction_setting_Form=VirtualForm:{formMeta:{api_admin_scheduler_apiAdminSchedulerAction_setting_Form, org.codelibs.fess.app.web.api.admin.scheduler.CreateBody, props=12}, realForm=null}@225e7baf
[request] lastaflute.action.ACTION_RUMTIME=runtime:{/api/admin/scheduler/setting, public JsonResponse ApiAdminSchedulerAction@put$setting(CreateBody), pathParam:{{}}}
[request] lastaflute.action.REQUEST_BODY=wholeShow:‘{name:Fess : https://fess.codelibs.org/,description:Enterprise Search Server: Fess,urls:https://fess.codelibs.org/,included_urls:https://fess.codelibs.org/.*,user_agent:Mozilla/5.0,num_of_thread:1,interval_time:10000,boost:1,available:true,sort_order:0}’
[request] lastaflute.action.USER_LOCALE=ja_JP
[request] lastaflute.config.ACTION_EXECUTE=execute:{public JsonResponse ApiAdminSchedulerAction@put$setting(CreateBody), urlPattern:{setting, ^setting$}}@3c942846
[session] lastaflute.action.USER_LOCALE=ja_JP
Exception: org.lastaflute.web.exception.RequestJsonParseFailureException
Message:
/- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cannot parse json on the request body.
[JsonBody Parse Failure]
runtime:{/api/admin/scheduler/setting, public JsonResponse ApiAdminSchedulerAction@put$setting(CreateBody), pathParam:{{}}}
VirtualForm:{formMeta:{api_admin_scheduler_apiAdminSchedulerAction_setting_Form, org.codelibs.fess.app.web.api.admin.scheduler.CreateBody, props=12}, realForm=null}@225e7baf
‘{name:Fess : https://fess.codelibs.org/,description:Enterprise Search Server: Fess,urls:https://fess.codelibs.org/,included_urls:https://fess.codelibs.org/.*,user_agent:Mozilla/5.0,num_of_thread:1,interval_time:10000,boost:1,available:true,sort_order:0}’
-
-
-
-
-
-
-
-
- -/
Stack Traces:
at org.lastaflute.web.ruts.process.formcoins.FormCoinsHelper.throwRequestJsonParseFailureException(FormCoinsHelper.java:644)
at org.lastaflute.web.ruts.process.formcoins.FormCoinsHelper.throwJsonBodyParseFailureException(FormCoinsHelper.java:200)
at org.lastaflute.web.ruts.process.ActionFormMapper.throwJsonBodyParseFailureException(ActionFormMapper.java:306)
at org.lastaflute.web.ruts.process.ActionFormMapper.mappingJsonBody(ActionFormMapper.java:301)
at org.lastaflute.web.ruts.process.ActionFormMapper.handleJsonBody(ActionFormMapper.java:249)
at org.lastaflute.web.ruts.process.ActionFormMapper.populateParameter(ActionFormMapper.java:149)
at org.lastaflute.web.ruts.ActionRequestProcessor.populateParameter(ActionRequestProcessor.java:221)
at org.lastaflute.web.ruts.ActionRequestProcessor.fire(ActionRequestProcessor.java:179)
at org.lastaflute.web.ruts.ActionRequestProcessor.process(ActionRequestProcessor.java:114)
at org.lastaflute.web.servlet.filter.RequestRoutingFilter.processAction(RequestRoutingFilter.java:289)
at org.lastaflute.web.servlet.filter.RequestRoutingFilter.routingToAction(RequestRoutingFilter.java:227)
…
Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 2 path $
at com.google.gson.internal.bind.LaReflectiveTypeAdapterFactory$ReflextiveAdapter.read(LaReflectiveTypeAdapterFactory.java:282)
at com.google.gson.Gson.fromJson(Gson.java:991)
at com.google.gson.Gson.fromJson(Gson.java:956)
at com.google.gson.Gson.fromJson(Gson.java:905)
…
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 2 path $
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
at com.google.gson.internal.bind.LaReflectiveTypeAdapterFactory$ReflextiveAdapter.read(LaReflectiveTypeAdapterFactory.java:271)
at com.google.gson.Gson.fromJson(Gson.java:991)
at com.google.gson.Gson.fromJson(Gson.java:956)
…
//////////
2022-10-22 14:57:16,801 [http-nio-80-exec-3] DEBUG
responseClass=org.apache.catalina.connector.ResponseFacade ; committed=true
; httpStatus=400 ; contentType=null ; locale=ja_JP
[header] Set-Cookie=JSESSIONID=7E702335313E203825BD227DBB79E670; Path=/; HttpOnly
[request] VirtualHostValue=
[request] api_admin_scheduler_apiAdminSchedulerAction_setting_Form=VirtualForm:{formMeta:{api_admin_scheduler_apiAdminSchedulerAction_setting_Form, org.codelibs.fess.app.web.api.admin.scheduler.CreateBody, props=12}, realForm=null}@225e7baf
[request] lastaflute.action.ACTION_RUMTIME=runtime:{/api/admin/scheduler/setting, public JsonResponse ApiAdminSchedulerAction@put$setting(CreateBody), pathParam:{{}}}
[request] lastaflute.action.USER_LOCALE=ja_JP
[request] lastaflute.config.ACTION_EXECUTE=execute:{public JsonResponse ApiAdminSchedulerAction@put$setting(CreateBody), urlPattern:{setting, ^setting$}}@3c942846
[session] lastaflute.action.USER_LOCALE=ja_JP
-
-
-
-
-
-
-
-
-
- {END}: /api/admin/scheduler/setting [00m00s049ms]
*400 Bad Request, read the message for the detail
2022-10-22 14:57:16,807 [http-nio-80-exec-2] DEBUG * * * * * * * * * * {BEGIN}: /error/badrequest/
requestClass=org.apache.catalina.connector.RequestFacade ; sessionId=null
; url=http://localhost/error/badrequest/
; method=PUT ; protocol=HTTP/1.1 ; scheme=http ; secure=false ; remoteAddr=127.0.0.1 ; remoteHost=127.0.0.1
; characterEncoding=UTF-8 ; contentLength=-1 ; contentType=null ; locale=ja_JP ; locales=ja_JP
[header] accept=/
[header] authorization=アクセストークン
[header] host=localhost
[header] user-agent=curl/7.85.0
2022-10-22 14:57:16,809 [http-nio-80-exec-2] DEBUG
/= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = *No routing action:
e.g. expected actions for /error/badrequest/
web.error.ErrorBadrequestAction@index()
web.error.ErrorAction@badrequest()
web.error.badrequest.ErrorBadrequestAction@index()
(and so on…)
= = = = = = = = = =/
2022-10-22 14:57:16,811 [http-nio-80-exec-2] DEBUG
responseClass=org.apache.catalina.connector.ResponseFacade ; committed=true
; httpStatus=405 ; contentType=null ; locale=ja_JP
[header] Allow=OPTIONS, GET, HEAD, POST
[request] VirtualHostValue=
-
-
-
-
-
-
-
-
-
- {END}: /error/badrequest/ [00m00s004ms]
=========================================
よろしくお願いいたします。