Reflection Inside Tomcat engine

Discussion in 'Java' started by Claudio!, Feb 8, 2006.

  1. Claudio!

    Claudio! Guest

    Hi!
    I neet do use Digester inside a Servlet to parse an XML file.

    Now, the problem is that Digester use the reflection to create on the
    fly the objects associated to the various entity of the XML file.

    The classes that Digester have to instantiate via reflection are
    developped by me, and (for now) they stay under WEB-INF/classes.

    The problem is that when the parsing start (inside the servlet),
    Digester can't see that classes as the ClassNotFoundException arise.

    Some days ago I've read that the problem is relative to the Tomcat's
    classloader. At that time i put that class in a JAR under WEB-INF/lib
    but this didn't work. So I moved it under WEB-INF/classes, but also
    this seem to not work.

    It works only if i put that class in a JAR under dir. "commons/lib" of
    Tomcat.

    It is normal? I want it under "WEB-INF/classes" if it is possible (the
    deploy of application would be easier)

    I'm using Java 1.4.2 and Tomcat 5.0.30.

    Thank you for any help!!!

    Claudio.
     
    Claudio!, Feb 8, 2006
    #1
    1. Advertising

  2. > It is normal? I want it under "WEB-INF/classes" if it is possible (the
    > deploy of application would be easier)


    Try putting your own commons-digester and related jars also into
    web-inf/lib, then it should work.

    If you refer to tomcat internal classes classloading may be messed up.

    Regards,

    Tobias
     
    Tobias Schierge, Feb 8, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SmViQnVzaGVsbA==?=

    Is ASP Validator Regex Engine Same As VS2003 Find Regex Engine?

    =?Utf-8?B?SmViQnVzaGVsbA==?=, Oct 22, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    741
    =?Utf-8?B?SmViQnVzaGVsbA==?=
    Oct 22, 2005
  2. %=zerointeractive.it%

    [TOMCAT] Tomcat crashes

    %=zerointeractive.it%, Jan 22, 2004, in forum: Java
    Replies:
    1
    Views:
    442
    Erwin Moller
    Jan 22, 2004
  3. NOBODY
    Replies:
    4
    Views:
    457
    NOBODY
    Apr 19, 2006
  4. Replies:
    1
    Views:
    393
    Sybren Stuvel
    Apr 10, 2006
  5. Sasha
    Replies:
    3
    Views:
    621
    Sasha
    May 22, 2007
Loading...

Share This Page