On Aug 9, 2007, at 5:35 AM, Anders 2 wrote:

> Hi all,
> I have a tricky case that someone might shed some light on or give me
> some hints. I have run out of ideas.
> My customer used to load dependency jars through <class-loader/>  
> tag in
> resin.conf.
> Something like this ...
>       <web-app id='/LDAPSoek'
> document-directory='$server.root\war-expand-dir\LDAPSoek'
>                             work-dir='$server.root/work/LDAPSoek'
> temp-dir='$server.root/temp/LDAPSoek'>
>         <class-loader>
>           <simple-loader path="/xxx/ITK-Generellt/itkgenerellt.jar"/>
>           <simple-loader
> path="/xxx/Sqlserver-jdbc/Sqlserver2000/mssqlserver.jar"/>
>           <simple-loader
> path="/xxx/Sqlserver-jdbc/Sqlserver2000/msbase.jar"/>
>           <simple-loader
> path="/xxx/Sqlserver-jdbc/Sqlserver2000/msutil.jar"/>
>           <simple-loader path="/xxx/javamail/javamail-1.2/mail.jar"/>
>           <simple-loader path="/xxx/jaf/jaf-1.0.1/activation.jar"/>
>           <simple-loader path="/xxx/Genbehorkoll/genbehorkoll.jar"/>
>         </class-loader>
>         <access-log path='$server.root/log/ldapsoek/ldapsoek- 
> access.log'
> rollover-period='1M'/>
>         <stdout-log path='$server.root/log/ldapsoek/ldapsoek- 
> stdout.log'
> rollover-period='1M'/>
>         <stderr-log path='$server.root/log/ldapsoek/ldapsoek- 
> stderr.log'
> rollover-period='1M'/>
>       </web-app>
> When they upgraded to 3.0.18 the <class-loader/> tag stopped  
> working, so
> they stayed with earlier versions.
> I was given the mission to find out why. I have found that only one  
> jar
> (itkgenerellt.jar) was not loaded. If I put this jar in WEB_INF\lib or
> extract it to WEB_INF\classes everything works. I have tried to split
> the offending jar into several jars, I have recompiled and  
> repackaged it
> and messed with the MANIFEST but nothing helps. I have tried the
> <library-loader/> and its siblings and I have tried it with several
> versions of Resin, including resin 3.0.23/j2sdk1.4.2_15 (they want to
> stay with jdk1.4), but no.
> There must be something with this jar or rather with its content that
> offends the <class-loader/> so that it skips it. The strange thing is
> that class-loading in WEB_INF\lib is perfectly ok.

WEB-INF/lib uses a <library-loader>, so there shouldn't be any  
difference between a custom library-loader and the default WEB-INF one.

Is the <web-app> in the resin.conf?

The <web-app> in the resin.conf is applied after the WEB-INF/ 
web.xml.  So, if your web.xml contains servlet definitions that are  
loaded early (e.g. servlet-class), before the <web-app> is  
configured, it may just be that the <class-loader> isn't read early  

You can force the classloaders to be applied earlier by wrapping the  
<class-loader> in a <prologue>, like


The prologue phase is a separate configuration phase.  So really, the  
order of configuration is:

prologue (only configures the <prologue> items):
   <web-app> in resin.conf

   <web-app> in resin.conf

-- Scott

> Anyone?
> /Anders Vesterberg
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest

resin-interest mailing list

Reply via email to