• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Won't Fix
  • ehcache-core
  • Reporter:
  • October 28, 2010
  • 0
  • Watchers: 0
  • March 24, 2011
  • February 22, 2011


We could catch the IllegalStateException and transform it into a more user-friendly error message, that’s quite straightforward to do.

Since this exception can only be thrown by an overly strict or badly broken transaction manager I think I should include a very explicit error message explaining that the user most probably is using some unsupported TM and maybe include a link to the JTA doc page.

Le 28 oct. 2010 à 10:15, Greg Luck a écrit :



I have changed the list to remove Websphere. We should have a better exception for Websphere.


Ludovic Orban 2010-11-08

Now that I carefully looked at the code I can’t see how we could report a better error message without parsing the exception message reported by Websphere.

Websphere throws this exception when Ehcache tries to enlist its XAResource:

java.lang.IllegalStateException: Illegal attempt to enlist a 2PC XAResource

That is IMHO illegal according to the JTA spec, it should rather throw a javax.transaction.SystemException as IllegalStateException is also used to report an error when a user tries to access an XA resource without starting the trasaction first or when the current transaction is marked for rollback only.

Simply catching IllegalStateException to report that Websphere isn’t supported would hide other important user errors that transaction managers are warning about.

Fiona OShea 2011-02-22

Based on Ludovics comments I don’t think that we can do anything further with this. Re-open if I’m wrong on this.