Monday, 19 September 2011

Reseting Jboss

JBoss can get it's knickers in a twist and will throw the following errors in some tests:

java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.httpclient.ChunkedInputStream

The solution is to reset Jboss completely,

  1. Stop Jboss
  2. Navigate to /server/default
  3. Delete data, work and tmp
  4. Restart JBoss
WARNING:
Be careful in Live, if you are using JMX, JMS or JEE. Shutting down Jboss can result in messages being lost. You need to find out how to stop the messaging service whilst JBoss is running, then flush it and then you can perform the procedure above.