axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marepalli, Somesh" <Somesh.Marepa...@ca.com>
Subject Problem with WebappClassLoader
Date Thu, 18 Mar 2004 22:14:02 GMT

Hi All:

   I have a web service running under Tomcat 4.1 and Axis 1.1. It uses
JNI code (.dlls on windows).

   I need to dynamically undeploy and deploy my web service using the
Axis "reloadable" flag setting...

   I am running into some problems when I copy an updated .jar file into
Axis lib folder...the class loader dies...

    On reading Tomcat 4.1 release notes, (pasted below), it talks about
shared classloader etc...
    Can anyone tell me why this happens ? I am unable to understand this
Regards

-Somesh

WebappClassLoader:   Resource '/WEB-INF/lib/trial.jar' was modified;
Date is now

: Thu Mar 18 16:20:55 EST 2004 Was: Thu Mar 18 15:58:55 EST 2004

WebappClassLoader: Lifecycle error : CL stopped

WebappClassLoader: Lifecycle error : CL stopped

WebappClassLoader: Lifecycle error : CL stopped

WebappClassLoader: Lifecycle error : CL stopped

WebappClassLoader: Lifecycle error : CL stopped

=20

Section from Tomcat 4.1 RELEASE NOTES

-------------------------------------
Tomcat 4.1 and JNI Based Applications:
-------------------------------------
=20
Applications that require native libraries must ensure that the
libraries have
been loaded prior to use.  Typically, this is done with a call like:
=20
  static {
    System.loadLibrary("path-to-library-file");
  }
=20
in some class.  However, the application must also ensure that the
library is
not loaded more than once.  If the above code were placed in a class
inside
the web application (i.e. under /WEB-INF/classes or /WEB-INF/lib), and
the
application were reloaded, the loadLibrary() call would be attempted a
second
time.
=20
To avoid this problem, place classes that load native libraries outside
of the
web application, and ensure that the loadLibrary() call is executed only
once
during the lifetime of a particular JVM.

=20

=20

Somesh Marepalli

Software Engineer, CleverPath Analytics Dev

* Desk: +1 216 643-9214

somesh.marepalli@ca.com

=20


------_=_NextPart_001_01C40D34.03298F34
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

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

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
 /* 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:#606420;
	text-decoration:underline;}
pre
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:Arial;
	color:windowtext;
	font-weight:normal;
	font-style:normal;
	text-decoration:none none;}
@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=3D"#606420">

<div class=3DSection1>

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

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp; I have a web service running under =
Tomcat 4.1
and Axis 1.1. It uses JNI code (.dlls on =
windows).<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp; I need to dynamically undeploy and =
deploy my
web service using the Axis &#8220;reloadable&#8221; flag =
setting&#8230;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp; I am running into some problems when I =
copy an
updated .jar file into Axis lib folder&#8230;the class loader =
dies&#8230;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; On reading Tomcat 4.1 release =
notes,
(pasted below), it talks about shared classloader =
etc&#8230;<o:p></o:p></span></font></p>

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

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; Can anyone tell me why this =
happens ? I
am unable to understand this<o:p></o:p></span></font></p>

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

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

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

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

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>WebappClassLoader:&nbsp;&nbsp; Resource
'/WEB-INF/lib/trial.jar' was modified; Date is =
now<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>: Thu Mar 18 16:20:55 EST 2004 Was: Thu Mar 18 =
15:58:55 EST
2004<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>WebappClassLoader: Lifecycle error : CL =
stopped<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>WebappClassLoader: Lifecycle error : CL =
stopped<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>WebappClassLoader: Lifecycle error : CL =
stopped<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>WebappClassLoader: Lifecycle error : CL =
stopped<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>WebappClassLoader: Lifecycle error : CL =
stopped<o:p></o:p></span></font></p>

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

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Section from Tomcat 4.1 RELEASE =
NOTES<o:p></o:p></span></font></p>

<pre><font size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt'>-------------------------------------<o:p></o
:=
p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt'>Tomcat =
4.1 and JNI Based Applications:<o:p></o:p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt'>-------------------------------------<o:p></o
:=
p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre><fo
n=
t
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt'>Applications that require native libraries =
must ensure that the libraries =
have<o:p></o:p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt'>been =
loaded prior to use.&nbsp; Typically, this is done with a call =
like:<o:p></o:p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre><fo
n=
t
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt'>&nbsp; =
static {<o:p></o:p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt'>&nbsp;&nbsp;&nbsp; =
System.loadLibrary(&quot;path-to-library-file&quot;);<o:p></o:p></span><
/=
font></pre><pre><font
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt'>&nbsp; =
}<o:p></o:p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre><fo
n=
t
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt'>in some =
class.&nbsp; However, the application must also ensure that the library
=
is<o:p></o:p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt'>not =
loaded more than once.&nbsp; If the above code were placed in a class =
inside<o:p></o:p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt'>the web =
application (i.e. under /WEB-INF/classes or /WEB-INF/lib), and =
the<o:p></o:p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt'>application were reloaded, the loadLibrary()
=
call would be attempted a =
second<o:p></o:p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt'>time.<o:p></o:p></span></font></pre><pre><fon
t=

size=3D2 face=3D"Courier New"><span =
style=3D'font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></pre><pre><fo
n=
t
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt'>To avoid
=
this problem, place classes that load native libraries outside of =
the<o:p></o:p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt'>web =
application, and ensure that the loadLibrary() call is executed only =
once<o:p></o:p></span></font></pre><pre><font
size=3D2 face=3D"Courier New"><span style=3D'font-size:10.0pt'>during =
the lifetime of a particular JVM.<o:p></o:p></span></font></pre>

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

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

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

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

<p class=3DMsoNormal><font size=3D4 color=3Dgray face=3DWingdings><span
style=3D'font-size:13.5pt;font-family:Wingdings;color:gray'>(</span></fo
n=
t><font
size=3D1><span style=3D'font-size:7.5pt'> </span></font><font size=3D2
=
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>Desk: +1 216 =
643-9214</span></font><o:p></o:p></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblack face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:black'><a =
href=3D"mailto:somesh.marepalli@ca.com">somesh.marepalli@ca.com</a></spa
n=
></font><font
size=3D1><span style=3D'font-size:7.5pt'><o:p></o:p></span></font></p>

<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>

</body>

</html>

------_=_NextPart_001_01C40D34.03298F34--




Mime
View raw message