You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Farzad Kohantorabi <f_...@ebs.ir> on 2004/07/11 15:24:08 UTC
digester
Hi List,
I have following code written to parse a simple xml to my java objects:
Digester digester = new Digester(
SAXParserFactory.newInstance().newSAXParser() );
digester.setValidating( false );
digester.push( rootSection );
digester.addObjectCreate( "*/node", OrderSection.class.getName() );
digester.addSetProperties( "*/node" );
digester.addSetNext( "*/node", "addChild" );
digester.parse( in );
And this code works perfectly but I have problem running it on WebSphere
application server. I have deployed my code on other servers like OC4J
and it works fine. I don't know what goes wrong with WAS. I have to add
that it does not throw any exceptions. It just does not set the the
attributes.
TIA,
Farzad.
Re: digester
Posted by Craig McClanahan <cr...@apache.org>.
Farzad Kohantorabi wrote:
>Hi List,
>
>I have following code written to parse a simple xml to my java objects:
>
>Digester digester = new Digester(
>SAXParserFactory.newInstance().newSAXParser() );
>
>digester.setValidating( false );
>
>digester.push( rootSection );
>
>digester.addObjectCreate( "*/node", OrderSection.class.getName() );
>digester.addSetProperties( "*/node" );
>digester.addSetNext( "*/node", "addChild" );
>
>digester.parse( in );
>
>
>And this code works perfectly but I have problem running it on WebSphere
>application server. I have deployed my code on other servers like OC4J
>and it works fine. I don't know what goes wrong with WAS. I have to add
>that it does not throw any exceptions. It just does not set the the
>attributes.
>
>TIA,
>Farzad.
>
>
>
One possibility is that WAS has a version of Digester already in the
classpath for your application -- possiby a different version than the
one you are using. Try deploying the app without commons-digester.jar
in the /WEB-INF/lib directory and see what happens.
Failing that, you can tune the logging detail level for digester (which
uses commons-logging under the covers) to display detailed information
about what it is actually doing. The logger name to set a debug level
for is "org.apache.commons.digester.Digester" for the basic parsing
messages (which is probably all you'll need).
Craig McClanahan
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org