I have a web app that worked in version 5.5, not working in version 7.0. The
Context.xml is:

 

<Context>

      <Resources
className="com.comsquared.idw.catalina.ext.IDWMFileDirContext" />

      <Loader
loaderClass="com.comsquared.idw.catalina.ext.IDWMClassLoader"/>

      <Resource name="jdbc/ImageDirectorWorkflowDS"
type="javax.sql.DataSource" factory="com.comsquared.idwm.DataSourceFactory"
/>

</Context>

 

IDWMFileDirContext extend FileDirContext, IDWMClassLoader extends
WebappClassLoader. When IDWMFileDirContext is called, it is called with the
default (no arg) constructor, which first calls super();, then imports the
outside the webapp base jar files. That works fine. Then the IDWMClassLoader
is called, which uses the (ClassLoader parent) constructor and again, calls
super(parent). Parent is org.apache.catalina.loader.StandardClassLoader and
seems to be ok.

 

But the next step, loading the DataSource from the DataSourceFactory fails
with a ClassNotFoundException. That class is in the webapps normal
WEB-INF/classes directory.

 

I have been reading to docs to try and figure out how to get both the normal
webapp base directories and the outside the base directories to be found.
The major difference is that the Loader in 5.5 looked like this:

 

                <Loader
loaderClass="com.comsquared.idw.catalina.ext.IDWMClassLoader"
delegate="true"

                                useSystemClassLoaderAsParent="false" />

 

And useSystemClassLoaderAsParent isn't recognized and delegate has no
effect.

 

Any hints as to where to look would be a big help.

Reply via email to