Re: [aspectwerkz-user] AspectwerkZ Websphere 6.1 problem

akhilesh laddha <[email protected]> Tue, 3 Apr 2007 10:25:56 -0700 (PDT)
Newsgroups gmane.comp.java.aspectwerkz.user
Message-ID <[email protected]>
--0-1828229731-1175621156=:36358
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Target code is not getting instrumented. I am not sure why it was not working.  
  It seems the problem could be class loader relegated.  Because, I ran a demo sample (load time instrumentation), place a demo.jar in application classpath and start Websphere 6.1 server, got these error message on console. Even, I created enhanced.jar and place in application classpath, but got the same error.
  Please do let me know, how this could be fixed
   
    AspectWerkz - INFO - Pre-processor org.codehaus.aspectwerkz.transform.AspectWerk
zPreProcessor loaded and initialized
AW::WARNING - could not load class [DemoAspect] as a resource in loader [com.ibm
.ws.bootstrap.ExtClassLoader@130c130c]
Warning: could not load aspect DemoAspect from com.ibm.ws.bootstrap.ExtClassLoad
er@130c130cdue to: java.io.IOException: Class not found
java.io.IOException: Class not found

   
  Any help is appriciated

   
  Thanks
  Akhilesh
   
  
Jonas Bonér <[email protected]> wrote:

  are you sure that you are instrumenting the target code?
decompile it with JAD or javap

On 4/2/07, akhilesh laddha wrote:
>
> I ran it in precompiled (offline mode) too. Even, it is not working. Details
> are as below mentioned
>
>
> AOP.xml
>
> > "-//AspectWerkz//DTD//EN"
>
> "http://aspectwerkz.codehaus.org/dtd/aspectwerkz2.dtd246">
> 
> 
> 
> name="com.wipro.eprofile.Aspects.Matrics.Aspect">
> 
> 
> com.sample.*.*(..))" />
> > jp)" bind-to="profile" />
> > jp)" bind-to="profile" />
> 
> 

