Re: How to Compare database record before UPDATE using iBatis?

2009-03-31 Thread Christopher Lamey
On 3/31/09 7:25 AM, "Nicholoz Koka Kiknadze" wrote: > Hm, I usually override equals. Any advantages with hashCode? Just an FYI, if you override equals(), you should almost always override hashcode as well. From the Object.equals Javadoc API: "Note that it is generally necessary to override the

Re: iBatis+xStream

2009-03-25 Thread Christopher Lamey
On 3/25/09 3:35 PM, "AlexElba" wrote: > The problem is this lists must be lazy. I don't want to make them not lazy Whups! Didn't see this before. If you need lazy loading, then you'll have to write custom stuff in xstream to filter out the proxies. Cheers, topher

Re: Ibatis 2.3.0 + postgresql 8.2, returns org.postgresql.util.PSQLException: ERROR: transaction is read-only.

2008-08-11 Thread Christopher Lamey
On 8/11/08 10:26 AM, "Torx" <[EMAIL PROTECTED]> wrote: > class="org.springframework.transaction.interceptor > .NameMatchTransactionAttributeSource"> > > > > PROPAGATION_REQUIRED, > ISOLATION_DEFAULT,-FatalException,-ServiceException,readOnly > > > PROPAGATION_REQUIRED, > ISOLATION_DEFAULT,-F

Re: iBATIS 2.3.3. Clustering and Lazy Loading

2008-07-29 Thread Christopher Lamey
You need to disable the lazy loading and maybe the byte code enchancments in iBATIS. If you're caching, you might have to tweak the cache settings to allow for things to be serialized as well. Check out the settings element in the sqlmap config xml file. On 7/29/08 10:36 AM, "nch" <[EMAIL PROTEC

Re: ibatis+springframework for millions data loading

2008-07-23 Thread Christopher Lamey
Er, that should read "...regardless of output type." On 7/23/08 10:12 AM, "Christopher Lamey" <[EMAIL PROTECTED]> wrote: > On 7/23/08 8:11 AM, "Emi Lu" <[EMAIL PROTECTED]> wrote: > >> I tried: >> === >> ... >>

Re: ibatis+springframework for millions data loading

2008-07-23 Thread Christopher Lamey
On 7/23/08 8:11 AM, "Emi Lu" <[EMAIL PROTECTED]> wrote: > I tried: > === > ... > set echo off newpage 0 space 0 pagesize 0 feed off head off trimspool on > ... > I think the "spool" command is the one that actually tells sqlplus to write to a file. The "set" stuff just configures the ou

Re: ibatis+springframework for millions data loading

2008-07-22 Thread Christopher Lamey
On 7/22/08 4:24 PM, "Clinton Begin" <[EMAIL PROTECTED]> wrote: > True, other tools may be better... > > But with a RowHandler, iBATIS could easily meet this requirement. I've used > iBATIS RowHandlers for ETL type stuff and achieved crazy performance with > batch updates. 15,000 records per sec

Re: ibatis+springframework for millions data loading

2008-07-22 Thread Christopher Lamey
On 7/22/08 9:59 AM, "Emi Lu" <[EMAIL PROTECTED]> wrote: > Greeting, > > I will load millions of data from Oracle10 to postgreSQL8 through JDBC. > > I like the spring+ibatis framework. May I know how ibatis deal with big > chunk of data please? > > The example I had is the following, would you s

Re: running iBATIS test cases with JNDI

2008-07-21 Thread Christopher Lamey
On 7/21/08 9:11 AM, "Fabiano Ferrari" <[EMAIL PROTECTED]> wrote: > However, I have never implemented any JNDI-based application. Does > anybody have an example of implementation of this MyDataSource class? > If so, could you provide me with the basic steps to "install" such > class and run the tes

Re: iBatis Tomcat log4j IntelliJ IDEA

2008-07-18 Thread Christopher Lamey
On 7/18/08 1:42 PM, "Tokajac" <[EMAIL PROTECTED]> wrote: > > That's exactly the topic here. > My aim is to see SELECT * FROM... , INSERT INTO... > on the console when they're executed > > Any more ideas? The FAQ has entry for this: http://opensource.atlassian.com/confluence/oss/display/IBATIS/

Re: Check if query exists before executing

2008-06-18 Thread Christopher Lamey
You could look at the database metadata through the Connection: sqlMapClient.getCurrentConnection().getMetaData().getDatabaseXXX() And then use that to call either the Oracle or generic sql. I personally wouldn't go that route because Oracle might change their metadata so it'd break your cod

Re: Memcached Ibatis controller ?

