Dear all
i am using iBatis for the past 6 months and its really gud.
now i am using a query which will retrieve multiiple records.
i am using like this in the query xml
ex: m_id=1,2,3,4
but the resultset doesnt return records for different m_id. only it
retrieves data for the first m_id.
Using #mi_id# tells iBatis to prepare statement
SELECT * FROM message where m_id IN( ? ) ...
and obviuosly it'll return records with m_id="1,2,3,4" (i.e. not (1 or 2 or
3 or 4) but whole string "1,2,3,4").
Simplest way is to use $mi_id$. The $ signs tell iBatis to substitute
$mi_id$ with actual
Hello,
I'm attempting to map an ArrayList typed property and
populate it with instances of SubClassFoo and SubClassBar from the
database.
In my query I LEFT JOIN, and then check for NULL primary key values to
determine which type of SubClass each row represents. Then I use a
and to delegate ea
Perhaps something like this (wild guess work :) ) :
- Mike
On 13/04/07,
Hmm, my suggestion wasn't very good.
Perhaps groupBy needs to be applied to one of the lower level resultMaps?
Never tried to tackle this usecase myself and would like to know how you
solve it.
- Mike
On 13/04/07, Mikael Andersson <[EMAIL PROTECTED]> wrote:
Perhaps something like this (wild g
I need to load a Map whose
value type is an Integer
key type is basically a String (VARCHAR2) with some syntactic rules.
It's corresponding o-o type is NomeGruppo.java.
NomeGruppoTypeHandlerCallback is it's type handler that loads VARCHAR2
fields into well-formed objects of No
Another framework? How much work is it to convert an existing project (like
jpetstore)?
-Original Message-
From: Poitras Christian [mailto:[EMAIL PROTECTED]
Sent: 12 April 2007 03:57 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: converting iBATIS framework DAOs to the Spring Fr
In fact, this was just a recommandation to cut Spring xml file size and
management. Stripes is not required in any way.
I only use 1 class in Stripes and only 2 of my classes have any link
with this.
I personnaly recommand to convert to Spring without Stripes first! Once
it is done and it works, t
You guys rock! :)
Thanks for taking this on, and getting it documented. It will be a
major help for both new and existing users.
Larry
On 4/13/07, Poitras Christian <[EMAIL PROTECTED]> wrote:
In fact, this was just a recommandation to cut Spring xml file size and
management. Stripes is not re
I'm using groupBy to avoid a 1:N select. I've simplified what I'm
doing to isolate the problem.
The relationships between my object model classes are as follows.
A Store has
- a storeGeneral property that is a StoreGeneralModel object
- a phones property that is a List of PhoneModel objects
A
I am trying to use iBATIS in jDeveloper 9 and Tomcat 5.0.28.
I keep getting error: java.lang.NoClassDefFoundError,
under \WEB-INF\lib\
there are : ibatis-2.3.0.677.jar,
log4j-1.2.14.jar;
commons-logging-1.1.jar... and other struts jar.
I searched the onli
Hi All,
I had a look at spring transactions and can get the annotation working for
the dao layer but not for the service layer?
This is the xml I added in the spring config file to enable spring
annotations (Java1.5+ required),
Download CGLIB (at least version 2.1.3)
http://sourceforge.net/project/showfiles.php?group_id=56933
Christian
From: Meindert [mailto:[EMAIL PROTECTED]
Sent: Friday, 13 April 2007 12:03
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: converting iBATIS fra
Jun,
The problem is that Tomcat can't find your BaseIbatisDAO class. Is the
package in your WEB-INF/classes directory?
-Richard
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, April 13, 2007 9:01 AM
To: [EMAIL PROTECTED]
Subject: java.lang.NoClassDefFo
Thanks,
I check, It was there, under C:\Tomcat
5.0.28\webapps\DisclosureSearch\WEB-INF\lib\ibatis-2.3.0.677.jar.
I import ibatis-2.3.0.677.jar. into jDeveloper 9 first and then deploy to
Tomcat.
Jun Li
Information Technology Division
Federal Election Commission
Washington, DC 20463
202.694.12
The BaseIbatisDAO class is not in ibatis-2.3.0.677.jar. BaseIbatisDAO is the
class you wrote.
-Richard
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, April 13, 2007 9:15 AM
To: [EMAIL PROTECTED]
Cc: '[EMAIL PROTECTED]'
Subject: RE: java.lang.NoClass
Sorry, I checked again.
BaseIbatisDAO was under C:\Tomcat
5.0.28\webapps\DisclosureSearch\WEB-INF\classes\aaa\bbb\ccc\
BaseIbatisDAO.class
Thanks.
Jun Li
"Yee, Richard K CTR DMDC" <[EMAIL PROTECTED]>
04/13/2007 12:49 PM
Please respond to
[EMAIL PROTECTED]
To
"'[EMAIL PROTECTED]'" <[E
I'd guess that the BaseIbatisDAO is failing to initialize properly,
then causing the exception you are seeing - if the initialization
fails, the class does not load, so later classes that rely on it can't
find it.
I'd look there for issues - maybe step through it with a debugger.
Larry
On 4/13
Yes, I agree with you, but I couldn't see anything wrong with
BaseIbatisDAO
.
Thanks.
Jun Li
"Larry Meadors" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
04/13/2007 01:03 PM
Please respond to
[EMAIL PROTECTED]
To
[EMAIL PROTECTED]
cc
Subject
Re: java.lang.NoClassDefFoundError error a
You could have an error in your SqlMapConfig.xml. Change the catch block in
your static initializer to catch Exception and print the stack trace or use
a debugger as Larry suggested.
-Richard
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, April 13, 20
One of the characteristics of my application is that the datasource
connection information can be supplied by the user, and I wonder if anyone
has any advice on how to handle that?
Currently I define a datasource in my applicationcontext with default
information (my test db) and specify my BanPol
You could implement a custom datasource and datasource factory to
switch it on the fly, but I think you'd have troubles with things like
caching, etc.
A safer implementation would have two sql map clients - one per
datasource that you swapped instead.
Larry
On 4/13/07, Paul Sanders <[EMAIL PRO
See the solution below.
On Apr 13, 2007, at 10:14 AM, Mark Volkmann wrote:
I'm using groupBy to avoid a 1:N select. I've simplified what I'm
doing to isolate the problem.
The relationships between my object model classes are as follows.
A Store has
- a storeGeneral property that is a StoreG
Yea, Spring has a new AbstractRoutingDataSource that can route to a
different datasource based on a ThreadLocal. The problem is that the
iBATIS SqlMapClient doesn't know the datasource isn't the same between
calls, so your caching gets horked.
Based on the AbstractRoutingDataSource idea, I wrote
I'm currently trying to get ibatis 2.3 to return xmlbeans. from
http://www.mail-archive.com/[EMAIL PROTECTED]/msg01351.html it looks
like there's a small amount of extra work attached to this because
instantiation occurs through a factory method rather then the default
argumentless constructor.
Hi Richard & Larry,
Your guy are great. I put different try block and found my
SqlMapConfig.xml missing close tag .
and it works fine in jDeveloper9. But when I deploy into Tomcat, I still
got same error:
There are many kinds of log file under Tomcat/log folder.
I even can not see any debug me
Hey Mikael,
>
>
>
>
>
>
Yeah, I've tried things like this, but apparently s must
contain at least one .
I'll play around with putting the groupBy in different places, and maybe
try tracing into the i
Suppose I have person, address and phone tables.
address has a foreign key to person.
phone has a foreign key to person.
A person can have multiple addresses and multiple phones.
I want to create an iBATIS mapped select that retrieves a person and
all their addresses and phones.
This has been r
Interesting but you are right, our datasource info is not known in
advance though some are stored in a table and fetched at runtime when the
user selects it from a drop down in the browser. And of course they can
create one on the fly, too.
I wonder if the answer is to unwire the datasource f
Here is one guy's opinion: It isn't an issue for a few reasons.
First, it doesn't happen all that often - sometimes, sure, but it's a
small percentage of the total number of queries I need.
In most cases (in my experience anyway) this type of query is used in
a reporting type of situation, where
Mikael,
Ok, here's what I've come up with so far.
On Fri, 2007-04-13 at 13:52 -0700, Daniel Carleton wrote:
> I'll play around with putting the groupBy in different places, and
> maybe try tracing into the iBATIS source to see what's going on.
Moving the groupBys around didn't have any effect.
One of the reasons to use iBATIS is to avoid creating deeply nested object
graphs that you won't use and don't need. My guess is that this is one of
the reasons it's not such a big issue to iBATIS people. Not that this is
very deeply nested, but maybe you know what I mean. Truthfully - how ofte
32 matches
Mail list logo