[
https://issues.apache.org/jira/browse/FINERACT-2218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Felix Van Hove updated FINERACT-2218:
-------------------------------------
Description:
Creating a survey via the call described in the Swagger API, e.g.
[https://192.168.1.206:8443/fineract-provider/swagger-ui/index.html#/Spm-Surveys/createSurvey]
fails. E.g. try
[https://192.168.1.206:8443/fineract-provider/api/v1/surveys]
along with this POST body:
{code:java}
{
"componentDatas": [
{
"description": "string",
"id": 0,
"key": "string",
"sequenceNo": 0,
"text": "string"
}
],
"countryCode": "DE",
"description": "string",
"id": 0,
"key": "string",
"name": "string",
"questionDatas": [
{
"componentKey": "string",
"description": "string",
"id": 0,
"key": "string",
"responseDatas": [
{
"id": 0,
"sequenceNo": 0,
"text": "string",
"value": 0
}
],
"sequenceNo": 0,
"text": "string"
}
],
"validFrom": "2025-03-17",
"validTo": "2025-03-17"
}{code}
This results in:
??2025-03-17 14:48:01.903 -ERROR 10332- -- [nio-8443-exec-3]
.a.c.c.C.[.[.[.[.a.f.i.c.j.JerseyConfig] : Servlet.service() for servlet
[org.apache.fineract.infrastructure.core.jersey.JerseyConfig] in context with
path [/fineract-provider] threw exception
[org.springframework.dao.InvalidDataAccessApiUsageException: You have attempted
to set a value of type class java.time.LocalDateTime for parameter pointInTime
with expected type of class java.time.LocalDate from query string select s from
Survey s where s.key = :key and :pointInTime between s.validFrom and
s.validTo.] with root cause??
??java.lang.IllegalArgumentException: You have attempted to set a value of type
class java.time.LocalDateTime for parameter pointInTime with expected type of
class java.time.LocalDate from query string select s from Survey s where s.key
= :key and :pointInTime between s.validFrom and s.validTo.??
?? at
org.eclipse.persistence.internal.jpa.QueryImpl.setParameterInternal(QueryImpl.java:941)??
?? at
org.eclipse.persistence.internal.jpa.EJBQueryImpl.setParameter(EJBQueryImpl.java:583)??
?? at
org.eclipse.persistence.internal.jpa.EJBQueryImpl.setParameter(EJBQueryImpl.java:69)??
?? at
org.springframework.data.jpa.repository.query.QueryParameterSetter$BindableQuery.setParameter(QueryParameterSetter.java:326)??
was:
Creating a survey via the call described in the Swagger API, e.g.
[https://192.168.1.206:8443/fineract-provider/swagger-ui/index.html#/Spm-Surveys/createSurvey]
fails. E.g. try
https://192.168.1.206:8443/fineract-provider/api/v1/surveys
along with this POST body:
{code:java}
{
"componentDatas": [
{
"description": "string",
"id": 0,
"key": "string",
"sequenceNo": 0,
"text": "string"
}
],
"countryCode": "DE",
"description": "string",
"id": 0,
"key": "string",
"name": "string",
"questionDatas": [
{
"componentKey": "string",
"description": "string",
"id": 0,
"key": "string",
"responseDatas": [
{
"id": 0,
"sequenceNo": 0,
"text": "string",
"value": 0
}
],
"sequenceNo": 0,
"text": "string"
}
],
"validFrom": "2025-03-17",
"validTo": "2025-03-17"
}{code}
This results in:
2025-03-17 14:48:01.903 -ERROR 10332 --- [nio-8443-exec-3]
.a.c.c.C.[.[.[.[.a.f.i.c.j.JerseyConfig] : Servlet.service() for servlet
[org.apache.fineract.infrastructure.core.jersey.JerseyConfig] in context with
path [/fineract-provider] threw exception
[org.springframework.dao.InvalidDataAccessApiUsageException: You have attempted
to set a value of type class java.time.LocalDateTime for parameter pointInTime
with expected type of class java.time.LocalDate from query string select s from
Survey s where s.key = :key and :pointInTime between s.validFrom and
s.validTo.] with root cause
java.lang.IllegalArgumentException: You have attempted to set a value of type
class java.time.LocalDateTime for parameter pointInTime with expected type of
class java.time.LocalDate from query string select s from Survey s where s.key
= :key and :pointInTime between s.validFrom and s.validTo.
at
org.eclipse.persistence.internal.jpa.QueryImpl.setParameterInternal(QueryImpl.java:941)
at
org.eclipse.persistence.internal.jpa.EJBQueryImpl.setParameter(EJBQueryImpl.java:583)
at
org.eclipse.persistence.internal.jpa.EJBQueryImpl.setParameter(EJBQueryImpl.java:69)
at
org.springframework.data.jpa.repository.query.QueryParameterSetter$BindableQuery.setParameter(QueryParameterSetter.java:326)
> Impossible to create surveys
> ----------------------------
>
> Key: FINERACT-2218
> URL: https://issues.apache.org/jira/browse/FINERACT-2218
> Project: Apache Fineract
> Issue Type: Bug
> Affects Versions: 1.11.0
> Reporter: Felix Van Hove
> Priority: Minor
>
> Creating a survey via the call described in the Swagger API, e.g.
> [https://192.168.1.206:8443/fineract-provider/swagger-ui/index.html#/Spm-Surveys/createSurvey]
> fails. E.g. try
> [https://192.168.1.206:8443/fineract-provider/api/v1/surveys]
> along with this POST body:
> {code:java}
> {
> "componentDatas": [
> {
> "description": "string",
> "id": 0,
> "key": "string",
> "sequenceNo": 0,
> "text": "string"
> }
> ],
> "countryCode": "DE",
> "description": "string",
> "id": 0,
> "key": "string",
> "name": "string",
> "questionDatas": [
> {
> "componentKey": "string",
> "description": "string",
> "id": 0,
> "key": "string",
> "responseDatas": [
> {
> "id": 0,
> "sequenceNo": 0,
> "text": "string",
> "value": 0
> }
> ],
> "sequenceNo": 0,
> "text": "string"
> }
> ],
> "validFrom": "2025-03-17",
> "validTo": "2025-03-17"
> }{code}
> This results in:
> ??2025-03-17 14:48:01.903 -ERROR 10332- -- [nio-8443-exec-3]
> .a.c.c.C.[.[.[.[.a.f.i.c.j.JerseyConfig] : Servlet.service() for servlet
> [org.apache.fineract.infrastructure.core.jersey.JerseyConfig] in context with
> path [/fineract-provider] threw exception
> [org.springframework.dao.InvalidDataAccessApiUsageException: You have
> attempted to set a value of type class java.time.LocalDateTime for parameter
> pointInTime with expected type of class java.time.LocalDate from query string
> select s from Survey s where s.key = :key and :pointInTime between
> s.validFrom and s.validTo.] with root cause??
> ??java.lang.IllegalArgumentException: You have attempted to set a value of
> type class java.time.LocalDateTime for parameter pointInTime with expected
> type of class java.time.LocalDate from query string select s from Survey s
> where s.key = :key and :pointInTime between s.validFrom and s.validTo.??
> ?? at
> org.eclipse.persistence.internal.jpa.QueryImpl.setParameterInternal(QueryImpl.java:941)??
> ?? at
> org.eclipse.persistence.internal.jpa.EJBQueryImpl.setParameter(EJBQueryImpl.java:583)??
> ?? at
> org.eclipse.persistence.internal.jpa.EJBQueryImpl.setParameter(EJBQueryImpl.java:69)??
> ?? at
> org.springframework.data.jpa.repository.query.QueryParameterSetter$BindableQuery.setParameter(QueryParameterSetter.java:326)??
--
This message was sent by Atlassian Jira
(v8.20.10#820010)