过程输入参数是clob并在spring数据jpa中执行过程时将json对象作为输入参数传递,但是我遇到了类似的异常 org.springframework.orm.jpa.JpaSystemException:无法序列化;嵌套的异常是org.hibernate.type.SerializationException:无法序列化
Connection connection = entityManager.unwrap(SessionImpl.class).connection();
CLOB clob = (CLOB) connection.createClob();
clob.setString(1, requestJson.toString());
final String P_JSON_OBJECT = "p_json_object";
StoredProcedureQuery storedProcedure = entityManager.createStoredProcedureQuery("PROCEDURE");
storedProcedure.registerStoredProcedureParameter(P_JSON_OBJECT, CLOB.class, ParameterMode.IN);
storedProcedure.registerStoredProcedureParameter(P_STATUS_MSG, String.class, ParameterMode.OUT);
storedProcedure.setParameter(P_JSON_OBJECT, clob);
storedProcedure.execute();