<<Previous | Next>>
Q. I get an out of memory error while aspecting my application?
The aspect compilation is memory intensive. You can try and increase the maximum heap size parameter. If you are using ant to build, you can set the ANT_OPTS environment variable to -Xmx256M. Try with 256M, 512M. You can also do the aspect compilation in multiple steps.
Q. I get a stackflow error while running the aspected application?
This usually happens if the aspects themselves get aspected. To avoid this problem you can add a !within(aspectname) condition to all your pointcuts. This might also happen if one of the jars on which infraRED (for e.g. InfraUtils.jar) depends on is aspected.
Q. I get an invalid class error while running the aspected application?
This problem occurs if you are trying to aspect a signed jar. The aspected class would violate the hash that was generated for it. One solution is to remove the manifest.mf file from the jar.
Q. How can I check that my required classes have been instrumented?
Open the class file using some decompiler. Look for the string "ajc" in the class file. You should see the Call to net.sf.infrared.aspects.Util class which will start and stop monitoring the method.
Q. Why is InfraRED not showing any performance data on JBoss 3?
JBoss3(<=3.2.x) uses a flat classlaoding model. This causes problems when the instrumented application and infrared gui war are deployed as seperate applications on the same JBoss instance.
The infrared agent classes exist in both the instrumented application and the infrared gui. Due to the flat classloading architecture of JBoss 3, these classes get loaded only once. This might result in InfraRED not collecting performance data unless care is taken.
The easiest workaround to this problem is to deploy the instrumented application first. The other alternative is to write a Classloading Configuration to ensure isolation levels, the details of which are available here.
Q. I am getting JSP compilation errors when I access InfraRED GUI on Weblogic 8.1 SP1?
This is due to a bug in implementation of <bean:define> tag in Weblogic 8.1 SP1. We are working on providing a release to workaround this. Meanwhile, BEA has put out a patch for this bug (CR112484). Also, this is fixed in Weblogic 8.1 SP2. So the recommendation for now is to either move to SP2 or to use the BEA patch.
Q. I am not getting any data on the InfraRED GUI?
This problem can occur if any of the steps are not followed properly. One possible reason can be that filters have not been inserted in web.xml. Check for following filters.
<filter>
<filter-name> MonitorHTTPServletFilter </filter-name>
<filter- class> net.sf.infrared.agent.setup.MonitorHTTPServletFilter </filter- class>
<init-param>
<param-name> monitorFilter </param-name>
<param-value> net.sf.infrared.agent.setup.OnMonitorFilter </param-value>
</init-param>
</filter> <filter> <filter-name> AccessCounterServletFilter </filter-name> <filter-class> net.sf.infrared.agent.setup.AccessCounterServletFilter </filter-class> <init-param>
<param-name> urlIgnoreList </param-name> <param-value> /infrared </param-value> </init-param> </filter>
<filter-mapping> <filter-name> MonitorHTTPServletFilter </filter-name> <url-pattern> /* </url-pattern>
</filter-mapping> <filter-mapping> <filter-name> AccessCounterServletFilter </filter-name> <url-pattern> /* </url-pattern>
</filter-mapping> |
Q. What do I do if I get memory problem while instrumenting my application?
If you get out of memory error while instrumenting your application (this might be the case with huge applications), you can try instrumentation with following options,
1. Allocate larger memory space for ANT tasks. You can do this by giving following command before giving instrumentation command:
$ set ANT_OPTS= -Xmx512m
(You can set this limit based on your RAM size)
2. Try forking the instrumentation process.
a) If you are using Integrate task for instrumentation, the including the following options:
<integrate earFile="${}"
destEarFile = "${}"
infraredHome="${}"
-- other options --
setFork="true"
/>
b) If you are instrumenting your application using a build script, then include following options in the iajc task.
<iajc inpath="${}" destdir="${}"
-- other options --
fork="true"
forkclasspath="${aspectjtools.jar}"/>
<<Previous | Next>>
|