RE: <classloader> and web.xml

"Choate, Bryan (IHG)" <[email protected]> Fri, 23 Jun 2006 14:12:33 -0400
Newsgroups gmane.text.xml.resin.user
Message-ID <0FB3527AE8493F44B9A27C1D8E70E46B01FE19CA@hnatld1svrexg04.Amer.Corp.Local>
This is a multi-part message in MIME format.

------_=_NextPart_001_01C696F0.9932A1B6
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

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

________________________________

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

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<!--[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
 namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags" =
name=3D"PostalCode"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"State"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"Street"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"address"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"City" =
downloadurl=3D"http://www.5iamas-microsoft-com:office:smarttags"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
 name=3D"place" downloadurl=3D"http://www.5iantlavalamp.com/"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
p
	{mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Times New Roman";}
span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:Arial;
	color:navy;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>What version of java are you =
running? &nbsp;I
saw a similar issue when running under jdk 1.4, but when I upgraded to =
1.5 this
problem went away.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>-<st1:City w:st=3D"on"><st1:place =
w:st=3D"on">Bryan</st1:place></st1:City></span></font><o:p></o:p></p>

</div>

<div>

<div class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><font =
size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>

<hr size=3D2 width=3D"100%" align=3Dcenter tabindex=3D-1>

</span></font></div>

<p class=3DMsoNormal><b><font size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font =
size=3D2
face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'>
[email protected] [mailto:[email protected]] =
<b><span
style=3D'font-weight:bold'>On Behalf Of </span></b>Geoffrey Wiseman<br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Friday, June 23, =
2006 11:04
AM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> =
[email protected]<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> =
&lt;classloader&gt; and
web.xml</span></font><o:p></o:p></p>

</div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>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:</span></font><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;web-app
id=3D&quot;/context&quot; =
startup-mode=3D&quot;automatic&quot;redeploy-mode=3D&quot;automatic&quot;=
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
document-directory=3D&quot;&lt;project
directory&gt;\src\web&quot;&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;class-loader&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;library-loader
path=3D&quot;&lt;project =
directory&gt;\target\&lt;wardir&gt;\WEB-INF\lib&quot;
/&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;simple-loader
path=3D&quot;&lt;project directory&gt;\target\classes&quot; /&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/class-loader&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;/web-app&gt;</span></font><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>It seems to read the web.xml from the document =
directory but
not find the classes listed therein.&nbsp; So, for instance, there's an =
Acegi
filter listed in the web xml which it can't =
find:</span></font><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>[11:00:08.108] com.caucho.config.LineConfigException:
WEB-INF/web.xml:66: java.lang.ClassNotFoundExc<br>
eption: org.acegisecurity.util.FilterToBeanProxy<br>
[2006/06/23 11:00:08.108] com.caucho.config.LineConfigException:
WEB-INF/web.xml:66: java.lang.Class<br>
NotFoundException: org.acegisecurity.util.FilterToBeanProxy<br>
[2006/06/23 11:00:08.108]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at
com.caucho.config.NodeBuilder.error(NodeBuilder.java:695)</span></font><o=
:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>And yet I can clearly see acegi-security-1.0.0.jar =
present
in the lib directory.</span></font><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>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.&nbsp; Suggestions?&nbsp; Is it that resin is reading the web.xml =
before
it's hooked up to the classloader?&nbsp; Is this a =
bug?</span></font><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>resin 3.0.14 pro, btw; haven't tried upgrading to =
solve the
problem.</span></font><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Thanks,</span></font><o:p></o:p></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; - =
Geoffrey</span></font><o:p></o:p></p>

</div>

<div style=3D'border:none;border-left:solid #67121F 1.0pt;padding:0in =
0in 0in 0in'>

<p style=3D'margin-left:6.75pt'><b><font size=3D1 color=3D"#67121f" =
face=3DArial><span
style=3D'font-size:9.0pt;font-family:Arial;color:#67121F;font-weight:bold=
'>Geoffrey
Wiseman<br>
direct: 416.646.7124<o:p></o:p></span></font></b></p>

<p style=3D'margin-left:6.75pt'><font size=3D1 color=3D"#848589" =
face=3DArial><span
style=3D'font-size:9.0pt;font-family:Arial;color:#848589'>main: =
416.646.7000 <br>
fax: 416.646.7050 <o:p></o:p></span></font></p>

<p style=3D'margin-left:6.75pt'><font size=3D1 color=3D"#848589" =
face=3DArial><span
style=3D'font-size:9.0pt;font-family:Arial;color:#848589'>Exchange =
Solutions Inc.<br>
<st1:Street w:st=3D"on"><st1:address w:st=3D"on">250 Yonge =
Street</st1:address></st1:Street>,
18th Floor<br>
<st1:place w:st=3D"on"><st1:City w:st=3D"on">Toronto</st1:City>, =
<st1:State w:st=3D"on">ON</st1:State>
 <st1:PostalCode w:st=3D"on">M5B 2L7</st1:PostalCode></st1:place><br>
www.exchangesolutions.com<o:p></o:p></span></font></p>

</div>

<div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>&nbsp;<o:p></o:p></span></font></p>

</div>

</div>

</body>

</html>

------_=_NextPart_001_01C696F0.9932A1B6--