> 
> 
>
> Method signature
>
> /**
> * This aspect advice will be added just before any WebTier method call
> */
> public void startWebTier(StaticJoinPoint jp) throws EProfileException
> {
> super.start(jp);
> }
> /**
> * This aspect advice will be added just after the last WebTier method
> call
> */
> public void endWebTier(StaticJoinPoint jp) throws EProfileException
> {
> super.end(jp);
> }
>
> Target Application package structure
>
> Any help is appriciated
>
>
> .
> 岸岸com
> 弩岸岸岸sample
> 岫 EProfileSampleServlet.java
> 岫
> 念岸岸岸beans
> 岫 Children.java
> 岫 Family.java
> 岫 FamilyInfo.java
> 岫
> 念岸岸岸database
> 岫 DataTransfer.java
> 岫
> 弩岸岸岸Utils
> Util.java
>
>
> Thanks
> Akhilesh
>
> Jonas Bonè°·r wrote:
> try to precompile/preweave it (offline mode)
>
> On 4/1/07, akhilesh laddha wrote:
> > It would be great if somebody helpe me out.
> >
> > Thanks
> > Akl
> >
> >
> >
> > akhilesh laddha wrote:
> >
> > I configured aspectwerkZ2.0 with Websphere 6.1. Application server started
> > with the log message
> > AspectWerkz - INFO - Pre-processor
> > org.codehaus.aspectwerkz.transform.AspectWerk
> > zPreProcessor loaded and initialized
> >
> > The log message indicates that AspectWerkz loaded and initialized
> properly.
> > To capture profiling metrics of the application, defines point cuts
> > (Runtime/Load time) for the application. And run the target application.
> > However, there were no data captured.
> > It seems AspectWerkz Pre-processor does not work.
> >
> > In Websphere log this message found after deploying aspect rule.
> >
> > Deployer::INFO - deploying aspect
> > [com.wipro.eprofile.Aspects.Matrics.Aspect.WebTierAspect]
> > in class loader
> > [com.ibm.ws.bootstrap.ExtClassLoader@4560456]
> >
> > I made these changes in startServer.bat file of Websphere
> >
> > SET ASPECTWERKZ_VERSION=2.0
> > SET ASPECTWERKZ_HOME=D:\aspectwerkz
> >
> > SET
> >
> ASPECTWERKZ_LIBS=%WAS_CLASSPATH%;%ASPECTWERKZ_HOME%\lib\dom4j-1.4.jar;%ASPECTWERKZ_HOME%\lib\qdox-1.4.jar;%ASPECTWERKZ_HOME%\lib\concurrent-1.3.1.jar;%ASPECTWERKZ_HOME%\lib\trove-1.0.2.jar;%ASPECTWERKZ_HOME%\lib\jrexx-1.1.1.jar;%ASPECTWERKZ_HOME%\lib\aspectwerkz-core-2.0.jar;%ASPECTWERKZ_HOME%\lib\aspectwerkz-extensions-2.0.jar;%ASPECTWERKZ_HOME%\lib\aspectwerkz-2.0.jar;%ASPECTWERKZ_HOME%\lib\aspectwerkz-jdk5-2.0.jar;C:\IBM\WebSphere\AppServer\lib\eProfiler.jar
> >
> > set JAVA_OPTIONS=%JAVA_OPTIONS%
> >
> -javaagent:%ASPECTWERKZ_HOME%\lib\aspectwerkz-jdk5-2.0.jar
> > set JAVA_OPTIONS=%JAVA_OPTIONS%
> > -Daspectwerkz.transform.details=false
> >
> >
> >
> > "%JAVA_HOME%\bin\java" %JAVA_OPTIONS% -cp %ASPECTWERKZ_LIBS%
> >
> -Djavax.management.builder.initial=com.ibm.ws.management.PlatformMBeanServerBuilder
> >
> -Dcom.sun.management.config.file=C:\IBM\WebSphere\AppServer\java\jre\lib\management/management.properties
> > -Dcmd.properties.file=%TMPJAVAPROPFILE% %WAS_TRACE%
> > %WAS_DEBUG% %CONSOLE_ENCODING% "%CLIENTSAS%" "%CLIENTSSL%"
> > %USER_INSTALL_PROP% "-Dwas.install.root=%WAS_HOME%"
> > com.ibm.ws.bootstrap.WSLauncher
> > com.ibm.ws.management.tools.WsServerLauncher
> > "%CONFIG_ROOT%" "%WAS_CELL%" "%WAS_NODE%" %* %WORKSPACE_ROOT_PROP%
> > set RC=%ERRORLEVEL%
> >
> >
> > Any help is appriciated
> >
> >
> > Thanks
> > Akhilesh
> > ________________________________
> > The fish are biting.
> > Get more visitors on your site using Yahoo! Search Marketing.56
> >
> >
> > ________________________________
> > Don't be flakey. Get Yahoo! Mail for Mobile57 and
> > always stay connected58 to friends.
> >
> >
>
>
> --
> Jonas Bonè°·r
>
> http://jonasboner.com248
>
>
>
> ________________________________
> Looking for earth-friendly autos?
> Browse Top Cars by "Green Rating"249 at Yahoo! Autos' Green Center.
>
>


-- 
Jonas Bonér

