Monday, April 16, 2012

Troubleshooting with JBoss 7

Recently I coming across a lot of configurations that are required for new servers like JBoss 6 & 7. So I thought of jotting them at a single place. I may be mentioning them in brief sometimes and sometimes I would provide as much detail as I can.

  • JBoss & Cookie Expiry : With JBoss 6 and 7, cookies by default specify the expiration time of cookie as "Max-Age" header attribute instead of "Expires". I have written a detail about this here.
  • Random number generation and server start up is slow on Unix platforms for some of the servers. This is because of /dev/random is used in Unix platforms for random number generation. I have added a detail entry explaining the problem and solution here.
  • JBoss 7 AS, has modular class loading. It provides true application isolation, hiding server implementation classes from application and only loading the classes your application needs. Modules, packaged as collections of classes, are peers that remain isolated unless explicitly defined as a dependency of another module. These visibility rules  can be customized. 

    Due to this design, JBoss modules does not load everything from rt.jar and many other system jars by default. As a result you may get ClassNotFoundException or NoClassDefFounfError for a lot of classes. Read here for solution and workarounds available for this.
  • When running Jsafe library on JBoss, if you get error like java.lang.NoClassDefFoundError put the jsafe (CryptoJ) jars to <JAVA_HOME>/jre/lib/ext directory. This mostly occurs on Unix platforms.
  • In JBoss version 7 or above if open office is not working start JBoss with flag -Djava.ext.dirs=<jboss-deployment-dir>/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/oosdk/:<java-home>/lib/ext/ .

I will keep updating this space as and when i will find more.


  1. Have you really been able to start Jboss 7.1.x with JsafeJC3 lib in /jre/lib/ext.

    I've juste trr=ied ans it faile :

    Calling "C:\jboss-as-7.1.1.Final\bin\standalone.conf.bat"

    JBoss Bootstrap Environment

    JBOSS_HOME: C:\jboss-as-7.1.1.Final

    JAVA: C:\Program Files\Java\jdk1.6.0_45\bin\java

    JAVA_OPTS: -XX:+TieredCompilation -Xms64M -Xmx51
    2M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000
    rver.gcInterval=3600000 -Dorg.jboss.resolver.war
    ning=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.server.default.c


    Exception in thread "main" java.lang.ExceptionInInitializerError
    Caused by: java.lang.SecurityException: cannot verify signature block file META-INF/JSAFEJCE
    at java.util.jar.JarVerifier.processEntry(
    at java.util.jar.JarVerifier.update(
    at java.util.jar.JarFile.initializeVerifier(
    at java.util.jar.JarFile.getInputStream(
    at org.jboss.modules.Main.(
    Could not find the main class: org.jboss.modules.Main. Program will exit.

  2. We have tried this with CryptoJ6.0 jars which are shipped with ColdFusion and JBoss comes up and works well.



You can subscribe to the comments by licking on "Subscribe by email".