Hi again, Everyone. Sorry to keep hammering this board, but I'm in unexplored territory. As part of my continuing implementation of the Digester class, I'm now facing a problem to which the answer has been elusive, to say the least.
I'm using an Abstract Factory
pattern to set up my web application. Basically, I have an abstract DaoFactory class which reads an XML file and instantiates the proper concrete DaoFactory (in this case, a MySqlDaoFactory instance).
Now, all is fine on my local machine however, when I run the app in the
Tomcat context on the web, I get the inevitable <i>ClassNotFoundException</i>.
Consider the following a small example of my XML config file:
I have a DispatchServlet which calls DaoFactory.getInstance(). The getInstance() method parses the above XML file and instantiates the proper DaoFactory class. However, the class com.mypackage.MySqlDaoFactory cannot be found. My webapp directory structure is as follows:
webapps/myApp/com/mypackage
All classes are in the above package. Is it something with the Digester? Why can it not find the class? Tomcat is loading myApp fine, so I assume all my classes are loaded. Any ideas? Thanks again for your continued attention!