2008-06-11 Thread Christopher Lamey
Also, you can use oscache as well with ibatis, which supports a distributed cache. On 6/11/08 12:04 PM, "Sundar Sankar" <[EMAIL PROTECTED]> wrote: > I am not aware of the usage of memcache. But googling on it tells me that it > simply stores data in memory and you hit the database only when the d

Re: No caching / validating cache

2008-06-02 Thread Christopher Lamey
Do you have this attribute defined in the setting element: cacheModelsEnabled="true" In the sqlMapConfig file? On 6/2/08 3:23 PM, "andrew cooke" <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a very simple system, with two tables, related 1:many, and > a single query which reads all entrie

Re: Calling a procedure by default.

2008-05-22 Thread Christopher Lamey
Why not use a trigger on the table to call the procedure? What database are you using? On 5/22/08 5:22 PM, "Sundar Sankar" <[EMAIL PROTECTED]> wrote: > Hi, > I am using Spring and Ibatis in our application and we have a > requirement where an audit procedure needs to be called every time an

Re: Dynamic queries w/o using tags in sql?

2008-05-13 Thread Christopher Lamey
Have you looked at iBATOR for generating all that conditional CRUD stuff? Might be worth your time. On 5/13/08 3:11 PM, "Josh Joy" <[EMAIL PROTECTED]> wrote: > Thanks Clinton for your reply. > > Just to clarify...I'm not looking for any performance optimizations...when I > say best practices I'm

Re: sqp maps, namespaces a queries' IDs

2008-05-08 Thread Christopher Lamey
8 2:56 PM, "Filipe David Manana" <[EMAIL PROTECTED]> wrote: > Ah! > > So, even with false (default) for the useStatementNamespaces setting, I > will be able to use the Namespace.queryName notation? right? > > thanks a lot > > On Thu, May 8, 2008 at 10:24 PM

Re: sqp maps, namespaces a queries' IDs

2008-05-08 Thread Christopher Lamey
Hello, Yes you can. Please see page 10 of the iBATIS PDF, specifically the section on useStatementNamespaces for details. Cheers, Chris On 5/8/08 1:47 PM, "Filipe David Manana" <[EMAIL PROTECTED]> wrote: > Hi, > > In my app I have several sql maps (each one in a separate xml file). Each > sq

Re: groupby x out of memory

2008-04-11 Thread Christopher Lamey
On 4/11/08 1:32 PM, "Nathan Maves" <[EMAIL PROTECTED]> wrote: > We have seen a few posts about using RowHandlers in the past few > months. Though I have not tried it with the optional groupBy attribute I > can definitively say that I have processed millions of row through a row > handler and my ap

Re: iBatis using Tomcat JNDI, Now DB unit Tests???

2008-04-01 Thread Christopher Lamey
I use Spring's SimpleNamingContextBuilder to create my own JNDI DataSources outside of a container. You might also want to look at DBUnit and hsqldb. On 4/1/08 9:09 AM, "Tom Henricksen" <[EMAIL PROTECTED]> wrote: > We have been using the Simple datasource in iBatis and had unit test > that would

Re: iBatis - tomcat JNDI setup

2008-03-27 Thread Christopher Lamey
ommonVsp.xml"/> > resource="com/advtechgrp/bop/medical/offender/data/OffenderDef.xml"/> > resource="com/advtechgrp/bop/medical/common/data/admcounter.xml"/> > resource="com/advtechgrp/bop/medical/activity/data/ActivityFrequencyVsp. > xml&q

Re: iBatis - tomcat JNDI setup

2008-03-27 Thread Christopher Lamey
p://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html > And it has both the context.xml and the entry in the web.xml. > I will try without the web.xml and see. > > Thanks, > Tom > > -Original Message- > From: Christopher Lamey [mailto:[EMAIL PROTECTED]

Re: iBatis - tomcat JNDI setup

2008-03-26 Thread Christopher Lamey
Having the ResourceLink and the Resource in the context xml might be screwing it up. You're telling it to link to a global JNDI object, but it doesn't exist at that level. Also using a resource-ref in the web.xml and a Resource element in the context.xml is redundant. Read the Resource Definitio

Re: select * causing " OutOfMemoryError: Java heap space"

2008-03-18 Thread Christopher Lamey
Looks like you can use the "userCursorFetch=true" param on the JDBC URL to get it to adhere to the fetch size: http://bugs.mysql.com/bug.php?id=18148 Cheers, topher On 3/18/08 12:24 PM, "nch" <[EMAIL PROTECTED]> wrote: > > So-lu-tion. > But, yeah, WOW!! > > Clinton, you've been really helpful

Re: Retrieve the SQL statement being executed

