about what I know and what interests me

JBOSS Class Cast Exceptoin – Resolution

I came across this ClassCastException when launching an application packaged as an enterprise archive (.ear) on JBOSS 4.2.2.

Without going much into the details of the root cause, here is a way to quickly reconfigure JBOSS to get away.

  • Locate the following files in your JBOSS folder and open them in a text editor.



  • Set the attribute CallByValue to true.

It should look something like this:

<attribute name=”CallByValue”>true</attribute>

  • Save the files and Restart the server.

And…voila! No more ClassCastException. Oh yeah, unless there is one such dynamic class casting error in your application that is!!

Enjoy free JBOSSing 😛

Please use the comments section for any discussions.

2 Responses to “JBOSS Class Cast Exceptoin – Resolution”

  1. vilas says:

    You can try this as well: to ensure that it works in the cluster mode as well

    1. Under deploy directory confirm that the isolated attribute in ear-deployer.xml file is set to “false”.
    2. There is a class loader issue in JBoss 4.2.2.GA which causes problems in running WebTier on JBoss. Please go to serverdefaultdeploy jboss-web.deployerMETA-INF, edit jboss-service.xml file and set UseJBossWebLoader to true.


Please share your thoughts