Re: [dbutils]: Using objects as atributes

2005-12-07 Thread David Graham
DbUtils is not intended for complex object-relational mapping. Try Hibernate, you'll like it :-). http://hibernate.org/ David Rafael Alcemar [EMAIL PROTECTED] wrote: Hi people, I wanna know if I can use dbutils in this case: If I have one class Person with this structure:

Re: DBCP - not closing connections?

2005-11-05 Thread David Graham
MIke, You are really doing this the hard way. Since you are using JSP that means you're app is running in a web container. All containers support configuring a DataSource in JNDI and looking it up from there. Tomcat is especially easy to setup. Here are the instructions for Tomcat 5.5 (other

Re: [DBUTILS] integer type not retrieve from the database

2005-11-03 Thread David Graham
Download the latest nightly DbUtils build and give it a try. The code in 1.0 was not very smart about mapping database datatypes to Java datatypes. http://jakarta.apache.org/commons/dbutils/downloads.html David --- Rafael U. C. Afonso [EMAIL PROTECTED] wrote: Hello: Why don't you try use

Re: [dbutil] BasicRowProcessor Question.

2005-09-28 Thread David Graham
There is a bugzilla ticket open for providing this functionality although it does not use updatable ResultSets. David --- Ahmed Mohombe [EMAIL PROTECTED] wrote: Hi, Are there any plans to add to [dbutils] the 'inverse function' for BasicRowProcessor.toBean(java.sql.ResultSet rs,

Re: [DBUtils] QueryRunner.fillStatement is not static

2005-07-07 Thread David Graham
so still allows the method to be subclassed and does not force me to create an instance to use this functionality. Cheers, Elifarley On Wed, 06 Jul 2005 17:36:35 -0700, David Graham wrote: Referencing instance state is not a worthy criteria for making a method static. Changing

Re: [DBUtils] Oracle Row Processor

2005-07-07 Thread David Graham
I'm not quite sure what you mean. Can you be more specific about why the current implementation doesn't work for Oracle? Thanks, David --- Henry Voyer [EMAIL PROTECTED] wrote: Hi everyone Is there a free implementation of an Oracle Row processor ? Where can i find it ? Regards

RE: [DBUtils] Oracle Row Processor

2005-07-07 Thread David Graham
property to Timestamp, and I think you'll find the default implementation works fine. David Regards -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, July 07, 2005 12:37 PM To: Jakarta Commons Users List; [EMAIL PROTECTED] Subject: Re: [DBUtils] Oracle

Re: [DBUtils] QueryRunner.fillStatement is not static

2005-07-06 Thread David Graham
Referencing instance state is not a worthy criteria for making a method static. Changing fillStatement() to static would break the many subclasses that override this method to provide customized behavior. Static methods cannot be overridden. David --- Elifarley [EMAIL PROTECTED] wrote: The

Re: [DBUtils] BeanHandler has problem retrieving Dates ?

2005-07-05 Thread David Graham
It doesn't need to specifically check for Date because the first thing the method does is an instanceof check. So, if your bean property is a java.util.Date and the JDBC driver returns a java.sql.Date or java.sql.Timestamp the property should get set. David --- Henry Voyer [EMAIL PROTECTED]

Re: [DbUtils] Handling null values during an update

2005-06-07 Thread David Graham
In the latest nightly builds, QueryRunner.fillStatement() uses Types.VARCHAR to set columns to NULL: http://jakarta.apache.org/commons/dbutils/xref/org/apache/commons/dbutils/QueryRunner.html#118 If you are using DbUtils 1.0, try a nightly build. If you're already using the latest code and it

Re: [dbUtils] - QueryRunner question

2005-05-13 Thread David Graham
Make sure you are using a java.sql.Date and not a java.util.Date. Some JDBC drivers accept java.util.Date but others only accept java.sql.Date or java.sql.Timestamp. If I remember correctly, the JDBC spec only requires drivers to accept java.sql.Date in PreparedStatement.setObject(). David ---

Re: Overriding a BasicRowProcessor

2005-04-18 Thread David Graham
What do you want to do with timestamps? The bean population code has moved to BeanProcessor in the nightly builds with several protected methods. http://jakarta.apache.org/commons/dbutils/xref/org/apache/commons/dbutils/BeanProcessor.html David --- Randall Kennedy [EMAIL PROTECTED] wrote:

Re: [DBUtils] example usage

2005-03-10 Thread David Graham
I don't know of public projects but there are quite a few people using DbUtils judging from the questions on the mailing list. What specific examples are you looking for? David --- Dipole Moment [EMAIL PROTECTED] wrote: Hi all, Is there any public projects that are making heavy use of

Re: [dbutils] Sending large set of numbers

2005-02-28 Thread David Graham
Possibilities I can think of: 1. SQL statement is too long 2. One of the entries isn't a number 3. Comma in the wrong place 4. The NUMBER column is too small for one of the numbers David --- Norris Shelton [EMAIL PROTECTED] wrote: I have the following query SELECT * FROM foo_vw WHERE sid

Re: [commons-validator] Validator outside of Struts

2005-02-17 Thread David Graham
] at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) 2005-02-17 01:07:12,135 INFO [STDOUT] at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) 2005-02-17 01:07:12,136 INFO [STDOUT] at java.lang.Thread.run(Thread.java:534) David

