tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Farrow" <marc.far...@gmail.com>
Subject Re: using digester from within a servlet
Date Mon, 24 Apr 2006 03:15:42 GMT
I have no knowledge of digesters, but if you are wanting Tomcat (the engine
itself) to use a class, then it has to be in the common/lib folder and not
deployed with the webapp.   Not sure if this is the direction you want to go
or not.

hth


On 4/23/06, Christopher Piggott <chrisp@rochester.rr.com> wrote:
>
>
> Hi,
>
> My goal is to use digester within a servlet, to parse a configuration
> file.
> When running within the servlet context digester is unable to find the
> classes specified by my rules.  For example, I have this set of rules to
> process an element <xdb-config> which occurs within a <config> element:
>
>   digester.addObjectCreate("config/xdb-config", XdbConfig.class);
>   digester.addSetProperties("config/xdb-config", "database-name",
> "databaseName");
>   digester.addSetNext("config/xdb-config", "addXdbConfig", "XdbConfig");
>
> What I get is this:
>
> Apr 23, 2006 10:21:29 PM org.apache.commons.digester.CallMethodRule
> setDigester
> SEVERE: (CallMethodRule) Cannot load class XdbConfig
> java.lang.ClassNotFoundException: XdbConfig
>
>
> I get this other places as well.  One of the things I find odd is that
> this
> error occurs after the above one in the error log:
>
> Apr 23, 2006 10:21:29 PM org.apache.commons.digester.CallMethodRule
> setDigester
> SEVERE: (CallMethodRule) Cannot load class Config
> java.lang.ClassNotFoundException: Config
>
>
> Basically, the class loader seems to be able to load my classes from
> within
> my own classes, but NOT from the digester.  What I don't understand is how
> that's possible when the required classes are clearly within the
> classpath;
> I upload them to tomcat as a .war and they are all exploded into
> WEB-INF/classes.  I can't see how this could not be in the classpath and
> therefore not found by the digester.
>
> --Chris
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


--
Marc Farrow
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message