Wow, 9+ years old AS
Dear Vivek, without any further details, it is impossible to tell whether it's your application's fault or the JBoss AS fault.
Both is very well possible, especially given the amount of remotely exploitable vulnerabilities your JBoss 4.2.1.GA probably contains.
Could you try with an AS from this decade, e.g. AS7 or WildFly, or is your app JBoss 4 dependant?