Implem / Implem.Pleasanter

Pleasanter is a no-code/low-code development platform that runs on .NET. You can quickly create business applications with simple operations.
https://pleasanter.org
GNU Affero General Public License v3.0
511 stars 81 forks source link

CSVをインポートすると、正常に終了しない #462

Closed nozoe closed 1 year ago

nozoe commented 1 year ago

OS: Windows Server 2019 MS-SQL: Version 2019 Plesanter Ver 1.3.36.0

利用ユーザからCSVのデータをインポートすると応答が返らないという申告を受けてsyslog を確認したところ、 Method にimport:OnException が記録され、ErrMessageには、 SqlException: numeric をデータ型 numeric に変換中に、算術オーバーフロー エラーが発生しました。 ステートメントは終了されました。

ErrStackTraceには、 at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite, String methodName) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Implem.Libraries.DataSources.SqlServer.SqlIo.<>c__DisplayClass13_0.<ExecuteNonQuery>b__0() in C:\Implem\Pleasanter.NetCore\Implem.Libraries\DataSources\SqlServer\SqlIo.cs:line 114 at Implem.Libraries.DataSources.SqlServer.SqlIo.Try(ISqlObjectFactory factory, Action action) in C:\Implem\Pleasanter.NetCore\Implem.Libraries\DataSources\SqlServer\SqlIo.cs:line 287 at Implem.Libraries.DataSources.SqlServer.SqlIo.ExecuteNonQuery(ISqlObjectFactory factory, IDbTransaction dbTransaction, IDbConnection dbConnection) in C:\Implem\Pleasanter.NetCore\Implem.Libraries\DataSources\SqlServer\SqlIo.cs:line 122 at Implem.Pleasanter.Libraries.DataSources.Rds.ExecuteNonQuery(Context context, IDbTransaction dbTransaction, IDbConnection dbConnection, String connectionString, Boolean transactional, Boolean writeSqlToDebugLog, SqlStatement[] statements) in C:\Implem\Pleasanter.NetCore\Implem.Pleasanter\Libraries\DataSources\Rds.cs:line 44 at Implem.Pleasanter.Libraries.DataSources.Repository.<>c__DisplayClass1_0.<ExecuteDataSet_responses>b__0(IDbTransaction transaction, IDbConnection connection) in C:\Implem\Pleasanter.NetCore\Implem.Pleasanter\Libraries\DataSources\Repository.cs:line 118 at Implem.Pleasanter.Libraries.DataSources.Rds.ExecuteScalar[T](Context context, String connectionString, Boolean transactional, Func3 func) in C:\Implem\Pleasanter.NetCore\Implem.Pleasanter\Libraries\DataSources\Rds.cs:line 255 at Implem.Pleasanter.Libraries.DataSources.Repository.ExecuteDataSet_responses(Context context, Boolean transactional, String connectionString, Boolean selectIdentity, SqlStatement[] statements) in C:\Implem\Pleasanter.NetCore\Implem.Pleasanter\Libraries\DataSources\Repository.cs:line 142 at Implem.Pleasanter.Models.ResultModel.Create(Context context, SiteSettings ss, TableTypes tableType, SqlParamCollection param, List1 processes, Int64 copyFrom, Boolean extendedSqls, Boolean synchronizeSummary, Boolean forceSynchronizeSourceSummary, Boolean notice, String noticeType, Boolean otherInitValue, Boolean get) in C:\Implem\Pleasanter.NetCore\Implem.Pleasanter\Models\Results\ResultModel.cs:line 1492 at Implem.Pleasanter.Models.ResultUtilities.Import(Context context, SiteModel siteModel) in C:\Implem\Pleasanter.NetCore\Implem.Pleasanter\Models\Results\ResultUtilities.cs:line 6050 at Implem.Pleasanter.Models.ItemModel.Import(Context context) in C:\Implem\Pleasanter.NetCore\Implem.Pleasanter\Models\Items\ItemModel.cs:line 902 at Implem.Pleasanter.Controllers.ItemsController.Import(Int64 id, ICollection1 file) in C:\Implem\Pleasanter.NetCore\Implem.Pleasanter\Controllers\ItemsController.cs:line 354 at lambda_method2414(Closure , Object , Object[] ) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync() at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)`

これって、算術オーバーフロー例外を捕まえてユーザには、インポートエラーに見える様に出来ないでしょうか? (現在ユーザからインポートするデータとテーブル構成を提出する様に依頼中です) syslog で更に必要なカラムの情報があれば言っていただければと思います。

nozoe commented 1 year ago

実際にインポートしているCSVファイルと作ったテーブルのコピーを入手し切り分けを実施したところ、 タイムスタンプ情報を何故か数値型  データ(17桁) yyyymmddHHMMSSsss に変換したことにより桁溢れ例外を起こしていた様です。 やった理由は不明ですが…

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 1 year ago

This issue was closed because it has been stalled for 7 days with no activity.