Re: [commons-validator] Validator outside of Struts

2005-02-16 Thread David Graham
Why are you using org.apache.commons.validator.TestValidator? What is the full stack trace for the exception? David --- Sébastien GALLET [EMAIL PROTECTED] wrote: Hello, I try to use commons validator oustide of struts. I've create a class ValidatorTest with the 2 main following methods :

Re: abandoned connection handling deprecated?

2005-02-10 Thread David Graham
, and to find our pool leak. :) David Graham wrote: The way it was implemented as an inheritance hierarchy was a gross hack that made fixing other problems more difficult so it was deprecated. It won't be removed until a proper replacement implementation is provided. David

Re: abandoned connection handling deprecated?

2005-02-09 Thread David Graham
The way it was implemented as an inheritance hierarchy was a gross hack that made fixing other problems more difficult so it was deprecated. It won't be removed until a proper replacement implementation is provided. David --- Trenton D. Adams [EMAIL PROTECTED] wrote: Is this moved somewhere

Re: [commons-validator] I18n question

2005-02-01 Thread David Graham
applied? I'm not really setup to build the sources...yet. And what about the state of the patch, will it be included in an incomming release of the commons val? thx. Eric. David Graham wrote: Comment 1 in this bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=16920 indicates

Re: [commons-validator] I18n question

2005-01-31 Thread David Graham
Comment 1 in this bug: http://issues.apache.org/bugzilla/show_bug.cgi?id=16920 indicates that fields not defined in a localized formset are validated with the rules from the base formset. So, maybe you need to declare each formset for each language but leave out all of the fields from the french

Re: DBCP: DBCPConnectionProvider in Hibernate

2005-01-26 Thread David Graham
Hibernate has officially deprecated support for DBCP and will remove it in a future release. They suggest using C3P0 or Proxool instead. C3P0 has worked great for me. http://sourceforge.net/projects/c3p0 http://proxool.sourceforge.net/ David --- Jiří Mareš [EMAIL PROTECTED] wrote: Hi,

Re: [dbutils] Inserting Null values with QueryRunner.update()

2005-01-26 Thread David Graham
In DbUtils 1.0 QueryRunner.fillStatement() used Types.OTHER when setting a null value. This bug documents the change to using Types.VARCHAR instead: http://issues.apache.org/bugzilla/show_bug.cgi?id=29212 All of the tested drivers listed in the ticket work with VARCHAR. Download a DbUtils

Re: [dbutils] is there a way to call an oracle packaged procedure?

