Search code examples
javaweb-servicesapache-axisstack-overflow

Quick fix for org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:467)


I've encountered the following problem with both Axis2 v1.6.1 and v1.6.2, when using lists:

java.lang.StackOverflowError: 
org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:467) 
org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:467)
org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:467)
...

I did a deep search on this and realized that this issue won't be fixed until Apache releases Axis2 v1.6.2. Does anyone have a quick fix for that? Thanks!


Solution

  • The problem is in axis2-adb-1.6.1.jar file. If you cannot wait for 1.6.2 to be released, I've created a new jar, based on v1.6.1, which fixes this problem; the code I used is based on Apache's source code (their trunk), and the bugfix is similar to the fix they did for 1.6.2 (Thanks, Sagara Gunathunga :)). I didn't change anything except from this specific bugfix.

    You can download the jar from here, don't forget to remove the old axis2-adb-1.6.1.jar when you copy this jar into your lib directory.

    Once you did that (and restart your application, of course) - the problem is gone.

    I'll try to keep this jar on my dropbox as long as v1.6.2 is not released.

    Hope all of you java developers will find it useful soon when upgrading to Axis2 1.6.1.