Your sqlMap file should read like this
http://ibatis.apache.org/dtd/sql-map-2.dtd";>
whereas your SqlMapconfig should read like
http://ibatis.apache.org/dtd/sql-map-config-2.dtd";>
I recommend reading the documentation like
http://ibatis.apache.org/docs/java/pdf/iBATIS
That won't work, you'll need to do 2 selects, or use a RowHandler.
Larry
On Wed, Mar 5, 2008 at 10:26 PM, ashishvk <[EMAIL PROTECTED]> wrote:
>
> hi all,
>
> i have entity relationship as follows:
>
> P 1:m c1,c2 where p is parent and c1,c2 are child tables.
> My problem is that when i have
hi all,
i have entity relationship as follows:
P 1:m c1,c2 where p is parent and c1,c2 are child tables.
My problem is that when i have 2 records in c1 and 1 record in c2 for p, the
record in c2 gets added to c2list twice (which i want to avoid)
i am using outer joins in my query.
thanks
I got the driver...
now am getting this error...
Cause: org.xml.sax.SAXParseException: Document root element "select",
must match DOCTYPE root "null".
I have the doc type as
http://ibatis.apache.org/dtd/sql-map-config-2.dtd";>
and my sql map is simple...
SELECT FILENET_DOC_ID AS id,DOC_SIDE
my first guess would be h Oracle!
if that one missed you, one might try
http://www.google.com/search?q=oracle+driver+for+java
On Wed, Mar 5, 2008 at 3:15 PM, Angso, Tony <[EMAIL PROTECTED]> wrote:
> Am getting this now
> Error while loading properties. Cause:
> java.lang.ClassNotFoundExc
Am getting this now
Error while loading properties. Cause:
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
Where can I get the Oracle Driver?
-Original Message-
From: Clinton Begin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2008 3:40 PM
To: user-java@ibatis.a
Wow, sorry for such a horribly unhelpful error! That exception is thrown if
any of these keys are missing, not simply null, but completely missing.
But they are indeed there... so I'm confused too, as it should succeed...?
Is there any chance
Am running in RAD6 and getting the following error
[3/5/08 14:24:50:692 EST] 0025 SystemErr R
java.lang.RuntimeException: Error occurred. Cause:
com.ibatis.common.xml.NodeletException: Error parsing XML. Cause:
java.lang.RuntimeException: Error parsing XPath
'/sqlMapConfig/transactionManager
We have the commitRequired="false" so the code does not explicitly call
rollback, however when the transaction is ended, since the transaction is
not committed, the txManager rolls back the transaction.
public void endTransaction(SessionScope session) throws SQLException {
try {
try {
The rollback was necessary for Sybase and other databases at the time, but
possibly none anymore... Regardless, it is solved by setting If you set
commitRequired="false". In the next major version of iBATIS we'll probably
change the default setting.
***BUT***
Creating the transaction in th
That's a good point as well, Chris. If you use Spring, it will manage the
transaction fully, using whatever JDBC driver/datasource combination it has
configured. You could also use setUserConnection() if you want to bypass
the transaction manager entirely.
The one exception is that you'll stil
I saw the commitRequired, but why are we creating the transaction in the
first place? Or is this a Sybase requirement that the rest of us have had to
live with?
On Wed, Mar 5, 2008 at 11:44 AM, Christopher Lamey <[EMAIL PROTECTED]>
wrote:
> Doh! Forgot about "commitRequired" - been using Spring
Doh! Forgot about "commitRequired" - been using Spring for everything
lately.
Sorry about that.
On 3/4/08 7:46 PM, "" <> wrote:
> Actually, it is the default behaviour. :-/
>
> It's a combination of both the iBATIS transaction manager default
> configuration and SimpleDataSource.
>
> To make
Thanks for the help. I had seen that code example before but not from
the Spring doc so didn't understand the context. After playing with it
for a bit I was able to get some test code working with the batching
using that method.
I don't know if it's my environment config or what but I had to ma
It's interesting that they use that as an example, because that wouldn't even
really do a batch. In recent discussions, it was shown that iBATIS only
batches the same statements. "insertAccount" and "insertAddress" would likely
not be the same SQL statement, so they would each be in their own
I would like to make this configurable by adding a property and code
something like the following...
Thoughts?
Mike
public List queryForList(SessionScope sessionScope, String id, Object
paramObject, int skip, int max) throws SQLException {
List list = null;
MappedStatement ms = get
Did u check Spring-reference.pdf. The batching of Ibatis has been
explained in page 296.
public class SqlMapAccountDao extends SqlMapClientDaoSupport implements
AccountDao {
public void insertAccount(Account account) throws DataAccessException {
getSqlMapClientTemplate().execute(new SqlMapClie
You have an example here:
http://static.springframework.org/spring/docs/2.5.x/reference/orm.html#orm-ibatis-template
Christian
From: Jesse Reimann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2008 10:19 AM
To: user-java@ibatis.apache.org
Subject: iBATIS
Could someone explain to me how-to do iBATIS batching when using Spring
DAO? I've been reading and searching and can't seem to find an example
out there on how to actually do it.
I'm using Abator to generate my Spring DAO classes and I've got it
working with no issues. I read that using Spring tha
Hi,
I configured the same in the websphere datasource properties. I am waiting
for the connection to become stale. Hopefully this should work.
Could you please let me know whether doing this shall decrease the
performance of my application.
Thanks
Venkat
Jeff Butler-2 wrote:
>
> You have to
You have to configure the ping quesry in WebSphere - not in iBATIS. Here's
a link to the WebSphere documentation that shows how to do it:
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/tdat_pretestconn.html
Use the search string "pre
Hi Axel,
Thank you very much for your reply. Is the ping query property is only
applicable for SimpleDatasource? I am using Websphere's datasource as per
my project requirement. Could you please let me know if I can make use of
the ping query in my sqlmapconfig even in this case.
Leucht, Axel
I wasn't following this thread, so bear with me if someone already mentioned
it...
I suppose that you're connection pool is thinking the connection to the
database to be valid when in fact it isn't. You can setup a "ping query" with
almost every ConnectionPool to let the pool check whether the
Hi,
Thanks for the advise. I would like to state here that I have not
deliberately put my questions 6 times. It was happened due to my lack of
knowledge to post the queries in this forum. Since my query was not
appearing on the forum, I thought that I can post directly through mail.
Anyways sorry
24 matches
Mail list logo