Hi Swati, I see that the mapped-statement is not a node in the sql-map2.dtd file. Previously in version 1.x ibatis had something like a mapped-statement.
This has been replaced with tags like statement, insert, update etc instead of the mapped-statement tag. Look at the JPetStore application you should get information about how to use the sql-map. There are sites with examples on how to use ibatis with a older version but since we don't read things in full and just jump the the example with code directly, the examples can be misleading. http://www.developer.com/java/data/article.php/10932_3346301_1 http://www.reumann.net/struts/ibatisLesson1.do The site has a link that says NEW: Samuel Huang was kind enough to covert this iBATIS example into an iBATIS 2.0 war. Download it here. I wish iBatis threw an error if the sql-map did not confirm to the dtd. Thanks Prashanth --- Swati Singhal <[EMAIL PROTECTED]> wrote: > Hello, > > Am attaching my sql-map-config file and also the SQL > file. > > > --- Brandon Goodin <[EMAIL PROTECTED]> wrote: > > urrr sorry...post your sql-map-config.xml file > > please. > > > > Brandon > > > > > > On Fri, 18 Mar 2005 00:56:20 -0700, Brandon Goodin > > <[EMAIL PROTECTED]> wrote: > > > post your sqlmap > > > > > > On Thu, 17 Mar 2005 23:09:42 -0800 (PST), Swati > > Singhal > > > <[EMAIL PROTECTED]> wrote: > > > > Hello, > > > > > > > > Yes, in my Order.xml I have: > > > > > > > > <sql-map namespace="Order"> > > > > <typeAlias alias="Row" > > > > type="com.ibatis.dataaccess.beans.Row"/> > > > > > > > > <insert id="insertRow" > > > > > > parameterClass="com.ibatis.dataaccess.beans.Row"> > > > > INSERT INTO ORDER > > (processed_ind, insr_dt, > > > > processed_dt, order_det) > > > > VALUES (#processind#, #createddate#, > > > > #processeddate#, #orderxml#) > > > > </insert> > > > > > > > > </sql-map> > > > > > > > > I am still getting the error when I call: > > > > > > > > daoManager.startTransaction(); > > > > insert("Order.insertRow", xmlrow); > > > > daoManager.endTransaction(); > > > > > > > > any idea?? > > > > > > > > Thanks > > > > > > > > Swati > > > > > > > > --- Brandon Goodin <[EMAIL PROTECTED]> > > wrote: > > > > > are you using namespaces? if yes then you need > > to > > > > > make it... > > > > > > > > > > insert("Order.insertRow", row); > > > > > > > > > > if your namespace is "Order" > > > > > > > > > > Brandon > > > > > > > > > > > > > > > On Thu, 17 Mar 2005 22:44:26 -0800 (PST), > > Swati > > > > > Singhal > > > > > <[EMAIL PROTECTED]> wrote: > > > > > > Hi, > > > > > > > > > > > > I have an Actionclass from where I > > instantiate my > > > > > > Service class which in turn gets me a DAO > > instance > > > > > and > > > > > > calls a class where I say: > > > > > > > > > > > > daoManager.startTransaction(); > > > > > > insert("insertRow", row); > > > > > > daoManager.endTransaction(); > > > > > > > > > > > > Now, I have defined all my XML files > > containing > > > > > the > > > > > > queries in sql-map-config.xml file like: > > > > > > > > > > > > <sqlMap > > > > > > > > > > > > > > > > > > resource="com/myibatis/dataaccess/persistence/sqlmapdao/sql/Shop.xml"/> > > > > > > <sqlMap > > > > > > > > > > > > > > > > > > resource="com/myibatis/dataaccess/persistence/sqlmapdao/sql/order.xml"/> > > > > > > > > > > > > What I want to know is, how does iBATIS know > > which > > > > > of > > > > > > the 2 XML files it should look INTO for > > finding a > > > > > > statement named "insertRow" ?? > > > > > > > > > > > > I have only one such XML file and have a > > statement > > > > > by > > > > > > the name "insertRow" but am getting that > > > > > > "there is no statement by the name > > "insertRow" in > > > > > this > > > > > > SqlMap" > > > > > > > > > > > > Any solutions? > > > > > > > > > > > > Thanks > > > > > > > > > > > > > > > > > > __________________________________ > > > > > > Do you Yahoo!? > > > > > > Make Yahoo! your home page > > > > > > http://www.yahoo.com/r/hs > > > > > > > > > > > > > > > > > > > > > __________________________________________________ > > > > Do You Yahoo!? > > > > Tired of spam? Yahoo! Mail has the best spam > > protection around > > > > http://mail.yahoo.com > > > > > > > > > > > > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - You care about security. So do we. > http://promotions.yahoo.com/new_mail> <?xml version="1.0" encoding="UTF-8" > standalone="no"?> > <!DOCTYPE sqlMapConfig SYSTEM "file:///DTD/sql-map-config-2.dtd"> > > <sqlMapConfig> > <properties resource="config/database.properties"/> > > <settings > cacheModelsEnabled="true" > enhancementEnabled="true" > maxSessions="64" > maxTransactions="8" > maxRequests="128"/> > > <transactionManager type="JDBC"> > <dataSource type="JNDI"> > <property name="DataSource" > value="java:comp/env/jdbc/dcds"/> > </dataSource> > </transactionManager> > > <sqlMap > resource="com/ibatis/dataaccess/persistence/sqlmapdao/sql/InsertXMLFile.xml"/> > </sqlMapConfig> > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE sql-map SYSTEM "file:///C:/DTD/sql-map-2.dtd"> > > <sql-map namespace="InsertXMLFile"> > <typeAlias alias="Row" type="com.ibatis.dataaccess.beans.Row"/> > > <insert id="insertRow" parameterClass="com.ibatis.dataaccess.beans.Row"> > INSERT INTO ORDER (processed_ind, insr_dt, processed_dt, > order_det) > VALUES (#processind#, #createddate#, #processeddate#, #order#) > </insert> > > </sql-map> > __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/

