ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kim Goings <kim.goi...@levelfivesolutions.com>
Subject Re: mystery table name
Date Mon, 20 Jun 2005 21:59:46 GMT
Argh!  The query doesn't run.  Seems there was a typo in a trigger.

Sorry for not trying this myself first.  Thanks for your help!!

Kim


On Jun 20, 2005, at 12:56 PM, Barnett, Brian W. wrote:

> Can you successfully run this query in SQL Query Analyzer?
>  
> UPDATE FREQUENT_MEMBER_CLUB SET ATTENDEE_ID = 2, TYPE = 0, COMPANY =  
> 'fdasfd', MEMBER_ID = 'ffdsafa', MODIFIED_BY = 'user' WHERE ID = 3
>  
>  
>> -----Original Message-----
>> From: Kim Goings [mailto:kim.goings@levelfivesolutions.com]
>> Sent: Monday, June 20, 2005 11:51 AM
>> To: user-java@ibatis.apache.org
>> Subject: Re: mystery table name
>>
>>
>> Sure can:
>>
>>
>> <?xml version="1.0" encoding="UTF-8" ?>
>>
>>
>> <!DOCTYPE sqlMap
>>
>>         PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
>>
>>         "http://www.ibatis.com/dtd/sql-map-2.dtd">
>>
>>        
>>
>>         <sqlMap  
>> namespace="com.levelfivesolutions.eventmgr.dao.AttendeeFrequentMemberC 
>> lub">
>>
>>                
>>
>>                 <typeAlias alias="club"  
>> type="com.levelfivesolutions.eventmgr.dao.AttendeeFrequentMemberClub"  
>> />
>>
>>                
>>
>>                
>>
>>                 <insert id="insert"
>>
>>                         parameterClass="club">
>>
>>                         INSERT INTO
>>
>>                                 FREQUENT_MEMBER_CLUB
 
>> (ATTENDEE_ID,TYPE,COMPANY,MEMBER_ID,CREATED_BY,MODIFIED_BY)
>>
>>                                 VALUES (#attendeeId#,
 
>> #type:NUMERIC:-9999#, #name:VARCHAR:NO_ENTRY#,  
>> #memberNumber:VARCHAR:NO_ENTRY#,
>>
>>                                 #modifier#, #modifier#)
>>
>>                         <selectKey resultClass="int" >
>>
>>                                 SELECT @@IDENTITY AS
ID
>>
>>                         </selectKey>
>>
>>                 </insert>
>>
>>                
>>
>>                        
>>
>>                 <update id="update"
>>
>>                         parameterClass="club">
>>
>>                         UPDATE FREQUENT_MEMBER_CLUB
>>
>>                                 SET ATTENDEE_ID = #attendeeId#,
>>
>>                                 TYPE = #type:NUMERIC:-9999#,
>>
>>                                 COMPANY = #name:VARCHAR:NO_ENTRY#,
>>
>>                                 MEMBER_ID =  
>> #memberNumber:VARCHAR:NO_ENTRY#,
>>
>>                                 MODIFIED_BY = #modifier#
>>
>>                                 WHERE ID = #id#
>>
>>                 </update>
>>
>>                
>>
>>                
>>
>>                 <delete id="delete"
>>
>>                         parameterClass="club">
>>
>>                         DELETE FROM FREQUENT_MEMBER_CLUB
>>
>>                         WHERE ID = #id#
>>
>>                 </delete>              
>>
>>         </sqlMap>
>>
>>        
>>
>>
>> On Jun 20, 2005, at 12:06 PM, Barnett, Brian W. wrote:
>>
>>
>> Can you show us your FrequentMemberClub.xml file?
>>
>> -----Original Message-----
>>
>> From: Kim Goings [mailto:kim.goings@levelfivesolutions.com]
>>
>> Sent: Monday, June 20, 2005 10:08 AM
>>
>> To: user-java@ibatis.apache.org
>>
>> Subject: mystery table name
>>
>>
>>
>> As this is my first post, let me say that I think iBatis is  
>> FANTASTIC! Now, on to business.
>>
>>
>>
>> I'm getting an exception back from an update statement which  
>> indicates that the SQL contains an invalid table name, yet the debug  
>> output from iBatis shows a different (correct) table name in the  
>> statement. It seems the exception doesn't match up with what should  
>> be going over the wire. Could there be some kind of caching going on  
>> with the statements somewhere? I don't doubt that I had the name  
>> misspelled at some point. Can anyone provide any more insight on  
>> where I should look? I've been chasing this for a while, so it may be  
>> something obvious I'm just not seeing. Trace below.
>>
>>
>>
>>
>> |aef|09:43:00.033|DEBUG|{pstm-100078} PreparedStatement: UPDATE  
>> FREQUENT_MEMBER_CLUB SET ATTENDEE_ID = ?, TYPE = ?, COMPANY = ?,  
>> MEMBER_ID = ?, MODIFIED_BY = ? WHERE ID = ?  
>> [http-8080-Processor25|java.sql.PreparedStatement]
>>
>>
>> |aef|09:43:00.041|DEBUG|{pstm-100078} Parameters: [2, 0, fdasfd,  
>> ffdsafa, user, 3] [http-8080-Processor25|java.sql.PreparedStatement]
>>
>>
>> |aef|09:43:00.063|DEBUG|{pstm-100078} Types: [java.lang.Integer,  
>> java.lang.Integer, java.lang.String, java.lang.String,  
>> java.lang.String, java.lang.Integer]  
>> [http-8080-Processor25|java.sql.PreparedStatement]
>>
>>
>> |aef|09:43:53.471|ERROR|<?xml version="1.0" encoding="UTF-8"?>
>>
>>
>> <message>Could not save travel profile:  
>> com.levelfivesolutions.eventmgr.dao.AttendeeTravelProfile@9</ 
>> message><throwable>com.ibatis.common.jdbc.exception.NestedSQLException 
>> :
>>
>>
>> --- The error occurred in config/FrequentMemberClub.xml.
>>
>>
>> --- The error occurred while applying a parameter map.
>>
>>
>> --- Check the  
>> com.levelfivesolutions.eventmgr.dao.AttendeeFrequentMemberClub.update- 
>> InlineParameterMap.
>>
>>
>> --- Check the statement (update failed).
>>
>>
>> --- Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver  
>> for JDBC][SQLServer]Invalid object name 'FREQUENCT_MEMBER_CLUB'.
>>
>>
>> Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver  
>> for JDBC][SQLServer]Invalid object name 'FREQUENCT_MEMBER_CLUB'.
>>
>>
>>         at  
>> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpd 
>> ate(GeneralStatement.java:87)
>>
>>
>>         at  
>> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExec 
>> utorDelegate.java:500)
>>
>>
>>         at  
>> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.update(SqlMapSessionIm 
>> pl.java:89)
>>
>>
>>         at  
>> com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.update(SqlMapClientImpl 
>> .java:61)
>>
>>
>> <snip/>
>>
>>
>>
>>
>> Thanks,
>>
>>
>> Kim
>>
>>
>>
>>
>>
>>
>>
>> ********************************************************************** 
>> ******
>>
>>
>> This email may contain confidential
>>
>> material. If you were not an intended recipient,
>>
>> Please notify the sender and delete all copies.
>>
>> We may monitor email to and from our network.
>>
>>
>>  ********************************************************************* 
>> ******
>>
> *********************************************************************** 
> *****
>
> This email may contain confidential
> material. If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
>
>  ********************************************************************** 
> *****
>  

Mime
View raw message