RE: <classloader> and web.xml

"Geoffrey Wiseman" <[email protected]> Fri, 23 Jun 2006 16:25:24 -0400
Newsgroups gmane.text.xml.resin.user
Message-ID <[email protected]>
This is a multi-part message in MIME format.

------_=_NextPart_001_01C69703.282D872A
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

1.5.0_06

  _____ =20

From: [email protected]
[mailto:[email protected]] On Behalf Of Choate, Bryan
(IHG)
Sent: June 23, 2006 2:13 PM
To: [email protected]
Subject: RE: <classloader> and web.xml



What version of java are you running?  I saw a similar issue when
running under jdk 1.4, but when I upgraded to 1.5 this problem went
away.

=20

-Bryan

  _____ =20

From: [email protected]
[mailto:[email protected]] On Behalf Of Geoffrey Wiseman
Sent: Friday, June 23, 2006 11:04 AM
To: [email protected]
Subject: <classloader> and web.xml

=20

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_01C69703.282D872A
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns=3D"http://www.w3.org/TR/REC-html40" xmlns:v =3D=20
"urn:schemas-microsoft-com:vml" xmlns:o =3D=20
"urn:schemas-microsoft-com:office:office" xmlns:w =3D=20
"urn:schemas-microsoft-com:office:word" xmlns:st1 =3D=20
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2900.2873" name=3DGENERATOR><!--[if !mso]>
<STYLE>v\:* {
	BEHAVIOR: url(#default#VML)
}
o\:* {
	BEHAVIOR: url(#default#VML)
}
w\:* {
	BEHAVIOR: url(#default#VML)
}
.shape {
	BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]--><o:SmartTagType name=3D"PostalCode"=20
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"></o:SmartTagT=
ype><o:SmartTagType=20
name=3D"State"=20
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"></o:SmartTagT=
ype><o:SmartTagType=20
name=3D"Street"=20
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"></o:SmartTagT=
ype><o:SmartTagType=20
name=3D"address"=20
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"></o:SmartTagT=
ype><o:SmartTagType=20
name=3D"City" =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"=20
downloadurl=3D"http://www.5iamas-microsoft-com:office:smarttags"></o:Smar=
tTagType><o:SmartTagType=20
name=3D"place" =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"=20
downloadurl=3D"http://www.5iantlavalamp.com/"></o:SmartTagType><!--[if =
!mso]>
<STYLE>st1\:* {
	BEHAVIOR: url(#default#ieooui)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
	font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
	COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
	COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
	COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
	COLOR: purple; TEXT-DECORATION: underline
}
P {
	FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: =
"Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle18 {
	COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply
}
DIV.Section1 {
	page: Section1
}
</STYLE>
</HEAD>
<BODY lang=3DEN-US vLink=3Dpurple link=3Dblue>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D747542420-23062006><FONT =
face=3DArial=20
color=3D#0000ff size=3D2>1.5.0_06</FONT></SPAN></DIV><BR>
<DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
<HR tabIndex=3D-1>
<FONT face=3DTahoma size=3D2><B>From:</B> =
[email protected]=20
[mailto:[email protected]] <B>On Behalf Of </B>Choate, =
Bryan=20
(IHG)<BR><B>Sent:</B> June 23, 2006 2:13 PM<BR><B>To:</B>=20
[email protected]<BR><B>Subject:</B> RE: &lt;classloader&gt; and =

web.xml<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=3DSection1>
<P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">What version =
of java=20
are you running? &nbsp;I saw a similar issue when running under jdk 1.4, =
but=20
when I upgraded to 1.5 this problem went =
away.<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<DIV>
<P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">-<st1:City=20
w:st=3D"on"><st1:place=20
w:st=3D"on">Bryan</st1:place></st1:City></SPAN></FONT><o:p></o:p></P></DI=
V>
<DIV>
<DIV class=3DMsoNormal style=3D"TEXT-ALIGN: center" align=3Dcenter><FONT =

face=3D"Times New Roman" size=3D3><SPAN style=3D"FONT-SIZE: 12pt">
<HR tabIndex=3D-1 align=3Dcenter width=3D"100%" SIZE=3D2>
</SPAN></FONT></DIV>
<P class=3DMsoNormal><B><FONT face=3DTahoma size=3D2><SPAN=20
style=3D"FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: =
Tahoma">From:</SPAN></FONT></B><FONT=20
face=3DTahoma size=3D2><SPAN style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Tahoma">=20
[email protected] [mailto:[email protected]] =

<B><SPAN style=3D"FONT-WEIGHT: bold">On Behalf Of </SPAN></B>Geoffrey=20
Wiseman<BR><B><SPAN style=3D"FONT-WEIGHT: bold">Sent:</SPAN></B> Friday, =
June 23,=20
2006 11:04 AM<BR><B><SPAN style=3D"FONT-WEIGHT: bold">To:</SPAN></B>=20
[email protected]<BR><B><SPAN=20
style=3D"FONT-WEIGHT: bold">Subject:</SPAN></B> &lt;classloader&gt; and=20
web.xml</SPAN></FONT><o:p></o:p></P></DIV>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<DIV>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">I've been doing a little=20
experimentation with setting up Resin so that it can read the HTML and =
web.xml=20
from the project source but get the libraries and classes from Maven; I =
tried=20
something like this:</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;web-app id=3D"/context"=20
startup-mode=3D"automatic"redeploy-mode=3D"automatic"<BR>&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;=20
document-directory=3D"&lt;project=20
directory&gt;\src\web"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

&lt;class-loader&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;=20
&lt;library-loader path=3D"&lt;project=20
directory&gt;\target\&lt;wardir&gt;\WEB-INF\lib"=20
/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;simple-loader path=3D"&lt;project directory&gt;\target\classes"=20
/&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;/class-loader&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;/web-app&gt;</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">It seems to read the =
web.xml from=20
the document directory but not find the classes listed therein.&nbsp; =
So, for=20
instance, there's an Acegi filter listed in the web xml which it can't=20
find:</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">[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]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at=20
com.caucho.config.NodeBuilder.error(NodeBuilder.java:695)</SPAN></FONT><o=
:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">And yet I can clearly see=20
acegi-security-1.0.0.jar present in the lib=20
directory.</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Turning the logs up to =
'finest'=20
doesn't seem to help -- I don't get any more information that'd help me =
find out=20
why it can't find the class.&nbsp; Suggestions?&nbsp; Is it that resin =
is=20
reading the web.xml before it's hooked up to the classloader?&nbsp; Is =
this a=20
bug?</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">resin 3.0.14 pro, btw; =
haven't tried=20
upgrading to solve the problem.</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">Thanks,</SPAN></FONT><o:p></o:p></P></DIV>
<DIV>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV>
<DIV>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp; -=20
Geoffrey</SPAN></FONT><o:p></o:p></P></DIV>
<DIV=20
style=3D"BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: =
medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: =
#67121f 1pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">
<P style=3D"MARGIN-LEFT: 6.75pt"><B><FONT face=3DArial color=3D#67121f =
size=3D1><SPAN=20
style=3D"FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: #67121f; FONT-FAMILY: =
Arial">Geoffrey=20
Wiseman<BR>direct: 416.646.7124<o:p></o:p></SPAN></FONT></B></P>
<P style=3D"MARGIN-LEFT: 6.75pt"><FONT face=3DArial color=3D#848589 =
size=3D1><SPAN=20
style=3D"FONT-SIZE: 9pt; COLOR: #848589; FONT-FAMILY: Arial">main: =
416.646.7000=20
<BR>fax: 416.646.7050 <o:p></o:p></SPAN></FONT></P>
<P style=3D"MARGIN-LEFT: 6.75pt"><FONT face=3DArial color=3D#848589 =
size=3D1><SPAN=20
style=3D"FONT-SIZE: 9pt; COLOR: #848589; FONT-FAMILY: Arial">Exchange =
Solutions=20
Inc.<BR><st1:Street w:st=3D"on"><st1:address w:st=3D"on">250 Yonge=20
Street</st1:address></st1:Street>, 18th Floor<BR><st1:place =
w:st=3D"on"><st1:City=20
w:st=3D"on">Toronto</st1:City>, <st1:State w:st=3D"on">ON</st1:State>=20
<st1:PostalCode w:st=3D"on">M5B=20
2L7</st1:PostalCode></st1:place><BR>www.exchangesolutions.com<o:p></o:p><=
/SPAN></FONT></P></DIV>
<DIV>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: =
12pt">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV></DIV></BODY></HTML>

------_=_NextPart_001_01C69703.282D872A--