#Type Handler Issue in MyBatis of Spring Boot

15 messages ¡ Page 1 of 1 (latest)

regal path
#

I have a problem about Type Handler Issue in MyBatis of Spring Boot. How can I fix it?

sonic zenithBOT
#

⌛ This post has been reserved for your question.

Hey @regal path! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

sonic zenithBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.

sonic zenithBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.

regal path
#

<@&674578801941938176> Can you help me?

sonic zenithBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.

sonic zenithBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.

regal path
#

@brave schooner @modern kettle @ocean ginkgo Can anyone help me fix the issue?

#
<select id="getTaskStatusCounts" resultMap="taskStatusCountResultMap" parameterType="com.example.model.QueryRequest">
    SELECT
        tt.region_name_en AS region,
        tt.office_name_en AS office,

        CONCAT(
            '{',
            <foreach collection="years" item="year" separator=",">
                <foreach collection="months" item="month" separator=",">
                    CONCAT('"month_${year}_${month}":',
                    COUNT(CASE WHEN SUBSTRING(tt.task_finish_time, 1, 7) = CONCAT(#{year}, '-', #{month}) THEN 1 END))
                </foreach>
            </foreach>,
            '}'
        ) AS monthlyCounts

    FROM
        task_list tt
    <include refid="queryTaskStatusCondition"/>
    GROUP BY
        tt.region_name_en,
        tt.office_name_en
    ORDER BY
        tt.region_name_en ASC;
</select>

I also revised it but I get this error message

ause: java.sql.SQLException: Error converting JSON to Map
; uncategorized SQLException; SQL state [null]; error code [0]; Error converting JSON to Map; nested exception is java.sql.SQLException: Error converting JSON to Map] with root cause
com.fasterxml.jackson.core.JsonParseException: Unexpected character ('"' (code 34)): was expecting comma to separate Object entries
 at [Source: (String)"{"month_2022_01":0"month_2022_02":0"month_2022_03":0"month_2023_01":3"month_2023_02":4"month_2023_03":8}"; line: 1, column: 20]
modern kettle
regal path
modern kettle
#

showing a couple hundred lines of code and a stack trace isn't exactly an MRE, especially when it comes to Spring. Try and narrow down what is actually causing the issue

#

If you have more questions feel free to ask.

regal path
#

@modern kettle I already mentioned about it in the file.