{"record":{"id":"e6db1c9bb99ffd07","repo":"alibaba/spring-ai-alibaba","slug":"error-e6db1c","errorCode":null,"errorMessage":"查询评估器关联的实验失败: ","messagePattern":"查询评估器关联的实验失败: ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-start/src/main/java/com/alibaba/cloud/ai/studio/admin/service/impl/ExperimentServiceImpl.java","lineNumber":660,"sourceCode":"                            return Experiment.fromDO(experimentDO);\n                        } catch (Exception e) {\n                            log.warn(\"获取数据集版本信息失败: experimentId={}, datasetVersionId={}\", \n                                experimentDO.getId(), experimentDO.getDatasetVersionId(), e);\n                            return Experiment.fromDO(experimentDO);\n                        }\n                    })\n                    .toList();\n            \n            return new PageResult<>(\n                    (long) totalCount,\n                    (long) request.getPageNumber(),\n                    (long) request.getPageSize(),\n                    experiments\n            );\n            \n        } catch (Exception e) {\n            log.error(\"查询评估器关联的实验失败: {}\", request, e);\n            throw new RuntimeException(\"查询评估器关联的实验失败: \" + e.getMessage());\n        }\n    }\n\n} \n","sourceCodeStart":642,"sourceCodeEnd":665,"githubUrl":"https://github.com/alibaba/spring-ai-alibaba/blob/f82da0b50f35744c13968191be2b1cd2452ef550/spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-start/src/main/java/com/alibaba/cloud/ai/studio/admin/service/impl/ExperimentServiceImpl.java#L642-L665","documentation":"Catch-all in ExperimentServiceImpl.getExperimentsByEvaluator: any exception while querying experiments associated with an evaluator is logged and rethrown as a RuntimeException with the message '查询评估器关联的实验失败: ' plus the original cause message.","triggerScenarios":"Any database error during the evaluator-experiment page query (table missing, bad SQL, connection failure) or an unexpected runtime error (e.g. NPE) inside the try block.","commonSituations":"Database down or unreachable from the admin server; schema drift after upgrade; malformed page request (pageSize/pageNum out of expected range) causing query failure.","solutions":["Inspect the logged underlying exception (stack trace in server logs) for the real cause","Verify database connectivity and that the experiment/evaluator mapping tables exist","Validate the request's pageNum/pageSize values before querying","Catch the RuntimeException in the controller and map it to a 500 with the cause id"],"exampleFix":"// before\n} catch (Exception e) {\n    throw new RuntimeException(\"查询评估器关联的实验失败: \" + e.getMessage());\n}\n// after\n} catch (DataAccessException e) {\n    log.error(\"查询评估器关联的实验失败: {}\", request, e);\n    throw new StudioException(StudioException.INTERNAL_ERROR, \"查询评估器关联的实验失败\");\n}","handlingStrategy":"try-catch","validationCode":"if (request.getPageNum() == null || request.getPageNum() < 1 || request.getPageSize() == null || request.getPageSize() < 1) { throw new IllegalArgumentException(\"invalid paging\"); }","typeGuard":"null","tryCatchPattern":"try { service.getExperimentsByEvaluator(request); } catch (RuntimeException e) { log.error(\"evaluator experiment query failed\", e); return ResponseEntity.internalServerError().body(\"query failed: check server logs\"); }","preventionTips":["Always check server logs for the wrapped root cause","Validate paging parameters before querying","Keep schema migrations in sync with the deployed version"],"tags":["database","query","evaluator","wrapped-exception"],"backgroundTag":"database-query-failed","analyzedSha":"f82da0b50f35744c13968191be2b1cd2452ef550","analyzedAt":"2026-09-09T15:32:42.421Z","contentChangedAt":"2026-09-09T15:32:42.421Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}