From the Application.java class:
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(); }
After execution, in the mysql client app: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)*shouts of joy*
Thank you a lot, Jeff!
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 theelement in the XML file. When you enable statement namespaces, all statement ids must be qualified like this. Jeff Butler
View this message in context: Re: Could not find resource error
Sent from the iBATIS - User - Java forum at Nabble.com.