2005-01-21 Thread David Graham
DbUtils doesn't contain direct support for stored procedures so it's probably easier to deal with them manually. Contributions are always welcome though! David --- Norris Shelton [EMAIL PROTECTED] wrote: I want to call something like this: CallableStatement pstmt = conn.prepareCall({call

Re: [commons-validator] Problems with Javascript mask validation..plz Help!

2005-01-13 Thread David Graham
an invalid password and I don't see a problem with having javascript validations for this. IMO we should remove any restrictions on password validations and just provide some best practice advice. Niall - Original Message - From: David Graham [EMAIL PROTECTED] To: Jakarta

Re: [commons-validator] Problems with Javascript mask validation..plz Help!

2005-01-12 Thread David Graham
Revealing detailed validation algorithms for passwords on the client is a security issue so validator does not allow it by default. Also, you should be able to replace [a-zA-Z_0-9] with \w. David --- Matt Bathje [EMAIL PROTECTED] wrote: Eric Giguere wrote: Hi all I have a problemes with

Re: [DbUtils] documentation update overloading BeanHandler constructor

2004-11-18 Thread David Graham
The reason we made mapColumnsToProperties protected was to allow you to handle the mapping any way you like including removing underscores so I'm not to eager to add a boolean parameter to the constructor. I personally just alias the column names to something reasonable in the sql so I don't have

Re: Statement closing in DbUtils

2004-11-01 Thread David Graham
This was fixed some time ago as you can see in the latest source here: http://jakarta.apache.org/commons/dbutils/xref/org/apache/commons/dbutils/QueryRunner.html#235 The fix is in the nightly builds. Thanks, David --- Alik Eliashberg [EMAIL PROTECTED] wrote: Hello, I just started using

Re: Statement closing in DbUtils

2004-11-01 Thread David Graham
It's been nearly a year since 1.0 was released. I'll work on getting DbUtils 1.1 released relatively soon. David --- Alik Eliashberg [EMAIL PROTECTED] wrote: Ah, got it! Do you know when is the next release of DbUtils (that would incorporate this fix)? Thank you, Alik David Graham

Re: Connection pooling question

2004-10-26 Thread David Graham
This pool absolutely prevents you from writing any sort of multi step transaction. Multiple threads will be corrupting the transaction state by using the same connection at the same time. My advice: use a proper DataSource implementation that actually pools connections. David --- Eduardo José

Re: VALIDATOR commons dynamic referencing in XML

2004-07-22 Thread David Graham
--- John Ferron [EMAIL PROTECTED] wrote: Would you happen to have an example of this so I can look at it since I'm new to the commons api? The Struts FieldChecks class is a good starting point. All it does is wrap various commons validator methods where yours would implement something new.

Re: VALIDATOR commons dynamic referencing in XML

2004-07-21 Thread David Graham
No, validator does not support pulling min/max values from an object. But the nice thing about commons-validator is that it doesn't take much work to write your own reusable validation action that supports your custom use cases. Basically, you just write a validation method that uses var-name

Re: [DBUtils] Setting NULL values [was: SQL Server null]

2004-07-08 Thread David Graham
Thanks for the testing! Which of the 4 columns did you try to insert null into? In my testing, Oracle worked with INTEGER but maybe it was a different driver version. It looks like we'll have to babysit Oracle and use VARCHAR. Please let us know the results of SQL Server and Oracle 10. David

Re: [DbUtils] problem with BeanHandler

2004-07-05 Thread David Graham
Download the latest nightly build and test with that. DbUtils 1.0 shipped with a rather simple bean population implementation that causes this problem. DbUtils 1.1 will ship with a smarter version that should handle numbers correctly. The actual cause of the problem is that Oracle is returning

Re: [DBUtils] SQL Server null - Not implemented (type is java.sql.Types.OTHER)

2004-07-05 Thread David Graham
It would be nice if every driver accepted null in setObject but I don't think that's the case. If we could find a common way to set null parameters in DB2, Oracle, SQL Server, MySQL, and Postgres we could implement fillStatement to use it. Until then, the QueryRunner subclass approach is the

Re: [DBUtils] SQL Server null - Not implemented (type is java.sql.Types.OTHER)

2004-07-05 Thread David Graham
--- Ronald Dauster [EMAIL PROTECTED] wrote: I think every driver will accept stmt.setNull given the correct type as second argument. Based on this assumption, I see three possible ways to go: In theory (i. e. with jdk1.4 and conforming drivers) stmt.setNull(i + 1,

Re: [DBUtils] SQL Server null - Not implemented (type is java.sql.Types.OTHER)

2004-07-05 Thread David Graham
--- Ronald Dauster [EMAIL PROTECTED] wrote: David Graham wrote: --- Ronald Dauster [EMAIL PROTECTED] wrote: [...] As an alternative to trying to guess the correct type, there could be typed null-values that can optionally be used by a client of QueryRunner. Something along

Re: [DbUtils] MySQL rollback problem..

2004-06-23 Thread David Graham
First, your code would be simpler if you did this: Connection conn = dataSource.getConnection(); conn.setAutoCommit(false); QueryRunner run = new QueryRunner(); try { run.update(conn, sqlStatement1); run.update(conn, sqlStatement2); run.update(conn, sqlStatement3); conn.commit();

RE: [DbUtils] MySQL rollback problem..

2004-06-23 Thread David Graham
: The reason I did not do things the way you describe is because I wanted to make sure I rollback in the case of run time exceptions as well. Other then that, I believe the two examples would behave the same. -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent

RE: [DbUtils] ClassCastException

2004-06-22 Thread David Graham
, jim -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 22, 2004 12:49 PM To: Jakarta Commons Users List Subject: Re: [DbUtils] ClassCastException You originally posted this to commons-dev and I replied :-). Here it goes again... What does

Re: Validation on An optional field that if supplied passes a validation

2004-05-26 Thread David Graham
If you're using this from Struts, the FieldChecks methods only run the validation if the value is supplied so using just email will work for optional fields (use required and email for non-optional fields). If you're using this in a non-Struts app you need to front EmailValidator with your own

Re: Validator Question

2004-05-25 Thread David Graham
--- Mike Tedesco [EMAIL PROTECTED] wrote: I was wondering about Pluggable Validators? I want to build into my app using the struts framework my own validator independent of Forms and HTTP (i.e. my own class that can be called from the business layer and all I have to do is supply a bean I

Re: [DBUtils] SqlNullCheckedResultSet not replacing nulls

2004-04-21 Thread David Graham
Your code looks correct. What JDBC driver are you using? The implementation of SqlNullCheckedResultSet is dependent on ResultSet.wasNull() being implemented properly. Of course, it might be a bug in DbUtils but the test cases pass for this class (unless the tests have bugs too :-). Here's the

RE: [DBUtils] SqlNullCheckedResultSet not replacing nulls

2004-04-21 Thread David Graham
to step through the DbUtils code in your debugger to find out exactly why the getNull* methods aren't getting called. David Thanks, jim -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 9:18 AM To: Jakarta Commons Users List Subject: Re

RE: [DBUtils] SqlNullCheckedResultSet not replacing nulls

2004-04-21 Thread David Graham
Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 11:53 AM To: Jakarta Commons Users List Subject: RE: [DBUtils] SqlNullCheckedResultSet not replacing nulls --- Anderson, James H [IT] [EMAIL PROTECTED] wrote: Is there any good doc on Java reflexion

RE: [DBUtils] SqlNullCheckedResultSet not replacing nulls

2004-04-21 Thread David Graham
. The test cases pass and I think I tried this a while back on a postgres db just to be sure. Stepping through it with a debugger will show you exactly why it's failing. David -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 21, 2004 11:53

Re: [DBUtils] newbie qs

2004-04-20 Thread David Graham
--- Philip, Anil [ITS] [EMAIL PROTECTED] wrote: I am simply looking for a library to connect to Oracle, (with connection pooling ability) that is easy to use but performs decently... I was directed to dbutils. There are several OSS Java connection pools available. The Jakarta Commons

Re: [validator] Validating nested beans?

2004-04-08 Thread David Graham
The nested attribute is an interesting idea. Changes were recently checked in that added an extends attribute but I haven't had a chance to look at how they might be related (if at all). Anything we can do to simplify validation configuration is a good thing. Feel free to open a bugzilla

Re: [Validator] How to access the value of a field in the XML

2004-03-30 Thread David Graham
I don't think it's possible to reference the current field value although that might be a nice addition. I've only constructed messages from properties files and hardcoded variables like maxlength. David --- [EMAIL PROTECTED] wrote: Hi I'm trying to access the value of the field I'm

Re: [Validator] How to create messages with more than one placeholder

2004-03-28 Thread David Graham
--- [EMAIL PROTECTED] wrote: Hi I just added the maxLength validator (from Struts) into my validators and am now trying to have a second placeholder value in my error message. My form looks like this: form name=DummyVo field property=name

Re: AW: AW: [Validator] Downloading 1.1

2004-03-28 Thread David Graham
... Regards, Frank -Ursprüngliche Nachricht- Von: David Graham [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 23. März 2004 18:27 An: Jakarta Commons Users List Betreff: Re: AW: [Validator] Downloading 1.1 I don't have the DTD in front me but I don't believe a bundle attribute

Re: [Validator] Validators missing?

2004-03-25 Thread David Graham
Commons Validator really has two distinct components: 1. A configurable (typically xml) validation engine 2. Reusable primitive validation methods It provides no pluggable validator actions for feature 1 but feature 2 allows you to more easily build them. Struts' FieldChecks uses the methods

Re: [Validator] How to create messages with more than one placeholder

2004-03-25 Thread David Graham
I would use the standalone example in cvs to test different scenarios so you isolate errors from your application. That way we can find out if it's a bug in validator or your app. In the past, validator only allowed up to 4 replacement args with arg1, arg2, etc. We changed this to a generic

RE: [Validator] Validators missing?

2004-03-25 Thread David Graham
validator stays out of the validation implementation area because that can be very specific to the application and environment. David Eric -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Donnerstag, 25. März 2004 15:06 To: Jakarta Commons Users List Subject

Re: [Validator] Merging ValidatorResources

2004-03-24 Thread David Graham
--- [EMAIL PROTECTED] wrote: Hi How can I (using the nightly build of 20040323) merge two ValidatorResources? I want to have a static ValidatorResources variable that contains everything, but (as usual) I have two XML files, one with the global validator rules and another one which is

RE: [Validator] Merging ValidatorResources

2004-03-24 Thread David Graham
helpful for those of us without the book ;-). What classes and methods from validator are being used to merge resources? I couldn't find any for resources but you can merge ValidatorResults. David Eric -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Mittwoch

Re: [Validator] Using Struts validators outside of Struts

2004-03-23 Thread David Graham
Are you trying to use these in a webapp? Many Struts validations are simple wrappers around Commons Validator classes/methods. It may be easier and lighter weight to just implement your own pluggable validation methods similar to Struts. David --- [EMAIL PROTECTED] wrote: Hi I'm trying to

RE: [Validator] Using Struts validators outside of Struts

2004-03-23 Thread David Graham
: David Graham [mailto:[EMAIL PROTECTED] Sent: Dienstag, 23. März 2004 14:42 To: Jakarta Commons Users List Subject: Re: [Validator] Using Struts validators outside of Struts Are you trying to use these in a webapp? Many Struts validations are simple wrappers around Commons Validator

RE: [Validator] Using Struts validators outside of Struts

2004-03-23 Thread David Graham
/org/ apache/commons/validator/example/ But I get compilation errors, since The constructor ValidatorResources(InputStream) is undefined. According to the Manifest.mf file in the JAR, I'm using 1.0.2. Isn't this the latest version? Eric -Original Message- From: David Graham

RE: [Validator] Using Struts validators outside of Struts

2004-03-23 Thread David Graham
) at ch.sri.test.validator.ValidateExample.main(ValidateExample.java:106) Looking at what's in the JAR, it seems that TestValidator is missing. Am I using an old example? Eric -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Dienstag, 23. März 2004 16:04 To: Jakarta

Re: AW: [Validator] Downloading 1.1

2004-03-23 Thread David Graham
I don't have the DTD in front me but I don't believe a bundle attribute is defined for either of those elements. I remember seeing a Struts example that used that attribute but it has no effect because commons validator doesn't support it. Check the DTD to make sure though. David --- Otto,

Re: DbUtils classes not being Serializable

2004-03-18 Thread David Graham
Only objects stored in the HttpSession are required to be Serializable. I don't see any reason to store MapListHandlers in the session but the Maps they return could certaily be stored there. A custom Map implementation is returned that allows case insensitive column name lookups. This custom

Re: [DbUtils] 2 Questions

2004-03-18 Thread David Graham
1. Please send the code that calls QueryRunner including any custom ResultSetHandler implementation you're using. 2. Passing an Integer object is only required to work if the column is defined as an INTEGER. Refer to appendix B in the 3.0 JDBC spec for type mapping info. As a last resort, you

Re: [DbUtils] 2 Questions

2004-03-18 Thread David Graham
It's almost always best to post messages to the lists so that the entire community benefits from the conversation. The example on the site doesn't account for empty ResultSets which is probably why you're getting an error. Note that the ArrayHandler class implements the same functionality so

Re: [mapper] Any implementations yet

2004-03-13 Thread David Graham
--- John E. Conlon [EMAIL PROTECTED] wrote: On Fri, 2004-03-12 at 15:50, David Graham wrote: --- John E. Conlon [EMAIL PROTECTED] wrote: On Fri, 2004-03-12 at 11:04, David Graham wrote: --- John E. Conlon [EMAIL PROTECTED] wrote: Mapper looks like a nice solution to debundle

Re: [mapper] Any implementations yet

2004-03-12 Thread David Graham
--- John E. Conlon [EMAIL PROTECTED] wrote: On Fri, 2004-03-12 at 11:04, David Graham wrote: --- John E. Conlon [EMAIL PROTECTED] wrote: Mapper looks like a nice solution to debundle mapping implementations but are there any implementations using Mapper right now. I would like

Re: [Validator] Value being tested as argument for error message

2004-02-25 Thread David Graham
I don't think that's possible as you have to specify the message in validation.xml. David --- [EMAIL PROTECTED] wrote: Hi all, I have an indexed field to validate. Instead of having the name of the field used as an argument of the error message, I want to use the current value

Re: DbUtils bean mapper

2004-02-18 Thread David Graham
--- Bill Culp [EMAIL PROTECTED] wrote: Hi, I have been using DbUtils for some JDBC stuff and I was interested in the toBean() bean mapper to map the resultset. Since I am using the bean mapper in a very simplistic fashion, I decided to extend the bean mapping to make it bidirectional (map

Re: [DBUTILS] How to handle and int

2004-02-07 Thread David Graham
examples on this anywhere? Thanks David Graham wrote: Grab a nightly build and use the BasicColumnProcessor class. This is such a common problem that we should probably release 1.1 soon. David --- Mike Zatko [EMAIL PROTECTED] wrote: Hello, This should be a very simple

Re: Problems with primitives attributes in DBUtils

2004-02-06 Thread David Graham
--- Rafael U. C. Afonso [EMAIL PROTECTED] wrote: snip It works, but I don't like it. It seemed a non elegant solution (Here in Brazil we call it gambiarra ;-)). I think that will better have a tretment for char attributes yet. The entire point of adding the ColumnProcessor interface was

Re: [DBUTILS] How to handle and int

2004-02-06 Thread David Graham
Grab a nightly build and use the BasicColumnProcessor class. This is such a common problem that we should probably release 1.1 soon. David --- Mike Zatko [EMAIL PROTECTED] wrote: Hello, This should be a very simple question. I am pulling in a table in a query that contains a bunch of

Re: Problems with primitives attributes in DBUtils

2004-02-04 Thread David Graham
DbUtils will set numeric fields to 0 (just like JDBC) if their value is null. DbUtils will only call a setter method if the value's Class is compatible with the Class of the setter parameter. For example, if you have: SomeBean.setSomeInteger(int i) but the value returned from rs.getObject()

RE: Validator: Using stand-alone validation fails

2004-01-13 Thread David Graham
just need a class with methods that invoke EmailValidator.validate() and the like and handle error messages. You then configure your methods in XML. The Struts FieldChecks methods are great examples of how to use Commons Validator. David Eric -Original Message- From: David Graham

RE: Validator: Using stand-alone validation fails

2004-01-12 Thread David Graham
org.apache.struts.validator I can see the FieldChecks.class. So why shouldn't I be able to use it? (Sorry if that's a dumb question...) Eric -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Montag, 12. Januar 2004 19:35 To: Jakarta Commons Users List Subject: Re

Re: offtopic: regexp or ORO?

2004-01-06 Thread David Graham
Those benchmarks are in line with some I performed for Validator. Validator uses ORO but when I replaced it with Java 1.4 regexs I got a 2x speed improvement. ORO works well (if not slowly) for Validator. David --- Jason Lea [EMAIL PROTECTED] wrote: Simon Kitching wrote: Hi, I need to

Re: [DbUtils] Using BeanUtils converters

2003-12-30 Thread David Graham
--- Jorge Morales Pou [EMAIL PROTECTED] wrote: Hi David, I have implemented my CustomRowProcessor, and used it in a static variable, as you pointed, and everything works the same, that is, fine. I have finally seen that with this strategy no dependency on the BeaUtils package is

Re: [DbUtils] Using BeanUtils converters

2003-12-29 Thread David Graham
Rather than add the dependency we added the ColumnProcessor interface. See the process() method javadocs here: http://jakarta.apache.org/commons/dbutils/apidocs/org/apache/commons/dbutils/ColumnProcessor.html#process(java.sql.ResultSet,%20int,%20java.lang.Class) You can implement this interface

Re: [DBUtil] setNull cause insert to fail.

2003-12-18 Thread David Graham
--- Erez Nahir [EMAIL PROTECTED] wrote: Hi, I have a code with sql having long, int, String and boolean values. Some of my Strings can be null. When QueryRunner.fillStatement identify null value in the object[] it uses stmt.setNull(Types.OTHER); after the sql is filled with the params,

Re: Validator Documentation

2003-12-16 Thread David Graham
The website is here: http://jakarta.apache.org/commons/validator/ The example program is your best bet for getting commons-validator working outside of Struts. Feel free to submit cvs diff -u formatted patches in a bugzilla ticket for missing docs. David --- Evans, Alan (Sybase) [EMAIL

Re: DBCP DBUtils

2003-12-15 Thread David Graham
--- Mike Zatko [EMAIL PROTECTED] wrote: Thanks! It's all so clear now! Also, I was making a fatal assumption when I was trying to do this before that maybe should be noted. Usually, from what I've seen if you have a column name in a database called LAST_NAME when you make a java bean

Re: [DbUtils] Enhancement request for ResultSetMetadata

2003-12-13 Thread David Graham
QueryRunner can't return the meta data because it closes the ResultSet and PreparedStatement objects after running the query. You can get access to the meta data by implementing a ResultSetHandler and calling rs.getMetaData() in the handle() method. David --- John Zoetebier [EMAIL PROTECTED]

Re: [dbutils] Can someone give example for QueryLoader ?

2003-12-13 Thread David Graham
QueryLoader loads queries once and every subsequent request for them uses the cached copy to avoid IO and object creation. Your data access classes can call QueryLoader.load() to retrieve the query map and use the queries in QueryRunner like this: runner.query(queries.get(findPeople), rsh);

Re: [DBUtils] Any utility method or class to generate primary keys

2003-12-12 Thread David Graham
No, that's outside DbUtils' scope. You might check the SQL project in the sandbox though. http://jakarta.apache.org/commons/sandbox/sql/ David --- Emerson Cargnin [EMAIL PROTECTED] wrote: Is there any utility method or class in DBUtils to generate primary keys? -- Emerson Cargnin

Re: DBCP DBUtils

2003-12-12 Thread David Graham
2. DBUtils - These sound real neat and I'd really like to use them, but I can't find any decent documentation to get a beginner started. The example page (http://jakarta.apache.org/commons/dbutils/examples.html) may be enough to remind a developer how things work, but it's rough for me

Re: [DBUtils] Any utility method or class to generate primary keys

2003-12-12 Thread David Graham
http://cvs.apache.org/builds/jakarta-commons/nightly/commons-sql/ David --- John Zoetebier [EMAIL PROTECTED] wrote: On Wed, 10 Dec 2003 14:16:37 -0800 (PST), David Graham [EMAIL PROTECTED] wrote: No, that's outside DbUtils' scope. You might check the SQL project in the sandbox

Re: [DbUtils] - Constructing QueryRunner Instance using java.sqlConection parameter

2003-12-12 Thread David Graham
If you're using the raw Connection, you have to pass it into QueryRunner.query(). David --- eladio [EMAIL PROTECTED] wrote: The example found in http://jakarta.apache.org/commons/dbutils/examples.html statest that you can configure QueryRunner with a DataSourse as well as a Database

Re: [DbUtils] MapHandler changes field names to lowercase

2003-12-12 Thread David Graham
This is by design. Some databases store names in all lowercase, others in all uppercase. MapHandler uses a special Map implementation that stores all keys as lowercase strings and performs case insensitive lookups to allow your code to be portable between database implementations. David ---

Re: [DbUtils] close connection in client code ?

2003-12-12 Thread David Graham
--- John Zoetebier [EMAIL PROTECTED] wrote: The web site of DbUtils says: == DbUtils is a small set of classes designed to make working with JDBC easier. JDBC resource cleanup code is mundane, error prone work so these classes abstract out all of the cleanup tasks from your code leaving

Re: {DbUtils] Howto delete a record ?

2003-12-12 Thread David Graham
http://jakarta.apache.org/commons/dbutils/apidocs/org/apache/commons/dbutils/QueryRunner.html#update(java.lang.String) David --- John Zoetebier [EMAIL PROTECTED] wrote: It seems I always have to pass a resulthandler even if I delete a record. For example this code: == try {

Re: [dbutils] ResultSetHandler difficulties

2003-12-05 Thread David Graham
DbUtils can only create objects from classes with a default/no-arg constructor. LabelValueBean in Struts 1.1 does not have a default constructor so you're seeing this error. This has been fixed in the Struts 1.2 development code for some time. David --- Joseph Prosser [EMAIL PROTECTED] wrote:

Re: DbUtils question

2003-12-03 Thread David Graham
--- Emerson Cargnin [EMAIL PROTECTED] wrote: I'm giving my first steps into dbutils, and i'd like to make a question, since the docs are still small: What's the mapping from the db field names and the get/set properties of my bean (the one sent to the sqlrunner). an example : if

Re: DbUtils question

2003-12-03 Thread David Graham
. David David Graham wrote: --- Emerson Cargnin [EMAIL PROTECTED] wrote: I'm giving my first steps into dbutils, and i'd like to make a question, since the docs are still small: What's the mapping from the db field names and the get/set properties of my bean (the one sent

Re: DbUtils question

2003-12-03 Thread David Graham
Try BigInteger. I think the problem you're experienceing is what caused other people to suggest smarter bean handling for 1.1. You might try a 1.1 nightly build to see if that works. David --- Emerson Cargnin [EMAIL PROTECTED] wrote: forgot to insert the sql :) David Graham wrote

Re: Commons-dbutils: Setter for Oracle DB Table of type NUMBER isn't called

2003-11-27 Thread David Graham
--- José_Fortunato_H._Tomás [EMAIL PROTECTED] wrote: I have the following problem: Bean setter for an Oracle DB table's collumn of type NUMBER isn't called. To parcially solve I had to use to_char SQL directive: --- QueryRunner run = new QueryRunner(

Re: Validator Exception

2003-11-11 Thread David Graham
--- Srinivas Gunturu [EMAIL PROTECTED] wrote: Hi All, I am using commons validator and struts. The validation works fine within struts. However, I have a business need to re-use validation outside struts. I am trying to invoke validator with following code. However, I am getting an

[announcement] DbUtils Promotion to Common Proper Completed

2003-11-02 Thread David Graham
Commons DbUtils cvs tree is now under jakarta-commons instead of jakarta-commons-sandbox. Please update your local checkouts accordingly. More info on DbUtils can be found here: http://jakarta.apache.org/commons/dbutils/ David __ Do you Yahoo!? Exclusive Video

Re: [BEANUTILS] DynaBeans as DTOs used with JSTL?

2003-10-28 Thread David Graham
--- Craig R. McClanahan [EMAIL PROTECTED] wrote: otisg wrote: Hello, I am trying to come up with a simple and flexible solution for implementing DTOs and I am considering DynaBeans in order to dynamically create JavaBeans that could play the DTO role, instead of creating a number of

Re: DBCP:

2003-10-24 Thread David Graham
You shouldn't configure a DataSource in Struts. Instead set it up in Tomcat and look up the DataSource with JNDI. Here's a howto for Tomcat: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html David --- Marius Seiceanu [EMAIL PROTECTED] wrote: Hello, On

Re: Validator framework is adding all JavaScript in each form

2003-10-03 Thread David Graham
This question should be asked on struts-user. The validator always prints all of the javascript unless you use html:javscript staticJavascript=false / David --- Joshi, Sachin (MED) [EMAIL PROTECTED] wrote: Hi Everyone, I am using validator framework client side validation. I observed one

Re: [lang][codec] DigestUtils?

2003-10-01 Thread David Graham
--- Tim O'Brien [EMAIL PROTECTED] wrote: On Wed, 1 Oct 2003, Henri Yandell wrote: I've got such a thing myself: http://www.osjava.org/genjava-core/apidocs/com/generationjava/security/Securer.html and do believe it's a good thing. However it's not within Lang's scope. Codec

Re: [validator] validator dtd or schema

2003-09-10 Thread David Graham
--- Qin Ding [EMAIL PROTECTED] wrote: Here is my goal: validation.xml contains all the user-defined the validation requirements for each bean and every fields for a given bean. In a validation report, I need to list the requirements and the validation results. To do that, I am thinking to

  1   2   >