Re: Parse exceptions on DOCTYPE after upgrading digester jar file

2005-06-10 Thread Reid Pinchback
Suggested experiment: Put a copy of the tiles DTD on your drive. Edit the XML file you were digesting to change the system id (the http url), and replace it with the path to the file on your system. If the problem goes away then it means you got a less-than-useful message disguising the real

Re: [Digester] Problem with XML rule definiton.

2005-03-30 Thread Reid Pinchback
It sounds like one of two things: 1) in the jar'd configuration something is missing from the classpath 2) in the jar'd configuration you aren't using the same type of classloaders as you are in the non-jar'd configuration (e.g. not just jar vs non-jar, but jar-in-webapp vs

Re: [Digester] Problems parsing a file

2004-12-28 Thread Reid Pinchback
Are you really sure that both logs are from an attempt to process the same file? They don't look like they correspond at all. Sounds silly, but is one of these the wrong log? Was wondering if maybe one was actually an old log, not one created as a result of whatever you were trying to test.

Re: [Digester] Is Digester.parse Thread Safe ??

2004-12-27 Thread Reid Pinchback
I'm pretty sure that the XML parsing activity is not thread-safe. Nothing to do with the Digester code, I just remember reading cautions with parsers like Xerces that they aren't threadsafe. Practically I don't think it would make sense for a digester to be threadsafe. A digester is an

Re: [digester] Setting same object within parent

2004-11-09 Thread Reid Pinchback
The class below should get you output like: adamOrEve name=bob adamOrEve #children=2 adamOrEve first child name=joe adamOrEve second child name=sue import org.apache.commons.digester.*; import java.io.*; import java.util.*; public class ParentExample { public static

Re: [digester] Books/examples?

2004-11-09 Thread Reid Pinchback
I haven't seen a book out there with really significant Digester coverage, typically just some brief mentions and urgings that you use it. I've been pulling together some notes for a book over the last several months, but lately contractor life has been intruding. Not sure how much demand there

Re: [digester] Key/Value setting (oops, forgot subject heading)

2004-11-09 Thread Reid Pinchback
You were close. You lost track of the fact that there is a parameter stack and a digester stack, and you need to make sure that put is called on the correct object. import org.apache.commons.digester.*; import java.io.*; import java.util.*; public class PersonExample2 { public static

Re: [digester] ref another part of xml

2004-11-09 Thread Reid Pinchback
I've run into this one before. It is relatively easy as long as you are willing to make a simplifying assumption: a reference can only happen AFTER the real thing, not before it. That way you will always have the real thing recorded for lookup when you hit the reference. Things are tougher if

RE: [DBCP] per-user pooling with Oracle JDBC thin driver

2004-10-20 Thread Reid Pinchback
Last I looked (a couple of years ago), Oracle drivers maintained an open stream connection of some sort for clobs, maybe the commit causes the driver to close such streams? You could test that by writing code directly against the Oracle driver, e.g. first getting a reference to a CLOB, doing a

Re: Digester trimming whitespaces

2004-10-02 Thread Reid Pinchback
Not 100% certain about this, but just did a quick pass through the Digester source. There is a ignorableWhitespace callback in the Digester class that currently doesn't do anything. Maybe it needs to be checking the configuration of the parser to decide if it should be tacking on the whitespace

RE: Property not being set [Digester]

2004-09-09 Thread Reid Pinchback
I believe the issue may be that the property isn't recognized if the getter and setter have a different type. You are ok if there is no getter, but not if the getter is of a different type. You showed your setFoo, but not the getFoo. Does getFoo return a String, or a Foo? I suspect the latter.

RE: Property not being set [Digester]

2004-09-09 Thread Reid Pinchback
Yup, figured that is what it was. Beanutils basically just extends what you get from the javabeans api, and it depends not just on naming conventions, but also on types. The easy solution is to split the functionality into two pieces: private String fooText; public String getFooText() {

RE: Property not being set [Digester]

2004-09-09 Thread Reid Pinchback
Almost forgot, there is a way to both avoid changing the XML and avoid changing the code. Use a SetPropertiesRule and specify the mapping of the attribute name to a property name. Digester d=new Digester(); // set rules as usual, and also Rule spr=new SetPropertiesRule(foo,fooText);

Re: [Digester]how to debug in degister

2004-09-07 Thread Reid Pinchback
Just to add my two cents to the other responses, Digester only uses two logging categories, ...Digester and ...Digester.sax. That means that you can't use the usual Log4J config hacks of tweaking category priorities to reduce noise. You'll want to make effective use of all the Log4J options,