Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > spring with ibatis jdbc throws exception on first attept succeed on second.

Reply
Thread Tools

spring with ibatis jdbc throws exception on first attept succeed on second.

 
 
Vladimir.Sakharuk@gmail.com
Guest
Posts: n/a
 
      07-27-2006
I got follows exception.
org.springframework.jdbc.BadSqlGrammarException: SqlMapClient
operation; bad SQL grammar []; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLExceptio n:
--- The error occurred in resources/Data.xml.
--- The error occurred while applying a parameter map.
--- Check the getIndexes-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: java.sql.SQLException: Nxt not found. Specify
owner.objectname or use sp_help to check whether the object exists
(sp_help may produce lots of output).

org.springframework.jdbc.support.SQLStateSQLExcept ionTranslator.translate(SQLStateSQLExceptionTransl ator.java:8
org.springframework.jdbc.support.SQLErrorCodeSQLEx ceptionTranslator.translate(SQLErrorCodeSQLExcepti onTranslator.java:257)
org.springframework.orm.ibatis.SqlMapClientTemplat e.execute(SqlMapClientTemplate.java:16
org.springframework.orm.ibatis.SqlMapClientTemplat e.executeWithListResult(SqlMapClientTemplate.java: 204)
org.springframework.orm.ibatis.SqlMapClientTemplat e.queryForList(SqlMapClientTemplate.java:243)
....

I use jtds for connection.

The query is valid and works successfully after it fails. It works from
the beginning but then the table Nxt got recreated(it is periodically
dropped and recreated). Then query fails and succeed again on a next
call. The error is not in query - its working all the time, I suspect
that some of those libraries: spring framework, ibatis, jtds have cache
something and fails.
The next request is succeed since something was marks as invalidate.
This is a query:
<select id="getIndexes" resultClass="java.util.HashMap">
select idxName=a.IdxName,am=a.am,status=case when b.fid is null then
'I' else 'D' end from All a, Nxt b where a.f=#f#
and a.IdxName*=b.IdxName and a.f*=b.f
union
select idxName=IdxName,am, status='N'
from Nxt where f=#f# and IdxName not in
(select IdxName from All where f=#f#)
</select>

Thanks for helping.

 
Reply With Quote
 
 
 
 
bcoulson bcoulson is offline
Junior Member
Join Date: Aug 2009
Posts: 1
 
      08-31-2009
Hello

I am experiencing very similar behavior to what you described in this thread. I can not get consistent behavior in terms of not working on the first attempt and then working on the second attempt. But I do get this behavior if the database goes down and comes back up again, the connections get messed up and I have to restart my web service and everything is fine.

Did you make any progress on this - is it a bug with iBatis or the Sybase jconnect driver?

Thank you for your time
Brenda
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
If at first you don't succeed Dudley Hanks Digital Photography 0 05-04-2009 07:46 PM
Code genration for Spring/Ibatis/Hibernate Vidhu Nagar Java 1 10-30-2007 03:25 PM
CLOB issue with JDBC, IBATIS and Oracle 10g kartechy@googlemail.com Java 1 09-21-2007 11:06 AM
IF AT FIRST YOU DON'T SUCCEED, LIE, LIE AGAIN Pennywise@DerryMaine.Gov Computer Support 1 08-22-2007 03:46 AM
Exception Exception is not compatible with throws clause in Runnable.run() Chris Miller Java 4 11-22-2003 03:11 PM



Advertisments