a couple of questions about a problem I am having with ibatis + java. Is this allowed here? I dont wanna disturb the chat!
Just ask your problem but please try and show some effort before you do.
I was tasked to make some new developments to an already functioning app which uses Java and ibatis (mybatis) plus an informix database. Part of this development consists on calling an already existing SPL which was updated with some new parameters. So this SPL has been in use for quite some time now. I added all the parameters in the XML file where our queries and stuff are, did the Java logic and stuff to add them to the parameter hash map which is the argument for the SPL (as I have done other times)...but, when I want to call the procedure it gives me the following error: class: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [IX000]; error code [-674]; The error ocurred while executing query procedure. Check the {call XXXXX (...)}. --- Check the SQL Statement (preparation failed). --- Cause: java.sql.SQLException: Routine (XXXX) can not be resolved.; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in xml/xxxx.xml. I don't think I can post code because it's probably confidential or something like that, so that's why I am not attaching the whole log (names and stuff like that). However, my workmates checked the SPL logs and they told me that Java wasn't even calling it so the error is right before the call. It's probably good to know that when a param #param# is empty, we send it as NULL. Before adding the new parameters the app executed this same SPL and it worked like a charm. I've searched on Google and stack, there are plenty of similar questions but none of them gave me a useful answer. Google said that this error means three things: bad number of params No permissions. Bad params types. I have checked the 1 and 2 stuff and I am pretty sure these are not the problems. I don't think the third option is the problem, because I have tried to do a hard-coded xml call with call xxxx (NULL, NULL...)(everything as null to avoid problem with variable types) and it keeps throwing me the error. Of course, I checked the Java logs and show that the params were correctly formed (they are mostly amounts with a couple decimals and some strings, I already checked the syntax of decimals and stuff like that)and the number was correct. So I copied the call from the log to my SQL workbench and it worked! But copying that same call into the xml file and trying to execute it through Java fails. So the question is: can you think of any other thing that may be causing the problem? The XML file with the SQL compiles, so it's not a syntax error either.
Обсуждают сегодня