ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bkmartin <bmar...@psquareinc.com>
Subject Re: Could not find resource error
Date Mon, 13 Aug 2007 20:09:59 GMT

Hi there, 

Today I'm having the same error that you resolved back in March of 2006. 
Wondering if you could share some more clues with me - if you still are
tuned into this thread?

Do you do all of the up-front connection stuff (establish the SQLmap, etc)
in your Application class? 
Also, do you keep your db connection stuff in a priority file?

How did you package this up (properties to be configured at deployment) -
any pointers?

Thanks for any hints you can provide.  
In the meantime I'll add your Buddy class loading stuff. 

Thank you,

Bryon


Janluc wrote:
> 
> Yeah! That worked! I am *so* proud of my first working sqlmap insert! I
> told everbody in my room and was looked in bewilderment...
> 
> <p>From the Application.java class:
> 
> <pre>
> 		SystemElement se = new SystemElement();
> 		se.setSeName("test");
> 		se.setSeType("test type");
> 		se.setSeDescription("description bla bla bla");
> 		try {
> 			sqlMap.insert("system_element.abatorgenerated_insert", se);
> 		} catch (SQLException e) {
> 			e.printStackTrace();
> 		}
> </pre>
> 
> After execution, in the mysql client app:
> 
> <pre>
> mysql> select * from system_element;
> +-------+--------------+---------+-----------+-------------------------+
> | SE_ID | SE_PARENT_ID | SE_NAME | SE_TYPE   | SE_DESCRIPTION          |
> +-------+--------------+---------+-----------+-------------------------+
> |     1 |         NULL | test    | test type | description bla bla bla |
> +-------+--------------+---------+-----------+-------------------------+
> 1 row in set (0.00 sec)
> </pre>
> 
> <p>*shouts of joy*
> 
> <p>Thank you a lot, Jeff!
> 
> <p>JL
> 
> 
> Jeff Butler-2 wrote:
>> 
>> Wow!  Great job on figuring this out.  You're so close...
>> 
>> I think the only thing you need to change is on your insert statement:
>> 
>> sqlMap.insert("NAMESPACE.abatorgenerated_insert", se);
>> 
>> Where NAMESPACE is the namespace of the generated SQL Map - you can see
>> it
>> on the <sqlMap> element in the XML file.  When you enable statement
>> namespaces, all statement ids must be qualified like this.
>> 
>> Jeff Butler
>> 
>> 
> 

-- 
View this message in context: http://www.nabble.com/Could-not-find-resource-error-tf1310881.html#a12133136
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message