[aspectwerkz-user] Hot Undeployment on Windows - UnsatisfiedLinkError
"Subhrajyoti Bose (subose)" <[email protected]> Mon, 10 Sep 2007 10:29:11 +0530
| Newsgroups | gmane.comp.java.aspectwerkz.user |
|---|---|
| Message-ID | <14F212591546FF4AB98EBFB4D189F06103943B96@xmb-blr-411.apac.cisco.com> |
------_=_NextPart_001_01C7F367.45B43620
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi
=20
I am using Aspectwerkz-2.0 on Windows. The development environment I am
using is java sdk 1.4.2_15. I have a single aspect in my application
which I have verified is getting deployed and functioning as desired. I
have also verified that aspectwerkz.dll is in the PATH. If I remove it
from PATH, the system cribs. I am running a batch file containing the
following:
=20
@ECHO OFF
set ASPECTWERKZ_VERSION=3D2.0
set JAVA_HOME=3DC:\Java\j2sdk1.4.2_15
set ASPECTWERKZ_HOME=3DC:\MySpace\tools\aspectwerkz-2.0
=20
set CP=3D%CLASSPATH%
IF "%CP%"=3D=3D"" set CP=3D.
=20
@REM Note: you can avoid declaring this since aspectwerkz-x.y.jar comes
with a Manifest.mf Class-Path entry
set
ASPECTWERKZ_LIBS=3D%ASPECTWERKZ_HOME%\lib\dom4j-1.4.jar;%ASPECTWERKZ_HOME=
%
\lib\qdox-1.4.jar;%ASPECTWERKZ_HOME%\lib\concurrent-1.3.1.jar;%ASPECTWER
KZ_HOME%\lib\trove-1.0.2.jar;%ASPECTWERKZ_HOME%\lib\jrexx-1.1.1.jar
=20
@REM -cp
"%JAVA_HOME%\lib\tools.jar;%ASPECTWERKZ_HOME%\lib\aspectwerkz-core-%ASPE
CTWERKZ_VERSION%.jar" org.codehaus.aspectwerkz.hook.ProcessStarter=20
@REM -- Use for Sun HotSpot and IBM JRE --
"%JAVA_COMMAND%" -Xdebug -Xrunaspectwerkz
-Xbootclasspath/a:"%ASPECTWERKZ_HOME%\lib\aspectwerkz-core-%ASPECTWERKZ_
VERSION%.jar;%JAVA_HOME%\lib\tools.jar" -cp
"%CP%;%ASPECTWERKZ_HOME%\lib\aspectwerkz-extensions-%ASPECTWERKZ_VERSION
%.jar;%ASPECTWERKZ_HOME%\lib\aspectwerkz-%ASPECTWERKZ_VERSION%.jar;%ASPE
CTWERKZ_HOME%\lib\aspectwerkz-jdk14-%ASPECTWERKZ_VERSION%.jar;%ASPECTWER
KZ_LIBS%" %* =20
Hot undeploy of this aspect is failing with exception. The trace is as
follows:
=20
C:\MySpace\work\monitor\aw-demo\bin>run exec.ProbeManager
AspectWerkz> initializing .....
AspectWerkz> ..... done.
AspectWerkz - INFO - Pre-processor
org.codehaus.aspectwerkz.transform.AspectWerkzPreProcessor loaded and
initialized
aspect.Aspect
Deployer::INFO - undeploying aspect [aspect.Aspect] from class loader
[sun.misc.Launcher$AppClassLoader@53ba3d]
Exception in thread "main" java.lang.UnsatisfiedLinkError: hotswap
at
org.codehaus.aspectwerkz.extension.hotswap.HotSwapClient.hotswap(Native
Method)
at
org.codehaus.aspectwerkz.extension.hotswap.HotSwapClient.hotswap(HotSwap
Client.java:43)
at
org.codehaus.aspectwerkz.extension.hotswap.HotSwapRedefiner.redefine(Hot
SwapRedefiner.java:32)
at
org.codehaus.aspectwerkz.transform.inlining.deployer.Deployer.redefineIn
itialJoinPoints(Deployer.java:464)
at
org.codehaus.aspectwerkz.transform.inlining.deployer.Deployer.doRedefine
(Deployer.java:428)
at
org.codehaus.aspectwerkz.transform.inlining.deployer.Deployer.redefine(D
eployer.java:416)
at
org.codehaus.aspectwerkz.transform.inlining.deployer.Deployer.undeploy(D
eployer.java:368)
=20
I am not able to trace the reason for the exception. Could it be due to
an old dll file? Or am I missing something in my configuration? If
anybody has faced and resolved such problem, please do reply. Any help
would be appreciated.
=20
Thanks
Subhrajyoti
------_=_NextPart_001_01C7F367.45B43620
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.3157" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D390474709-07092007><FONT face=3DArial=20
size=3D2>Hi</FONT></SPAN></DIV>
<DIV><SPAN class=3D390474709-07092007><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D390474709-07092007><FONT face=3DArial size=3D2>I am =
using=20
Aspectwerkz-2.0 on Windows. The development environment I am using is=20
</FONT></SPAN><SPAN class=3D390474709-07092007><FONT face=3DArial =
size=3D2>java sdk=20
1.4.2_15. I have a single aspect in my application which I have verified =
is=20
getting deployed and functioning as desired. I have also=20
verified that</FONT></SPAN><FONT face=3DArial><FONT size=3D2><SPAN=20
class=3D390474709-07092007> aspectwerkz.dll is in the PATH. If I remove =
it from=20
PATH, the system cribs. I am running a batch file containing the=20
following:</SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN=20
class=3D390474709-07092007></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff size=3D2><SPAN=20
class=3D390474709-07092007>@ECHO OFF<BR>set =
ASPECTWERKZ_VERSION=3D2.0<BR>set=20
JAVA_HOME=3DC:\Java\j2sdk1.4.2_15<BR>set=20
ASPECTWERKZ_HOME=3DC:\MySpace\tools\aspectwerkz-2.0</SPAN></FONT></FONT><=
/DIV>
<DIV><FONT color=3D#0000ff></FONT> </DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff size=3D2><SPAN=20
class=3D390474709-07092007>set CP=3D%CLASSPATH%<BR>IF "%CP%"=3D=3D"" set =
CP=3D.</SPAN></FONT></FONT></DIV>
<DIV><FONT color=3D#0000ff></FONT> </DIV>
<DIV><FONT face=3DArial><FONT color=3D#0000ff size=3D2><SPAN=20
class=3D390474709-07092007>@REM Note: you can avoid declaring this since =
aspectwerkz-x.y.jar comes with a Manifest.mf Class-Path entry<BR>set=20
ASPECTWERKZ_LIBS=3D%ASPECTWERKZ_HOME%\lib\dom4j-1.4.jar;%ASPECTWERKZ_HOME=
%\lib\qdox-1.4.jar;%ASPECTWERKZ_HOME%\lib\concurrent-1.3.1.jar;%ASPECTWER=
KZ_HOME%\lib\trove-1.0.2.jar;%ASPECTWERKZ_HOME%\lib\jrexx-1.1.1.jar</SPAN=
></FONT></FONT></DIV>
<DIV><FONT color=3D#0000ff></FONT> </DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN =
class=3D390474709-07092007><FONT=20
color=3D#0000ff>@REM -cp=20
"%JAVA_HOME%\lib\tools.jar;%ASPECTWERKZ_HOME%\lib\aspectwerkz-core-%ASPEC=
TWERKZ_VERSION%.jar"=20
org.codehaus.aspectwerkz.hook.ProcessStarter <BR>@REM -- Use for Sun =
HotSpot and=20
IBM JRE --<BR>"%JAVA_COMMAND%" -Xdebug -Xrunaspectwerkz=20
-Xbootclasspath/a:"%ASPECTWERKZ_HOME%\lib\aspectwerkz-core-%ASPECTWERKZ_V=
ERSION%.jar;%JAVA_HOME%\lib\tools.jar"=20
-cp=20
"%CP%;%ASPECTWERKZ_HOME%\lib\aspectwerkz-extensions-%ASPECTWERKZ_VERSION%=
.jar;%ASPECTWERKZ_HOME%\lib\aspectwerkz-%ASPECTWERKZ_VERSION%.jar;%ASPECT=
WERKZ_HOME%\lib\aspectwerkz-jdk14-%ASPECTWERKZ_VERSION%.jar;%ASPECTWERKZ_=
LIBS%"=20
%*</FONT> <BR></SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN =
class=3D390474709-07092007>Hot undeploy=20
of this aspect is failing with exception. The trace is as=20
follows:</SPAN></FONT></FONT></DIV>
<DIV><FONT face=3DArial><FONT size=3D2><SPAN=20
class=3D390474709-07092007></SPAN></FONT></FONT> </DIV>
<DIV><FONT face=3DArial><FONT color=3D#ff0000 size=3D2><SPAN=20
class=3D390474709-07092007>C:\MySpace\work\monitor\aw-demo\bin>run=20
exec.ProbeManager<BR>AspectWerkz> initializing =
.....<BR>AspectWerkz> .....=20
done.<BR>AspectWerkz - INFO - Pre-processor=20
org.codehaus.aspectwerkz.transform.AspectWerkzPreProcessor loaded and=20
initialized<BR>aspect.Aspect<BR>Deployer::INFO - undeploying aspect=20
[aspect.Aspect] from class loader=20
[sun.misc.Launcher$AppClassLoader@53ba3d]<BR>Exception in thread "main"=20
java.lang.UnsatisfiedLinkError:=20
hotswap<BR> at=20
org.codehaus.aspectwerkz.extension.hotswap.HotSwapClient.hotswap(Native=20
Method)<BR> at=20
org.codehaus.aspectwerkz.extension.hotswap.HotSwapClient.hotswap(HotSwapC=
lient.java:43)<BR> =20
at=20
org.codehaus.aspectwerkz.extension.hotswap.HotSwapRedefiner.redefine(HotS=
wapRedefiner.java:32)<BR> =20
at=20
org.codehaus.aspectwerkz.transform.inlining.deployer.Deployer.redefineIni=
tialJoinPoints(Deployer.java:464)<BR> =
=20
at=20
org.codehaus.aspectwerkz.transform.inlining.deployer.Deployer.doRedefine(=
Deployer.java:428)<BR> =20
at=20
org.codehaus.aspectwerkz.transform.inlining.deployer.Deployer.redefine(De=
ployer.java:416)<BR> =20
at=20
org.codehaus.aspectwerkz.transform.inlining.deployer.Deployer.undeploy(De=
ployer.java:368)</SPAN></FONT></FONT></DIV>
<DIV><SPAN class=3D390474709-07092007><FONT face=3DArial color=3D#ff0000 =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D390474709-07092007><FONT face=3DArial size=3D2>I am =
not able to=20
trace the reason for the exception. Could it be due to an old dll file? =
Or am I=20
missing something in my configuration? If anybody has faced and =
resolved=20
such problem, please do reply. Any help would be=20
appreciated.</FONT></SPAN></DIV>
<DIV><SPAN class=3D390474709-07092007><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV><SPAN class=3D390474709-07092007>
<DIV><FONT face=3DArial size=3D2></FONT><BR><FONT face=3DArial=20
size=3D2>Thanks</FONT></DIV>
<DIV><SPAN class=3D390474709-07092007><FONT face=3DArial=20
size=3D2>Subhrajyoti</FONT></SPAN></SPAN></DIV></BODY></HTML>
------_=_NextPart_001_01C7F367.45B43620--