2008-03-11 Thread Christopher Lamey
On 3/10/08 8:25 PM, "" <> wrote: > Thank you all again for your suggestions. > > One of the use cases of mine is to create an XML in the end. I don't have an > object serve as a middle stage to use with Rowhandler (in RowHandler's term, I > need to map the valueObject to something, right?). No -

Re: Retrieve the SQL statement being executed

2008-03-09 Thread Christopher Lamey
I'm not sure why a RowHandler wouldn't fit your needs. It basically is a callback that gets invoked on each row returned from the query. Only one resultant row is mapped at a time, so the memory usage is very small. The result does get mapped into an object, but the overhead is minimal - and you

Re: queryForList/Map/Object... rollbacks

2008-03-05 Thread Christopher Lamey
> possible that SimpleDataSource was entirely responsible for the aggressive > rollbacks -- thus we should probably make that configurable too. > > Clinton > > -Original Message- > From: Christopher Lamey [mailto:[EMAIL PROTECTED] > Sent: March-04-08 5:07 PM > To:

Re: queryForList/Map/Object... rollbacks

2008-03-04 Thread Christopher Lamey
That is not the default iBATIS behavior, I'm guessing your container is getting involved. >From what I understand, the SIMPLE datasource type is generally for standalone programs, not for apps running in a container. On 3/4/08 4:20 PM, "Tom Henricksen" <[EMAIL PROTECTED]> wrote: > Currently we a

Re: data source issue

2008-02-29 Thread Christopher Lamey
How are you setting up JNDI in your command line client? Try accessing the DataSource via JNDI in the command line client directly to verify that it's there. On 2/29/08 12:06 PM, "Marrs, Kasey" <[EMAIL PROTECTED]> wrote: > I am using SQLMaps and have had good success using it, but I have ran > i

Re: Transaction Time Out and Stale Connection Exception when using IBatis SQLMapper

2008-02-15 Thread Christopher Lamey
First, some etiquette advise is in order. It is considered a faux pas to send the same message to the list 6 times in a short amount of time. Posting something more will not get you more or quicker responses. Also, sending the same message directly to members of the list immediately after posting

Re: Stored procedure help.

2008-02-12 Thread Christopher Lamey
BTW, you can always write a RowHandler that pulls things together into a Map for you if the resultMap route doesn't work for whatever reason. On 2/12/08 4:13 PM, "Christopher Lamey" <[EMAIL PROTECTED]> wrote: > So the next section of the iBATIS docs on page 37 talks ab

Re: Stored procedure help.

2008-02-12 Thread Christopher Lamey
value of the out parameter for STATUS, and the other entry > to contain a fully "hydrated" customer object based off the remaining OUT > parameters. > > Thanks, > > Craig. > > On 2/12/08, Christopher Lamey <[EMAIL PROTECTED]> wrote: >> >> Hello

Re: Stored procedure help.

2008-02-12 Thread Christopher Lamey
Hello, The following is from the iBATIS PDF, page 37: Result Maps can also conveniently populate a Map instance such as HashMap or TreeMap. Collections of such objects (e.g. Lists of Maps) can also be retrieved using the APIs described below (see queryForList()). Map types are mapped exactly the

Re: deep (and wide) inheritance model

2008-01-30 Thread Christopher Lamey
So are you basically looking at one big query with a bunch of joined tables or a bunch of smaller queries to pull it all together? If so, which one would fit better for your app? On 1/29/08 6:42 PM, "Hugh Ross" <[EMAIL PROTECTED]> wrote: > I have the good fortune to work on a large domain model,

Re: Exit out of rowHandler

2008-01-30 Thread Christopher Lamey
Interesting - I don't think I used a groupBy with my large volume RowHandlers. If you're writing to the output stream from the RowHandler and the user Cancels the download, wouldn't the stream get closed and cause an exception the next time you tried to write? It seems like you're going through a

Re: How get DB2Connection object from SqlMapClient?

2008-01-24 Thread Christopher Lamey
So you want to change JDBC driver configuration based on the invoked method? For reporting reasons? I'm very curious, can you give more details? An example? On 1/24/08 1:19 PM, "Hugh Ross" <[EMAIL PROTECTED]> wrote: > Unfortunately, the InvocationHandler for SimplePooledConnection is a private

Re: Default Transaction Manager

2008-01-23 Thread Christopher Lamey
As I remember, if you're using the Spring SqlMapClientTemplate, iBATIS will assume you're using an EXTERNAL transaction manager. So whatever you have defined (or don't have defined in your case) in the sql-map-config.xml will be ignored. On 1/23/08 12:50 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]

Re: ueryForObject returns bean with null properties

2008-01-22 Thread Christopher Lamey
> # User.java # > public class User implements java.io.Serializable { > private String userName; > > public String getUserName() { return this.userName; } > public void setUserName(String s) { this.userName = userName; } > } Should the setter do this? public void setUserName(String

Re: howto pass a Long argument to a query (isNotNull)

2008-01-18 Thread Christopher Lamey
Yea, the problem is that you've specified a Long as the parameter and then you've got a isNotNull testing, which is trying to do this kind of thing: Long.getUserId() Long.userId Long.get("userId") Which won't work. Besides what Larry said, you could also just pass in a map:

Re: How to configure Multiple datasource in SqlMapConfig.xml

2008-01-17 Thread Christopher Lamey
OK - so you need completely different sqlmaps. On 1/17/08 2:27 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > They are completely different schemas and totally different databases - on > different machines. > > > > > Christopher Lamey <[EMAIL PR

Re: How to configure Multiple datasource in SqlMapConfig.xml

2008-01-17 Thread Christopher Lamey
Are they completely different schemas? If so, then you'll need two different sqlmaps, DAOs, datasources, etc. A single sqlmap generally only talks to one schema. If they're the same and you can switch based on a runtime parameter, take a look at this: http://opensource.atlassian.com/confluence/

Re: How to pass Database connection dynamically

2008-01-16 Thread Christopher Lamey
Check out page 8 of the iBATIS PDF, specifically the properties element. Cheers, Chris On 1/16/08 2:24 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > I am using iBATIS 2.3.0. My SqlMapConfig.xml file looks like this > > > >value="oracle.jdbc.driver.OracleDriver"/> >

Re: Changing datasource at runtime

2008-01-16 Thread Christopher Lamey
in RoutingSqlMapClient > with the new SqlMapClient. The DAO is unaware of any changes to the > underlying datasource. > > > On 15/01/2008, Christopher Lamey <[EMAIL PROTECTED]> wrote: >> >> I'm confused - why do you need the routing if you only need to su

Re: Changing datasource at runtime

2008-01-15 Thread Christopher Lamey
> > > class=" > org.springframework.jdbc.datasource.DataSourceTransactionManager"> > > > > > class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"> > value="config/sqlmaps/sql-ma

Re: Changing datasource at runtime

2008-01-15 Thread Christopher Lamey
Spring isn't good at dynamic DataSource stuff, especially new ones that get created after the Spring context is instantiated. This item on the FAQ details the solution I came up with for my stuff: http://opensource.atlassian.com/confluence/oss/pages/viewpage.action?pageId= 12583003 There aren't

Re: Ibatis throttle - possible deadlock (ibatis 2.2, 2.3)

2008-01-15 Thread Christopher Lamey
I usually just turn it on for everything and let it rip...but then I have large amounts of disk space. You could probably switch off the result set stuff if you want. On 1/15/08 5:48 AM, "Nikolas Kyriazopoulos Panagiotopoulos" <[EMAIL PROTECTED]> wrote: >> You could set the java.sql logging ca

Re: Performance question

2008-01-10 Thread Christopher Lamey
On 1/10/08 2:52 PM, "Brian Parkinson" <[EMAIL PROTECTED]> wrote: > I wasn't quite sure in your answer whether the startBatch/executeBatch > should work properly under the setup I have now - I was assuming that > the performance problems I encountered were related (in part at least) > to the fact t

Re: Performance question

2008-01-10 Thread Christopher Lamey
On 1/10/08 1:58 PM, "Brian Parkinson" <[EMAIL PROTECTED]> wrote: > Hi Christopher - > > Finally got a chance to look at adding transaction support to my iBATIS > code using Spring 2.5.1. > Needed to use spring.jar as well as aspectweaver.jar. Yea, it needs that jar for the AOP stuff. Your conf

Re: Performance question

2008-01-09 Thread Christopher Lamey
> com/ecobee/foundation/dao/ibatis/SqlMapConfig.xml > > > > class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> > value="com.mysql.jdbc.Driver" /> > > > > > > > > > class=&

Re: Performance question

2008-01-09 Thread Christopher Lamey
Hello, A transaction can get to a certain size and start to build up a big enough rollback segment or two that it slows the whole thing down. So you might want to consider breaking up your inserts into smaller transactions and see if that helps your speed. I usually make the size of the commit b

Re: Converting iBATIS DAO to Spring DAO in non-web application

2008-01-04 Thread Christopher Lamey
Yea, Spring is usually auto-init'd in a webapp, but for a standalone main() program, you need to init the context yourself. Here's an example with a classpath context: http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#bea ns-factory-instantiation Cheers, Chris On 1/4/08 8

Re: error after adding a field in table

2007-12-26 Thread Christopher Lamey
On 12/26/07 12:24 AM, "Joni Tan" <[EMAIL PROTECTED]> wrote: > > it's "localhost_log.2007-12-26.txt" log file, there is another log file > "localhost_examples_log.2007-12-26.txt" but i think it's just an example log > file and it doesn't have any exception > > hmm, i don't have exception caught l

Re: Best way to insert thousands of records

2007-12-17 Thread Christopher Lamey
Yea, that's immediately what I thought - don't go through Java. Each RDBMS has its own bulk import tool. Oracle has sqlldr, MS SQL Server has bc.exe, postgres has the copy statement. They are much much faster than going the JDBC at all. On 12/17/07 3:14 PM, "Larry Meadors" <[EMAIL PROTECTED]> w

Re: ResultMap groupBy with outer join

2007-12-10 Thread Christopher Lamey
data, but > all the values are null, so iBATIS creates the object that way. > > So yes, your options are a row handler or to post-process the data and > check for empty null values in factId. > > Larry > > > On Dec 10, 2007 11:12 AM, Christopher Lamey <[EMAIL PROTEC

ResultMap groupBy with outer join

2007-12-10 Thread Christopher Lamey
Heya, I essentially have a star schema - a fact table with various detail tables hanging off of it. Each detail table has the fact_id as FK in it. Since not all the details will be filled out, I'm using an outer join to pull them in and the `groupBy="factId"` on the resultMap. The problem I'm s

Re: Ibatis java.sql and log4j

2007-11-30 Thread Christopher Lamey
>From the p6spy website: "P6Log intercepts and logs the database statements of any application that uses JDBC. This application is particularly useful for developers to monitor the SQL statements..." You could also use a profiler like Jprofiler or YourKit, both of which have the ability to log JD

Re: Parsing xml-Definition For Creating SqlMapClient

2007-11-28 Thread Christopher Lamey
The sqlmapclient is thread-safe, you can have multiple threads hit a single sqlmapclient instance with no problems. Read page 58 of the iBATIS PDF doc for details on threading and transactions. On 11/28/07 9:53 AM, "Ralf Assmann" <[EMAIL PROTECTED]> wrote: > > Hi there, > > creating a SqlMapCl

Re: Setting up user id, password for JDBC connection

2007-11-21 Thread Christopher Lamey
Try creating a properties object, setting the name/value pairs on that, and passing that into: public static SqlMapClient buildSqlMapClient(java.io.Reader reader, java.util.Properties props) Cheers, Chris On 11/21/07 2:15 PM, "Ashish Kulkarni" <[EMAIL PROTECTED]> wrote: > Hi > I am working

Re: "encoding not supported"-error using iBATIS with db2 on z/os

2007-11-21 Thread Christopher Lamey
On 11/21/07 1:08 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > In addition, I've worked with DB2 previously on a z/OS system utilizing the > type driver supplied by IBM. The database was expecting EBCDIC and the data I > was working with in the Java world was ASCII coming in from an XML

Re: "encoding not supported"-error using iBATIS with db2 on z/os

2007-11-21 Thread Christopher Lamey
Java there seems not to be an encoding problem. If we are running our > programm on z/os itself, the error also does not occur. > > Ralf > > > Christopher Lamey schrieb: >> It looks like the parameters to the sqlmap are in an encoding that the db >> doesn't suppo

Re: Using Ibatis to stream results

2007-11-21 Thread Christopher Lamey
Hello, I regularly stream out gigs worth of xml without any trouble. Do do this, I use XStream and an object that implements RowHandler. The XStream object is just a member variable of the RowHandler that gets invoked in the handleRow() method. Something like this: public class BigExportRowHan

Re: "encoding not supported"-error using iBATIS with db2 on z/os

2007-11-21 Thread Christopher Lamey
It looks like the parameters to the sqlmap are in an encoding that the db doesn't support. Most likely an extended character in one encoding that isn't valid in another. What encoding is the db using? What encoding are the parameters coming in from? Java will use UTF-8 internally, but if you're

Re: proper use of start/endTransaction()

2007-11-12 Thread Christopher Lamey
Yes. If you call startT, you *always* need to call endT. On 11/12/07 12:23 PM, "Toby Thain" <[EMAIL PROTECTED]> wrote: > > On 12-Nov-07, at 4:21 PM, Christopher Lamey wrote: > >> No, startT makes no claim (and most likely can't make such a claim) >>

Re: proper use of start/endTransaction()

2007-11-12 Thread Christopher Lamey
No, startT makes no claim (and most likely can't make such a claim) to clean up properly if it encounters an exception. On 11/12/07 10:57 AM, "Toby Thain" <[EMAIL PROTECTED]> wrote: > > On 12-Nov-07, at 3:56 PM, Toby Thain wrote: > >> >> On 12-Nov-07, at 3:27 PM, Gwyn Evans wrote: >> >>> No i

Re: AW: unexpected ExceptionInInitializerError

2007-11-09 Thread Christopher Lamey
been deployed..everything's alright, every libs are > the good place.. > > maybe should I try to delete my server configuration and re-configurate a > new one.. > > > > > Christopher Lamey wrote: >> >> Are there ibatis or commons-logging jars an

Re: AW: unexpected ExceptionInInitializerError

2007-11-09 Thread Christopher Lamey
p the code and then deploying to Tomcat? On 11/9/07 9:48 AM, "Jeremy Jardin" <[EMAIL PROTECTED]> wrote: > > all of those jars are in the WEB-INF/lib directory where the have to be > ! > > Ibatis version2.2 ./.. > > > > Christopher Lamey wrote:

Re: AW: unexpected ExceptionInInitializerError

2007-11-09 Thread Christopher Lamey
Can you do these commands in the root of your Tomcat install? find . -name "*commons-logg*jar" fina . -name "*ibatis*jar" So we know what jars are where. Also, what version of ibatis are you using? Cheers, Chris On 11/9/07 3:12 AM, "Jeremy Jardin" <[EMAIL PROTECTED]> wrote: > > Of co

Re: Please Help

2007-10-18 Thread Christopher Lamey
According to the logs you sent, the root cause is this: > java.lang.UnsupportedOperationException: XMLType mapping only supported for > Oracle RDBMS > at > com.cerner.clm.dao.sqlmap.XMLTypeHandlerCallback.getResult(XMLTypeHandlerCallb > ack.java:69) Which I'm guessing is the one from here that

Re: Please Help

2007-10-18 Thread Christopher Lamey
We'll need more information to help. To start with, what server, what is different between local and server runtimes, and what is the error (cut and paste the exception). On 10/18/07 1:57 PM, "Chetan Nayak" <[EMAIL PROTECTED]> wrote: > Hi All , > > Im facing a vert strange problem

Re: [OT] Crosspost: Facebook

2007-10-18 Thread Christopher Lamey
We'll need more information to help. To start with, what server, what is different between local and server runtimes, and what is the error (cut and paste the exception). On 10/18/07 1:44 PM, "Chetan Nayak" <[EMAIL PROTECTED]> wrote: > Hi All , > > Im facing a vert strange problem

Re: how to map huge resultsets?

2007-10-04 Thread Christopher Lamey
om: Jeff Butler [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 04, 2007 14:15 > To: user-java@ibatis.apache.org > Subject: Re: how to map huge resultsets? > > > > Your question is not that confusing. Here are the answers: > > > > 1. No (although the approac

Re: how to map huge resultsets?

2007-10-03 Thread Christopher Lamey
rovider.hasNext()) { > Object item = itemProvider.next(); > process(item); > } > > > > -Original Message- > From: Christopher Lamey [mailto:[EMAIL PROTECTED] > Sent: Wed 10/3/2007 11:55 PM > To: user-java@ibatis.apache.org > Subject: Re: how to map huge resultsets?

Re: how to map huge resultsets?

2007-10-03 Thread Christopher Lamey
uld have explained this in the initial post). > > Robert > > > -Original Message- > From: Christopher Lamey [mailto:[EMAIL PROTECTED] > Sent: Wed 10/3/2007 11:06 PM > To: user-java@ibatis.apache.org > Subject: Re: how to map huge resultsets? > > Hello, &

Re: how to map huge resultsets?

2007-10-03 Thread Christopher Lamey
Hello, You should take a look at the RowHandler interface and the queryWithRowHandler calls in SqlMapClient (page 61 of the pdf). Basically, the RowHandler gets invoked for every row returned rather than mapping all the rows into objects in a collection. Cheers, Chris On 10/3/07 2:37 PM, "[EMA

Re: How to setup JNDI connection in ibatis

2007-09-27 Thread Christopher Lamey
Well, that was easy: http://opensource.atlassian.com/confluence/oss/pages/viewpage.action?pageId= 12582997 On 9/27/07 10:46 AM, "Christopher Lamey" <[EMAIL PROTECTED]> wrote: > How do I use a JNDI DataSource with iBATIS in Tomcat?

Re: How to setup JNDI connection in ibatis

2007-09-27 Thread Christopher Lamey
ROTECTED]> wrote: > Hi > Thank you very much, i changed the parameter in SqlMapConfig.xml to > java:/comp/env/jdbc/AS400B and it works now > I wish this was documented some where in ibatis, or it is and i have never > read it > > Ashish > On 9/27/07, Christopher Lamey

Re: How to setup JNDI connection in ibatis

2007-09-27 Thread Christopher Lamey
he following error > com.ibatis.sqlmap.client.SqlMapException: There was an error configuring > JndiDataSourceDaoTransactionPool. Cause: javax.naming.NameNotFoundException: > Name jdbc is not bound in this Context > > > > > > > > On 9/27/07, Christopher Lamey

Re: How to setup JNDI connection in ibatis

2007-09-27 Thread Christopher Lamey
Hello, You then need to add a ResourceLink either in conf/context.xml or in the webapp's specific context file (if you're using one). I don't know what version of Tomcat you're using, but here are the JNDI docs for 5.5: http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html PS: I thi

Re: ibatis in web application

2007-09-26 Thread Christopher Lamey
Hello, Another route is to configure your database connection information via a DataSource in JNDI. Then your webapp just references the JNDI name (something like java:/comp/env/jdbc/OrderDS) and you can change it as you like outside the webapp. Lookup JNDI DataSource in your weblogic docs to se

Re: Array or List in a ParameterClass

2007-09-25 Thread Christopher Lamey
Hello, Take a look at pages 49 and 50 of the developer's guide. It has examples of what you're trying to do. http://ibatis.apache.org/docs/java/pdf/iBATIS-SqlMaps-2_en.pdf Cheers, Chris On 9/25/07 11:45 AM, "Felipe Maza" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying send a array to ib

Re: TransactionManager thorowing NPE

2007-08-22 Thread Christopher Lamey
elete(SqlMapDaoTemplateWrappe > r.java:41) > 2007-08-21 15:08:26,733 INFO [STDOUT] ... 25 more > 2007-08-21 15:08:26,733 INFO [STDOUT] > gov.gsa.base.exception.DAOException : java.lang.NullPointerException > 2007-08-21 15:08:26,733 INFO [STDOUT] RemoveAttachmentServlet >

Re: TransactionManager thorowing NPE

2007-08-16 Thread Christopher Lamey
Well, that looks ok. Could the transaction be closed or committed early, before the delete? On 8/16/07 6:12 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Pretty straight forwardI assume we are using some default Transaction > Manager.. > > > 2.0//EN" "http://ibatis.apache.org/dtd/s

Re: TransactionManager thorowing NPE

2007-08-15 Thread Christopher Lamey
What does your transaction configuration look like? What transaction manager are you using? On 8/15/07 3:28 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > I am accessing a servlet ( within same app context) with an asynch call from a > struts app. Part of the work is a database call (

Re: Question regarding Spring DAO

2007-08-09 Thread Christopher Lamey
You could try several things: Search your favorite search engine for ³spring ibatis example². Look at the jpetstore example in the Spring (with dependencies) distribution. Read the Spring docs, specifically the section on iBATIS. Search this mail list archive, here's on way to do that: http://

Re: Small problem with date.

2007-08-09 Thread Christopher Lamey
uDate); > > > Every idea is welcome. > Davy > > > > > -Original Message- > From: Christopher Lamey [mailto:[EMAIL PROTECTED] > Sent: woensdag 8 augustus 2007 22:07 > To: user-java@ibatis.apache.org > Subject: Re: Small problem with date. > >

Re: Caching question

2007-08-09 Thread Christopher Lamey
The answer to that question and your previous one are both in the iBATIS SqlMaps PDF on page 42: http://svn.apache.org/repos/asf/ibatis/trunk/java/docs/en/iBATIS-SqlMaps-2_e n.pdf Cheers, topher On 8/9/07 6:26 AM, "avalerio" <[EMAIL PROTECTED]> wrote: > > Thanks for the reply, one more questi

Re: Small problem with date.

2007-08-08 Thread Christopher Lamey
Ah, the joy of legacy systems. If you only have one SQL call that needs this, then I would write a new SELECT element in your sqlmap and call it through the DAO. Something like this in the sqlmap xml, where you reuse the abator result map: select * from beheer where (substr(number,

Re: Caching question

2007-08-08 Thread Christopher Lamey
You can use the: To automatically flush a specific cache when a specific query is run. Cheers, Chris On 8/8/07 1:44 PM, "avalerio1" <[EMAIL PROTECTED]> wrote: > > I've implemented the LRU caching model here's the config: > > > > > Now here's the question: Do I have to flush the cache

Re: public int executeBatch()

2006-06-02 Thread Christopher Lamey
On Thu, 2006-06-01 at 20:45 -0400, rs wrote: > > --- On Thu 06/01, Christopher Lamey < [EMAIL PROTECTED] > wrote: > > FWIW, BatchUpdateException is thrown if there's an exception during a > > batch update and has enough info for me to figure out what broke when. &

Re: public int executeBatch()

2006-06-01 Thread Christopher Lamey
Hello, I use executeBatch quite a bit and would not want to see it break backwards compatibility in a minor version release. FWIW, BatchUpdateException is thrown if there's an exception during a batch update and has enough info for me to figure out what broke when. The getUpdateCounts() method on

RE: Not very useful error message

2006-05-24 Thread Christopher Lamey
Hello, You could do something like this: # find src/xml -name "*.xml" | xargs xmllint > /dev/null xmllint would then write any errors, including the full path and file name, to non-redirected stderr. If you wanted the errors to go to a file: # find src/xml -name "*.xml" | xargs xmllint

Re: One query populating *multiple* lists per object returned

2006-05-12 Thread Christopher Lamey
On Fri, 2006-05-12 at 07:55 -0500, Jeff Butler wrote: > Dogs and Cats is a simple illustration of a larger problem. Think of > a person object with lists of names, addresses, phone numbers, > contacts, etc. > > Does anyone know what Hibernate does with an object graph like this? Hibernate prefe

Re: One query populating *multiple* lists per object returned

2006-05-12 Thread Christopher Lamey
Hello, The SqlMap PDF references a queryForList method in the SqlMapClient that takes a RowHandler and I think that's what you're referencing as well, but I don't see it in the code. Plus the docs say that the RowHandler interface gets passed a List along with an Object, but the RowHandler.java I

Re: two ?s

2006-05-10 Thread Christopher Lamey
Hello, It turns out the groupBy attribute references a property in the resultMap, not a column. Doh! It'd be nice if the iBATIS DataMapper PDF mentioned that on page 29 and used different names in the example on page 28 (rather than 'quarter' for everything). I'd be willing to put together a FA

Re: two ?s

2006-05-10 Thread Christopher Lamey
5:17 -0600, Christopher Lamey wrote: > Hello, > > I have a couple questions: > > 1) Is svn.apache.org, both HTTP and SVN, down? > > 2) Can I use the groupBy attribute of a resultMap to collapse down rows > from a query that uses a bunch of outer joins? For example, I hav

two ?s

2006-05-10 Thread Christopher Lamey
Hello, I have a couple questions: 1) Is svn.apache.org, both HTTP and SVN, down? 2) Can I use the groupBy attribute of a resultMap to collapse down rows from a query that uses a bunch of outer joins? For example, I have a query hits a couple directly associated tables, a join table, and a table

Re: Can I use Hibernate 3.x with latest iBatis DAO?

2006-05-01 Thread Christopher Lamey
Hello, The one and only time I've used Hibernate, I think I saw that message when 3.x code resolved to a 2.x library. Is there a 2.x Hibernate library in your CLASSPATH somewhere before the 3.x library? If you're using JBoss, there's a 2.x hibernate deployer by default in $JBOSS_HOME/server/$SER

Re: iBatis performance FYI

2006-04-28 Thread Christopher Lamey
On Fri, 2006-04-28 at 10:07 -0600, Larry Meadors wrote: > That is not to bad, for reference, I did a jdbc import of 180,674 > records in 186.620s, which is only 1032/second. > > Any tips learned along the way that you'd like to share? Hello all, I would be very interested in hearing anyone's exp

Re: Survey - do you use Abator?

2006-04-05 Thread Christopher Lamey
09:39 -0600, Christopher Lamey wrote: > On Tue, 2006-04-04 at 12:17 +0200, Davide Rogora wrote: > > Hi, > > I'm new to iBATIS and I'm going to start a new application for my > > company using it. > > > > One of my last doubt is: "Should I use Abator

Re: [ABATOR] Source Target?

2006-04-04 Thread Christopher Lamey
On Tue, 2006-04-04 at 09:13 -0700, Bruyn Bill wrote: > BTW, what exactly is that targetProject attribute suppsed to do? Don't > see any reference to that in the doc... targetProject is the target directory/folder for each element. I have my abator.xml setup so my models go in one dir, the sqlma

Re: Survey - do you use Abator?

2006-04-04 Thread Christopher Lamey
On Tue, 2006-04-04 at 12:17 +0200, Davide Rogora wrote: > Hi, > I'm new to iBATIS and I'm going to start a new application for my > company using it. > > One of my last doubt is: "Should I use Abator to generate sqlmap files > and classes?" > I have this doubt because I saw that JPetStore applica

  1   2   >