Announcement Announcement Module
Collapse
No announcement yet.
Suppress warning message while using SimpleJdbcCall. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Suppress warning message while using SimpleJdbcCall.

    Hi All,

    In UI interface is having 3 fields for date(dd,mm,yyyy) so I'm having 3 properties in java bean(pojo).

    When user submits the screen I'm joining all these three fields and making one date variable which is to be passed to a stored procedure. Here map which consists of all properties in java bean class...

    I'm having following code for executing procedure

    Code:
    this.procCreateInquiry =
    	        new SimpleJdbcCall(jdbcTemplate.getDataSource())
    	                .withProcedureName(procName);

    Code:
    out = this.procCreateInquiry.execute((HashMap)paramsMap);
    returnValue = (String) out.get("return_inquiry_number");


    This code is working fine but it is showing warning messages where it is not matching request parameters with stored procedure input parameters. I know if I delete properties whcih are not required to procedure then these warning messages will not appear but my question is whether can I use any annotation for suppress these warning messages or can I do something so that it won't show these below warning messages?

    I'm passing somany parameters to stored procedure for a sample warning message I removed all the input parameters.


    WARN [org.springframework.jdbc.core.metadata.CallMetaDat aContext] - Unable to locate the corresponding parameter for "date_of_complaint_dd" in the parameters used: [date_of_complaint]
    WARN [org.springframework.jdbc.core.metadata.CallMetaDat aContext] - Unable to locate the corresponding parameter for "date_of_complaint_mm" in the parameters used: [date_of_complaint]
    WARN [org.springframework.jdbc.core.metadata.CallMetaDat aContext] - Unable to locate the corresponding parameter for "date_of_complaint_yyyy" in the parameters used: [date_of_complaint]

    Thanks,
    Sharath.

  • #2
    Suppress warning message while using SimpleJdbcCall.

    Hi All,

    For fixing this problem, I edited 'CallMetaDataContext' program(org.springframework.jdbc.core.metadata package) where it is adding logger.warn message for properties which are not found in procedure parameters. I commented this line(logger.warn)

    I compiled this program with jdk 1.5 and copied to 'spring-jdbc.jar' file without changing any other class files. When I'm using this .jar file it is giving below error

    Code:
       java.lang.NoSuchMethodError: for metaDataProvider.isSupportsSchemasInProcedureCalls()
    I thought this error is occuring because of different version used in other .class file to compile so I compiled this program with jdk 1.6 and placed into 'spring-jdbc.jar' file then it is giving below error

    Code:
       java.lang.NoClassDefFoundError: org/springframework/jdbc/core/metadata/CallMetaD
    ataContext
    Can anyone please suggest me how to compile this single program? I'm using spring-framework-2.5.2

    Thanks,
    Sharath Karnati.

    Comment


    • #3
      Compiling 'CallMetaDataContext' single class.

      Hi All,

      Please let me know how to compile only one single class file('CallMetaDataContext') under spring-jdbc.jar, I tried but getting errors which I posted in my earlier post. I thought it is trivial one...

      Thanks in advance.

      Regards,
      Sharath.

      Comment


      • #4
        Using Maven to create spring-jdbc source project.

        Hi All,

        Can you please let me know, how to create spring-jdbc source project so that I can modify the code and create spring-jdbc.jar file using Maven.

        This way it will get all the dependency .jar files for compiling spring-jdbc source project.

        If you have any links for this then please let me know.

        Thanks,
        Sharath.

        Comment


        • #5
          Can anyone please let me know, how to suppress warning message while using SimpleJdbcCall without modifying 'CallMetaDataContext' class.

          Thanks,
          Sharath.

          Comment

          Working...
          X