http://jonasboner.com


 
---------------------------------
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.
--0-1828229731-1175621156=:36358
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Target code is not getting instrumented. I am not sure why it was not working.&nbsp;&nbsp;<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></div>  <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">It seems the problem could be class loader relegated.&nbsp;&nbsp;Because, I ran a demo sample (load time instrumentation), place a demo.jar in application classpath and start Websphere 6.1 server, got these error message&nbsp;on console.&nbsp;Even, I created enhanced.jar and place in application classpath, but got the same error.<o:p></o:p></SPAN></div>  <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Please do let me know, how this could be fixed</SPAN></div>  <div><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"></SPAN>&nbsp;</div>  <div>  <div>AspectWerkz - INFO - Pre-processor or
 g.codehaus.aspectwerkz.transform.AspectWerk<BR>zPreProcessor loaded and
 initialized<BR>AW::WARNING - could not load class [DemoAspect] as a resource in loader [com.ibm<BR><A href="mailto:.ws.bootstrap.ExtClassLoader@130c130c">.ws.bootstrap.ExtClassLoader@130c130c</A>]<BR>Warning: could not load aspect DemoAspect from com.ibm.ws.bootstrap.ExtClassLoad<BR><A href="mailto:er@130c130cdue">er@130c130cdue</A> to: java.io.IOException: Class not found<BR>java.io.IOException: Class not found<BR></div>  <div>&nbsp;</div>  <div>Any help is appriciated<BR></div>  <div>&nbsp;</div>  <div>Thanks</div>  <div>Akhilesh</div>  <div>&nbsp;</div>  <div><BR><B><I>Jonas Bonér &lt;[email protected]&gt;</I></B> wrote:</div></div>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">are you sure that you are instrumenting the target code?<BR>decompile it with JAD or javap<BR><BR>On 4/2/07, akhilesh laddha <[email protected]
 M>wrote:<BR>&gt;<BR>&gt; I ran it in precompiled (offline mode) too. Even, it is not
 working. Details<BR>&gt; are as below mentioned<BR>&gt;<BR>&gt;<BR>&gt; AOP.xml<BR>&gt;<BR>&gt; &gt; "-//AspectWerkz//DTD//EN"<BR>&gt;<BR>&gt; "http://aspectwerkz.codehaus.org/dtd/aspectwerkz2.dtd246"&gt;<BR>&gt; <ASPECTWERKZ><BR>&gt; <SYSTEM id=samples><BR>&gt; <PACKAGE<BR>&gt; name="com.wipro.eprofile.Aspects.Matrics.Aspect"&gt;<BR>&gt; <ASPECT class=WebTierAspect><BR>&gt; <POINTCUT name="profile" expression="execution(public *<br>> com.sample.*.*(..))" /><BR>&gt; <ADVICE type="before" name="startWebTier(StaticJoinPoint<br>> jp)" bind-to="profile" /><BR>&gt; <ADVICE type="after" name="endWebTier(StaticJoinPoint<br>> jp)" bind-to="profile" /><BR>&gt; </ASPECT><BR>&gt; </PACKAGE><BR>&gt; </SYSTEM><BR>&gt; </ASPECTWERKZ><BR>&gt;<BR>&gt; Method signature<BR>&gt;<BR>&gt; /**<BR>&gt; * This aspect advice will be added just before any WebTier method call<BR>&gt; */<BR>&gt; public void startW
 ebTier(StaticJoinPoint jp) throws EProfileException<BR>&gt; {<BR>&gt;
 super.start(jp);<BR>&gt; }<BR>&gt; /**<BR>&gt; * This aspect advice will be added just after the last WebTier method<BR>&gt; call<BR>&gt; */<BR>&gt; public void endWebTier(StaticJoinPoint jp) throws EProfileException<BR>&gt; {<BR>&gt; super.end(jp);<BR>&gt; }<BR>&gt;<BR>&gt; Target Application package structure<BR>&gt;<BR>&gt; Any help is appriciated<BR>&gt;<BR>&gt;<BR>&gt; .<BR>&gt; 岸岸com<BR>&gt; 弩岸岸岸sample<BR>&gt; 岫 EProfileSampleServlet.java<BR>&gt; 岫<BR>&gt; 念岸岸岸beans<BR>&gt; 岫 Children.java<BR>&gt; 岫 Family.java<BR>&gt; 岫 FamilyInfo.java<BR>&gt; 岫<BR>&gt; 念岸岸岸database<BR>&gt; 岫 DataTransfer.java<BR>&gt; 岫<BR>&gt; 弩岸岸岸Utils<BR>&gt; Util.java<BR>&gt;<BR>&gt;<BR>&gt; Thanks<BR>&gt; Akhilesh<BR>&gt;<BR>&gt; Jonas Bonè°·r <[email protected]>wrote:<BR>&gt; try to precompile/preweave it (offline mode)<BR>&gt;<BR>&gt; On 4/1/07, akhiles
 h laddha wrote:<BR>&gt; &gt; It would be great if somebody helpe me out.<BR>&gt;
 &gt;<BR>&gt; &gt; Thanks<BR>&gt; &gt; Akl<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; akhilesh laddha wrote:<BR>&gt; &gt;<BR>&gt; &gt; I configured aspectwerkZ2.0 with Websphere 6.1. Application server started<BR>&gt; &gt; with the log message<BR>&gt; &gt; AspectWerkz - INFO - Pre-processor<BR>&gt; &gt; org.codehaus.aspectwerkz.transform.AspectWerk<BR>&gt; &gt; zPreProcessor loaded and initialized<BR>&gt; &gt;<BR>&gt; &gt; The log message indicates that AspectWerkz loaded and initialized<BR>&gt; properly.<BR>&gt; &gt; To capture profiling metrics of the application, defines point cuts<BR>&gt; &gt; (Runtime/Load time) for the application. And run the target application.<BR>&gt; &gt; However, there were no data captured.<BR>&gt; &gt; It seems AspectWerkz Pre-processor does not work.<BR>&gt; &gt;<BR>&gt; &gt; In Websphere log this message found after deploying aspect rule.<BR>&gt; 
 &gt;<BR>&gt; &gt; Deployer::INFO - deploying aspect<BR>&gt; &gt;
 [com.wipro.eprofile.Aspects.Matrics.Aspect.WebTierAspect]<BR>&gt; &gt; in class loader<BR>&gt; &gt; [com.ibm.ws.bootstrap.ExtClassLoader@4560456]<BR>&gt; &gt;<BR>&gt; &gt; I made these changes in startServer.bat file of Websphere<BR>&gt; &gt;<BR>&gt; &gt; SET ASPECTWERKZ_VERSION=2.0<BR>&gt; &gt; SET ASPECTWERKZ_HOME=D:\aspectwerkz<BR>&gt; &gt;<BR>&gt; &gt; SET<BR>&gt; &gt;<BR>&gt; ASPECTWERKZ_LIBS=%WAS_CLASSPATH%;%ASPECTWERKZ_HOME%\lib\dom4j-1.4.jar;%ASPECTWERKZ_HOME%\lib\qdox-1.4.jar;%ASPECTWERKZ_HOME%\lib\concurrent-1.3.1.jar;%ASPECTWERKZ_HOME%\lib\trove-1.0.2.jar;%ASPECTWERKZ_HOME%\lib\jrexx-1.1.1.jar;%ASPECTWERKZ_HOME%\lib\aspectwerkz-core-2.0.jar;%ASPECTWERKZ_HOME%\lib\aspectwerkz-extensions-2.0.jar;%ASPECTWERKZ_HOME%\lib\aspectwerkz-2.0.jar;%ASPECTWERKZ_HOME%\lib\aspectwerkz-jdk5-2.0.jar;C:\IBM\WebSphere\AppServer\lib\eProfiler.jar<BR>&gt; &gt;<BR>&gt; &gt; set JAVA_OPTIONS=%JAVA_
 OPTIONS%<BR>&gt; &gt;<BR>&gt;
 -javaagent:%ASPECTWERKZ_HOME%\lib\aspectwerkz-jdk5-2.0.jar<BR>&gt; &gt; set JAVA_OPTIONS=%JAVA_OPTIONS%<BR>&gt; &gt; -Daspectwerkz.transform.details=false<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; "%JAVA_HOME%\bin\java" %JAVA_OPTIONS% -cp %ASPECTWERKZ_LIBS%<BR>&gt; &gt;<BR>&gt; -Djavax.management.builder.initial=com.ibm.ws.management.PlatformMBeanServerBuilder<BR>&gt; &gt;<BR>&gt; -Dcom.sun.management.config.file=C:\IBM\WebSphere\AppServer\java\jre\lib\management/management.properties<BR>&gt; &gt; -Dcmd.properties.file=%TMPJAVAPROPFILE% %WAS_TRACE%<BR>&gt; &gt; %WAS_DEBUG% %CONSOLE_ENCODING% "%CLIENTSAS%" "%CLIENTSSL%"<BR>&gt; &gt; %USER_INSTALL_PROP% "-Dwas.install.root=%WAS_HOME%"<BR>&gt; &gt; com.ibm.ws.bootstrap.WSLauncher<BR>&gt; &gt; com.ibm.ws.management.tools.WsServerLauncher<BR>&gt; &gt; "%CONFIG_ROOT%" "%WAS_CELL%" "%WAS_NODE%" %* %WORKSPACE_ROOT_PROP%<BR>&gt; &gt; s
 et RC=%ERRORLEVEL%<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; Any help is
 appriciated<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; Thanks<BR>&gt; &gt; Akhilesh<BR>&gt; &gt; ________________________________<BR>&gt; &gt; The fish are biting.<BR>&gt; &gt; Get more visitors on your site using Yahoo! Search Marketing.56<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; ________________________________<BR>&gt; &gt; Don't be flakey. Get Yahoo! Mail for Mobile57 and<BR>&gt; &gt; always stay connected58 to friends.<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt;<BR>&gt;<BR>&gt; --<BR>&gt; Jonas Bon谷r<BR>&gt;<BR>&gt; http://jonasboner.com248<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; ________________________________<BR>&gt; Looking for earth-friendly autos?<BR>&gt; Browse Top Cars by "Green Rating"249 at Yahoo! Autos' Green Center.<BR>&gt;<BR>&gt;<BR><BR><BR>-- <BR>Jonas Bonér<BR><BR>http://jonasboner.com<BR></BLOCKQUOTE><BR><p>&#32;

<hr size=1><a href="http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396545367">Food fight?</a> Enjoy some healthy debate<br>in the <a href="http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396545367">Yahoo! Answers Food & Drink Q&A.</a>
--0-1828229731-1175621156=:36358--