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

NamedStoredProcedureQuery not supporting IN parameters with DB2 #3165

Closed
javatype opened this issue Sep 19, 2023 · 5 comments
Closed

NamedStoredProcedureQuery not supporting IN parameters with DB2 #3165

javatype opened this issue Sep 19, 2023 · 5 comments

Comments

@javatype
Copy link

javatype commented Sep 19, 2023

Hi,

My Procedure call was working fine before spring upgrade.

I am using below dependencies -
org.springframework.boot:spring-boot-starter-data-jpa🫙3.1.3, with which getting
jakarta.persistence:jakarta.persistence-api:jar:3.1.0

@Entity
@NamedStoredProcedureQuery(name = "myProcc",
        procedureName = "MYPROC",
        parameters = {
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "KEYTYPE", type = String.class),
                @StoredProcedureParameter(mode = ParameterMode.OUT, name = "SOME_ID", type = Long.class)
        })
public class MyGenerationEntity {
  @Id
  @Column(name = "SOME_ID")
  Long keyType;
}

@Repository
public interface MyRepository extends JpaRepository<MyGenerationEntity, Long>{
  @Procedure(name = "myProcc", outputParameterName = "SOME_ID")
  @Transactional
  Long getKey(@Param("KEYTYPE") String keyType);
}

Now, when I call this in code, I am getting below exception.
Db is DB2.

 Error Detail:Unexpected character ':' found in FLOAT literal.  Full SQL statement text
= call MYPROC(:KEYTYPE,:SOME_ID)  ERRORCODE=-4463, SQLSTATE=42601] [{call MYPROC(:KEYTYPE,:SOME_ID)}];
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 19, 2023
@gregturn
Copy link
Contributor

gregturn commented Sep 19, 2023

Related to #3085.

Have you picked up our latest Spring Data release (either https://spring.io/blog/2023/09/15/spring-data-2023-1-0-m3-released or https://spring.io/blog/2023/09/15/spring-data-2023-0-4-2022-0-10-and-2021-2-16-released), because we have a patch that stops mangling named queries, which looks like what may have happened to you.

Or...it may have nothing to do with you given you are using a stored procedure.

@gregturn gregturn self-assigned this Sep 19, 2023
@gregturn gregturn added the status: waiting-for-feedback We need additional information before we can continue label Sep 19, 2023
@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Sep 19, 2023
@javatype
Copy link
Author

could not find latest dependency out there on maven. any temporary fix?

@mp911de
Copy link
Member

mp911de commented Oct 22, 2024

If you would like us to spend some time helping you to diagnose the problem, please spend some time describing it and, ideally, providing a minimal yet complete sample that reproduces the problem.
You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.

@mp911de mp911de added status: waiting-for-feedback We need additional information before we can continue and removed status: feedback-provided Feedback has been provided labels Oct 22, 2024
@spring-projects-issues
Copy link

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label Oct 29, 2024
@spring-projects-issues
Copy link

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

@spring-projects-issues spring-projects-issues closed this as not planned Won't fix, can't repro, duplicate, stale Nov 5, 2024
@spring-projects-issues spring-projects-issues removed status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants