While running JBoss4.2.3 in JRE1.7 environment, web services deployment failed. After debugging further, I figured out this is a known bug in JRE1.7 (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6974244).
The Bug description says,
"In recent JDK7 builds, Throwable has a new method:
public Throwable getSuppressedExceptions()
JAX-WS 2.0 spec 3.7 Service Specific Exception says
For each getter in the exception and its superclasses, a property of the same type and name is added
to the bean. The getCause, getLocalizedMessage and getStackTrace getters from java-
.lang.Throwable and the getClass getter from java.lang.Object are excluded from the list
of getters to be mapped."
This creates a JAXB bean for an exception with a "suppressedExceptions" property. This causes JAXB to fail. JAX-WS spec needs to be updated to add this method to the above list of methods.
I looked at JAX-WS 2.2 spec which has this section updated and it says
"For each getter in the exception and its superclasses, a property of the same type and name is added to
the bean. All the getter methods except getMessage from java.lang.Throwable type hierarchy
are excluded from the list of getters to be mapped."
Looks like in JAX-WS 2.2, the above condition is removed. JBoss 6.0 release notes says it has endorsed JAX-WS2.2 (https://community.jboss.org/wiki/AS600M2ReleaseNotes). After testing the same application in JBoss 6.0, the issue was not observed.
Now the question I have is, is it possible to continue to use JBoss 4.2.3 but to replace the default JAX-WS implementation from 2.0 to 2.2 compliant. Can we control this at each component level. Is there a way to override the default implementation.
If you're a JBoss Enterprise Application Platform customer, get in touch with support, which might provide alternatives / migration plans.
Otherwise, you simply need move to a more recent application server (JBoss AS 7.1 suggested). There's no way of having the JBossWS on AS 4.2.3 work at JAXWS 2.2 compliance level.