<classloader> and web.xml
"Geoffrey Wiseman" <[email protected]> Fri, 23 Jun 2006 11:03:41 -0400
| Newsgroups | gmane.text.xml.resin.user |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
------_=_NextPart_001_01C696D6.36B63E5E
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
I've been doing a little experimentation with setting up Resin so that
it can read the HTML and web.xml from the project source but get the
libraries and classes from Maven; I tried something like this:
=20
<web-app id=3D"/context"
startup-mode=3D"automatic"redeploy-mode=3D"automatic"
document-directory=3D"<project directory>\src\web">
<class-loader>
<library-loader path=3D"<project
directory>\target\<wardir>\WEB-INF\lib" />
<simple-loader path=3D"<project directory>\target\classes" />
</class-loader>
</web-app>
It seems to read the web.xml from the document directory but not find
the classes listed therein. So, for instance, there's an Acegi filter
listed in the web xml which it can't find:
[11:00:08.108] com.caucho.config.LineConfigException:
WEB-INF/web.xml:66: java.lang.ClassNotFoundExc
eption: org.acegisecurity.util.FilterToBeanProxy
[2006/06/23 11:00:08.108] com.caucho.config.LineConfigException:
WEB-INF/web.xml:66: java.lang.Class
NotFoundException: org.acegisecurity.util.FilterToBeanProxy
[2006/06/23 11:00:08.108] at
com.caucho.config.NodeBuilder.error(NodeBuilder.java:695)
=20
And yet I can clearly see acegi-security-1.0.0.jar present in the lib
directory.
=20
Turning the logs up to 'finest' doesn't seem to help -- I don't get any
more information that'd help me find out why it can't find the class.
Suggestions? Is it that resin is reading the web.xml before it's hooked
up to the classloader? Is this a bug?
=20
resin 3.0.14 pro, btw; haven't tried upgrading to solve the problem.
=20
Thanks,
=20
- Geoffrey
Geoffrey Wiseman
direct: 416.646.7124
main: 416.646.7000=20
fax: 416.646.7050=20
Exchange Solutions Inc.
250 Yonge Street, 18th Floor
Toronto, ON M5B 2L7
www.exchangesolutions.com
=20
------_=_NextPart_001_01C696D6.36B63E5E
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2900.2873" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D686303413-23062006><FONT face=3DArial size=3D2>I've =
been doing a=20
little experimentation with setting up Resin so that it can read the =
HTML and=20
web.xml from the project source but get the libraries and classes from =
Maven; I=20
tried something like this:</FONT></SPAN></DIV>
<DIV><SPAN class=3D686303413-23062006><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D686303413-23062006><FONT face=3DArial=20
size=3D2> <web-app id=3D"/context"=20
startup-mode=3D"automatic"redeploy-mode=3D"automatic"<BR> &nbs=
p; =20
document-directory=3D"<project=20
directory>\src\web"><BR> =
<class-loader><BR> &=
nbsp;=20
<library-loader path=3D"<project=20
directory>\target\<wardir>\WEB-INF\lib"=20
/><BR> =20
<simple-loader path=3D"<project directory>\target\classes"=20
/><BR> =20
</class-loader><BR> =20
</web-app><BR></FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D686303413-23062006>It =
seems to read the=20
web.xml from the document directory but not find the classes listed=20
therein. So, for instance, there's an Acegi filter listed in the =
web xml=20
which it can't find:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D686303413-23062006>[11:00:08.108]=20
com.caucho.config.LineConfigException: WEB-INF/web.xml:66:=20
java.lang.ClassNotFoundExc<BR>eption:=20
org.acegisecurity.util.FilterToBeanProxy<BR>[2006/06/23 11:00:08.108]=20
com.caucho.config.LineConfigException: WEB-INF/web.xml:66:=20
java.lang.Class<BR>NotFoundException:=20
org.acegisecurity.util.FilterToBeanProxy<BR>[2006/06/23=20
11:00:08.108] at=20
com.caucho.config.NodeBuilder.error(NodeBuilder.java:695)</SPAN></FONT></=
DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D686303413-23062006></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D686303413-23062006>And =
yet I can=20
clearly see acegi-security-1.0.0.jar present in the lib=20
directory.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D686303413-23062006></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D686303413-23062006>Turning the logs up=20
to 'finest' doesn't seem to help -- I don't get any more information =
that'd help=20
me find out why it can't find the class. Suggestions? Is it =
that=20
resin is reading the web.xml before it's hooked up to the =
classloader? Is=20
this a bug?</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D686303413-23062006></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D686303413-23062006>resin =
3.0.14 pro,=20
btw; haven't tried upgrading to solve the problem.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D686303413-23062006></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D686303413-23062006>Thanks,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D686303413-23062006></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D686303413-23062006> -=20
Geoffrey</SPAN></FONT></DIV>
<DIV style=3D"BORDER-LEFT: #67121f 1px solid">
<P=20
style=3D"FONT-WEIGHT: bold; FONT-SIZE: 12px; MARGIN-LEFT: 9px; COLOR: =
#67121f; FONT-FAMILY: Arial, Helvetica, sans-serif"=20
align=3Dleft>Geoffrey Wiseman<BR>direct: 416.646.7124</P>
<P=20
style=3D"FONT-SIZE: 12px; MARGIN-LEFT: 9px; COLOR: #848589; FONT-FAMILY: =
Arial, Helvetica, sans-serif">main:=20
416.646.7000 <BR>fax: 416.646.7050 </P>
<P=20
style=3D"FONT-SIZE: 12px; MARGIN-LEFT: 9px; COLOR: #848589; FONT-FAMILY: =
Arial, Helvetica, sans-serif">Exchange=20
Solutions Inc.<BR>250 Yonge Street, 18th Floor<BR>Toronto, ON M5B=20
2L7<BR>www.exchangesolutions.com</P></DIV>
<DIV> </DIV></BODY></HTML>
------_=_NextPart_001_01C696D6.36B63E5E--