Good Morning Larry- the good news is that ibatis has working Jpetstore demo there are a number of deltas between the the working ibatis and spring configurations ibatis(correct) spring(problematic) ============================= ============ config file sql-map-config.xml dataAccessContext-local.xml DBDriver <property value="${driver}" name="JDBC.Driver"/> <property name="driverClassName" value="org.hsqldb.jdbcDriver"> resourceID <properties resource="properties/database.properties"/> No database.properties per se in spring config sqlMap category <sqlMap resource="com/ibatis/jpetstore/persistence/sqlmapdao/sql/Category.xml"/> ? initialisation file ddl.hsql.jpetstore-hsqldb-dataload.sql db.hsqldb.jpetstore.script
I would suggest to the folks at spring should think about replacing their jpetstore demo war asap Ideas? M- This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents ----- Original Message ----- From: "Martin Gainty" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <user@struts.apache.org>; <[EMAIL PROTECTED]> Sent: Sunday, October 29, 2006 9:30 AM Subject: Re: spring jpetstore demo error (possibly O/T) > Good Morning Larry- > > the stack gets as far as > org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:171) > > /************here is the SqlMapClientTenplate.java**********************/ > public Object execute(SqlMapClientCallback action) throws DataAccessException > { > Assert.notNull(this.sqlMapClient, "No SqlMapClient specified"); > // We always needs to use a SqlMapSession, as we need to pass a > Spring-managed > // Connection (potentially transactional) in. This shouldn't be necessary if > // we run against a TransactionAwareDataSourceProxy underneath, but > unfortunately > // we still need it to make iBATIS batch execution work properly: If iBATIS > // doesn't recognize an existing transaction, it automatically executes the > // batch for every single statement... > > SqlMapSession session = this.sqlMapClient.openSession(); //ok! > try { > Connection con = DataSourceUtils.getConnection(getDataSource()); //ok! > try { > session.setUserConnection(con); //OK! > return action.doInSqlMapClient(session); //woops! > } > catch (SQLException ex) { > throw getExceptionTranslator().translate("SqlMapClient operation", null, > ex); > } > > /****meanwhile in SqlMapClientCallback.java there is the declaration for > method doInSqlMapClient within SqlMapClientCallback.java***/ > Object doInSqlMapClient(com.ibatis.sqlmap.client.SqlMapExecutor executor) > throws SQLException; > > /******* not much can go wrong here except of course if the SqlMapExecutor > object is not properly constructed **********/ > /******I'll try to ping the ibatis folks as there is an error with the > construction of the SqlMapExecutor and look at that constructor***/ > > Ideas? > M- > > This e-mail communication and any attachments may contain confidential and > privileged information for the use of the > designated recipients named above. If you are not the intended recipient, you > are hereby notified that you have received > this communication in error and that any review, disclosure, dissemination, > distribution or copying of it or its > contents > ----- Original Message ----- > From: "Larry Meadors" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <user@struts.apache.org>; "Martin Gainty" > <[EMAIL PROTECTED]> > Sent: Saturday, October 28, 2006 10:46 PM > Subject: Re: spring jpetstore demo error (possibly O/T) > > >> Not sure if there is a typo in your email or if your copy of the >> Category.xml file somehow got buggered up, but there is a trailing "." >> on the select statement there. That would make it puke, but like I >> said, I am not positive that that is the real problem, or just a weird >> typo. Can you check it and let use know? >> >> Larry >> >> >> On 10/28/06, Martin Gainty <[EMAIL PROTECTED]> wrote: >>> Has anyone encountered this error with the spring jpetstore sample and know >>> the solution?org.springframework.web.util.NestedServletException: Request >>> processing failed; nested exception is >>> org.springframework.jdbc.BadSqlGrammarException: SqlMapClient operation; >>> bad SQL grammar []; nested exception is >>> com.ibatis.common.jdbc.exception.NestedSQLException: >>> --- The error occurred in >>> org/springframework/samples/jpetstore/dao/ibatis/maps/Category.xml. >>> --- The error occurred while executing query. >>> --- Check the select catid,name,descn from category where catid = >>> 'dog' . >>> --- Check the SQL Statement (preparation failed). >>> Many Thanks,Martin --This e-mail communication and any attachments may >>> contain confidential and privileged information for the use of the >>> designated recipients named above. If you are not the intended recipient, >>> you are hereby notified that you have received >>> this communication in error and that any review, disclosure, dissemination, >>> distribution or copying of it or its >>> contents >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >>