Hello,
I am using iBATIS through Tomcat DBCP for connection pooling.
But, I have this error when I'm trying to do some inserts through my
application:
DBCP object created 2005-02-04 16:19:47 by the following code was never
closed:
java.lang.Exception
at
org.apache.commons.dbcp.Aba
Hi,
I am new to iBatis and am getting a mapping error that I cannot sort out, I
wonder if someone can help me?
My sql map:
sqlMap namespace="OffenceSQL">
SELECT OFFENCES_SEQ.NEXTVAL AS ID FROM DUAL
insert into
What's the type of the OFFENCE_UUID column?
OFFENCE_UUID VARCHAR(20);
-Original Message-
From: Aitor Imaz [mailto:[EMAIL PROTECTED]
Sent: 04 February 2005 12:03
To: ibatis-user-java@incubator.apache.org
Subject: Re: Mapping Problem
What's the type of the OFFENCE_UUID column?
__
I can see one thing, in your the resultClass attribute
should be a String if I'm not wrong. You should put there the class of
the primary key returned, not of the object itself. Maybe that's the
cause of the error (the selectkey mapping)?
Hope it helps,
Aitor
Yeah I tried that... in fact I have tried a whole nuch of things but cannot
get it to work!!
I am now using:
SELECT OFFENCES_SEQ.NEXTVAL AS ID FROM DUAL
insert into
OFFENCES (OFFENCE_UUID, STATUS, AUTHORITY
Ben,
Seems to me that you're using a sequence that gives you integer values, aren't
you?
So, why does your pk column has type VARCHAR(20)?
If your database is Oracle, i bet the problem is happening due to converting
an integer to a
string and then back.
What happens if you replace your #id#
Vamsee Kanakala wrote:
I have this error when I'm trying to do some inserts through my
application:
DBCP object created 2005-02-04 16:19:47 by the following code was
never closed:
Sorry, my bad. I should've read the manual properly. I called
sqlMap.commitTrasaction, but forgot to call sqlMap.en
Thanks Daniel, that works...
Seems strange to me though that it does, as surely the selectKey would have
set id to a java.lang.String anyhow...
Working:
insert into
OFFENCES (OFFENCE_UUID, STATUS, AUTHORITY, TICKET_NUMBER,
OFFE
Hehe,
That was not exactly my intention, but if it worked for you, nice!
I just meant to take your OFFENCES_SEQ.NEXTVAL and put it in place of #id# at
values list.
But, it is working!
Cheers,
Daniel Silva.
--- Ben Gill <[EMAIL PROTECTED]> wrote:
> Thanks Daniel, that works...
>
> Seems s
I am still having problems to get just one insert working
My table is this:
CREATE TABLE OFFENCES
(
OFFENCE_UUID NUMBER NOT NULL,
STATUS VARCHAR2(20) NOT NULL,
AUTHORITYVARCHAR2(20),
TICKET_NUMBERVARCHAR2(20),
That ';' at the end of your insert statement is probably the problem.
HTH,
Kris
Ben Gill wrote:
I am still having problems to get just one insert working
My table is this:
CREATE TABLE OFFENCES
(
OFFENCE_UUID NUMBER NOT NULL,
STATUS VARCHAR2(20)
Select key either goes at the beginning of your insert definition or
at the end. Think of it in a logical flow. If you insert your primary
key with your insert statement then you will want to retrieve that
before you execute your sql statement. Hence you would place the
selectKey at the beginning B
Hi Clinton,
I have two applications (internet and intranet) written in Java.
Is there any example or guidance on running OSCache ?
Do not feel like using signal records .
Previous letter really sounds very good :)
--
regards,
Sergey mailto:[EMAIL PROTECTED]
Yes, that's exactly what we want. :-P
Maybe you could add your comments here:
http://issues.apache.org/jira/browse/IBATIS-63
Thanks.
Bing
On Thu, 03 Feb 2005 23:51:43 +1100, Huy <[EMAIL PROTECTED]> wrote:
> Larry Meadors wrote:
> > On Wed, 02 Feb 2005 13:07:43 +1100, Huy <[EMAIL PROTECTED]> wrote
Hi Sergey,
You'll need to go the the OSCache site for all of those details. Once
you've mastered OSCache, you won't have a problem setting iBATIS up to
use it.
Clinton
On Fri, 4 Feb 2005 21:57:21 +0200, Sergey Livanov
<[EMAIL PROTECTED]> wrote:
> Hi Clinton,
>
> I have two applications (intern
You guys have to understand that this is a tough call for us. It's
just such a horrible implicit behaviour that I can't even imagine the
concequences of it.
This falls into the category of: "Feature to support bad design choices."
Regardless of whether you have control over the database or not,
Both are good suggestions (please add them to JIRA).
The reason behind why there hasn't been much development or evolution
around Parameter Maps is twofold:
1) They're a lot simpler than result maps, and require less configuration.
2) Very few people use the element. You can do
everything wi
Clinton Begin wrote:
You guys have to understand that this is a tough call for us. It's
just such a horrible implicit behaviour that I can't even imagine the
concequences of it.
This falls into the category of: "Feature to support bad design choices."
Regardless of whether you have control over
Hi,
I know I threw this question out before but I've just had a few more
thoughts about this.
The idea was to have a single resultmap for an entire table/domain class
mapping which can be reused in multiple statements without the
select statement providing every column specified in the result
> I've never liked to use Integer. Is it really the
> better design choice ? and why ? Is it the
Not for all situations. But the simple fact is that a primitive
cannot represent NULL state without using a "magic number". Magic
numbers are (to the best of my experience and education) NEVER a goo
Clinton Begin wrote:
I've never liked to use Integer. Is it really the
better design choice ? and why ? Is it the
Not for all situations. But the simple fact is that a primitive
cannot represent NULL state without using a "magic number". Magic
numbers are (to the best of my experience and educa
22 matches
Mail list logo