XRadar troubleshooting


With the tools

  1. Memory Usage:Findbugs AntTask integration is very cheap. Basicly, it launch an other JVM to execute Findbugs, which basicly means you can allocate 2Go of memory to XRadar running in Audit Mode (ie running the tools for you) and end up having Findbugs failing because of lack of memory !

    To avoid this, we already configured findbugs to use 512Mo, however as this can still be inefficieant, know that you can give more memory to findbugs by simply overriding an Ant Property:

    # For windows
    ANT_OPTS=-Dfindbugs.memory=-Xms1024m -Xmx1024m
    # For *nix
    export ANT_OPTS="-Dfindbugs.memory=-Xms1024m -Xmx1024m"

XRadar itself

XRadar is a XSLT product based, and it uses Ant for the transformation, which means XRadar is basicly a bunch of xsl script triggered by a standalone, java program, Ant pr Maven 2.

In order to run the XRadar properly, you need to set properly your Ant environement.

  1. File encoding: First of all, you should set properly your encoding using the proper jvm parameter:
    # For windows
    # For *nix
    export ANT_OPTS="-Dfile.encoding=UTF-8"

    The file encoding used here is the default for each platform. If you are using a linux box with the ISO-8858-1 encoding or a Windows box with UTF-8 ( is there such a thing ?), please adapt this configuration, and used the proper setting, unless you really to run into a hell of trouble....

  2. Memory usage:As it does a LOT of XSLT transformation, over A LOT of source code, XRadar( as some of the tools it uses) can be quite memory consuming. To avoid a always frustrating "Java.OutOfMemory", you should add as much memory as you can ( 512Mo is, in most of the cases just fine, more will speed up a little bit the process):
    # For windows
    ANT_OPTS=-Dfile.encoding=ISO-8859-1 -Xmx512M
    # For *nix
    export ANT_OPTS="-Dfile.encoding=UTF-8 -Xmx512M"
  3. Endorsed librairies: There used to be problems while running the XRadar in Java 5. This was mainly due to the use of some deprecated xslt or XPath grammar. XRadar runs (almost) fine with JDK 5 now. We say "almost" because if you use it a medium sized or a large project, you'll run into a "No more DTM IDs are available" problem.

    This is a bug in the xalan ship in sun's JDK5. To avoid it, we have placed xalan-2.7.1 with it two pals xercesImpl-2.7.1.jar and the serializer-2.7.1.jar in the XRADAR_HOME/lib/endorsed directory. To override the JDK's default librairies you just have to set the proper parameter:

    # For windows
    ANT_OPTS=-Dfile.encoding=ISO-8859-1 -Djava.endorsed.dirs=XRADAR_HOME/lib/endorsed/ -Xmx512M
    # For *nix
    export ANT_OPTS="-Dfile.encoding=UTF-8 -Djava.endorsed.dirs=XRADAR_HOME/lib/endorsed/ -Xmx512M"
  4. Error messages and debug info:As it is always possible to encounter problem,you should also set the language parameter to be english, as english error messages are always more "googlable", and then ask for help on the forum.
    # For windows
    ANT_OPTS=-Dfile.encoding=ISO-8859-1 -Duser.language=en -Djava.endorsed.dirs=XRADAR_HOME/lib/endorsed/ -Xmx512M
    # For *nix
    export ANT_OPTS="-Dfile.encoding=UTF-8 -Duser.language=en -Djava.endorsed.dirs=XRADAR_HOME/lib/endorsed/ -Xmx512M"

    Also note that if an xslt transformation encounter a problem, Ant may not systematicly crash, so it important, at least the first times, to pay attention to the messages or warning appearing while xradar is running. All of this is advice to help you, but you'll hopefully won't need it !

  5. Configure proxy:If you are using a proxy the DTD URL's won't be accessible. You can add the following properties to your ANT_OPTS environment variable:
    # For windows
    ANT_OPTS=-DproxySet=true -DproxyHost=<your proxy host> -DproxyPort=<your proxy host port>
    # For *nix
    export ANT_OPTS="-DproxySet=true -DproxyHost=<your proxy host> -DproxyPort=<your proxy host port>"