on 04-08-2014 4:23 PM
Hello,
We are seeing a lot of log messages like the one below when an MDO select query is run. There is a message for every numeric column. There doesnt seem to be any issue with the queries working properly its just creating a lot of log messages. Has anyone else had this issue?
Exception of type com.sap.sql.log.OpenSQLException caught:
Cannot fetch column 22, which has JDBC type DOUBLE, into a Java variable of type
float..
[EXCEPTION]
com.sap.sql.log.OpenSQLException: Cannot fetch
column 22, which has JDBC type DOUBLE, into a Java variable of type float.
at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:83) ...
Created incident 316599 / 2014 for this issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have also encountered the same exact problem.
It seems that the underlying database is storing an attribute with a datatype of FLOAT in a field with a DOUBLE datatype.
If I change the attributes datatype to DOUBLE, I no longer see the error.
BTW, I am on Netweaver 7.31 SP10, MII 14 SP4 P1 running on MS SQL 2008 R2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
I have faced a similar issue few days back and was able to resolve it as well.
The issue was a simple datatype mismatch while reading the query result and assigning it to a variable.
In your case looks like (as exactly what the log says) you fetch a variable of type double and assign it to float type. Try using a type conversion if you actually need it to be as float; else change the variable type to be double to avoid the error.
Could you please share the select query you use so that I may let you know in more detail what could be the issue? Maybe you can trace the query and the error message/result in the transaction using a tracer.
Regards,
Saumya Govil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Saumya,
Thank you for your reply. The datatype for the columns is defined in the MDO as floats. My query is an MDO select query so there is no type assignment there. The error messages in the logs do not affect or manifest themselves at the query or transaction level. The query returns the expected data and everything functions fine. Because of this it actually took a while to figure out where the excessive log messages were coming from.
Regards,
Christian
Hi Christian,
You are right. As in your case it is a select query it does not reflect the error automatically. In my case, I had an insert query so it failed then and there, which was easier to debug and fix.
I have one question regarding your case. When you read the MDO using the query, what do you do with the output? Do you assign it to any local/transaction property in the output links of the query block or in a proceeding assignment block?
Because, the error mentions that the assignment of float to double datatype fails. So, in theory there should be some assignment done with the output.
Please check if you could figure out this part in your transaction.
Regards,
Saumya Govil
User | Count |
---|---|
12 | |
7 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.