Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Occur infinite loop when throw Exception that hold cause from provider method #1616

Closed
czw0058 opened this issue Jul 25, 2019 · 2 comments · Fixed by #1617
Closed

Occur infinite loop when throw Exception that hold cause from provider method #1616

czw0058 opened this issue Jul 25, 2019 · 2 comments · Fixed by #1617
Assignees
Labels
Milestone

Comments

@czw0058
Copy link

czw0058 commented Jul 25, 2019

MyBatis version

3.5.2

org.apache.ibatis.builder.annotation.ProviderSqlSource

173 private Throwable extractRootCause(Exception e) {
174 Throwable cause = e;
175 while(cause.getCause() != null) {
176 cause = e.getCause();
177 }
178 return cause;
179 }

176 endless loop

Database vendor and version

Test case or example project

Steps to reproduce

Expected result

Actual result

@kazuki43zoo kazuki43zoo self-assigned this Jul 25, 2019
@kazuki43zoo
Copy link
Member

kazuki43zoo commented Jul 25, 2019

@czw0058 Thanks for your bug reporting. I will fix this issue.

This bug occurs when throw Exception that hold cause from provider method.

@kazuki43zoo kazuki43zoo added this to the 3.5.3 milestone Jul 25, 2019
@kazuki43zoo kazuki43zoo changed the title BUG Occur infinite loop when throw Exception that hold cause from provider method Jul 25, 2019
kazuki43zoo added a commit to kazuki43zoo/mybatis-3 that referenced this issue Jul 25, 2019
kazuki43zoo added a commit that referenced this issue Jul 25, 2019
Prevent infinite loop when throw Exception that hold cause from provider method
@kazuki43zoo
Copy link
Member

@czw0058 Published the 3.5.3-SNAPSHOT to OSS Sonatype repository at now. Please try it when there is a time.

pulllock pushed a commit to pulllock/mybatis-3 that referenced this issue Oct 19, 2023
pulllock pushed a commit to pulllock/mybatis-3 that referenced this issue Oct 19, 2023
Prevent infinite loop when throw Exception that hold cause from provider method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants