On 10/17/05, Konstantin Priblouda <[EMAIL PROTECTED]> wrote:

> It's not your bean, what gets loaded through
> hibernate.
> It's dynamic proxy that mimics its behaviour, and this
>
> proxy is created  at the runtime with byte code
> manipulation.  Maybe there is a bit too much
> manipulation for betwixt ( bean utils )  - so it just
> freaks out...

I don't think that this is proxy issue, after all there is no proxy
involved in the stracktrace (usually this would be shown with a proxy$
entry) :

java.lang.UnsupportedOperationException
at org.hibernate.util.IdentityMap.keySet(IdentityMap.java:162)
at org.hibernate.stat.SessionStatisticsImpl.getEntityCount(
SessionStatisticsImpl.java:21)
at org.hibernate.stat.SessionStatisticsImpl.toString(
SessionStatisticsImpl.java:37)
at java.lang.String.valueOf(String.java:2577)
at java.lang.StringBuffer.append(StringBuffer.java:220)
at org.apache.commons.betwixt.io.AbstractBeanWriter.pushBean(
AbstractBeanWriter.java:1019)

Betwixt calls toString on a SessionStatisticsImpl object which somehow
fails as it internally calls keySet on a IdentityMap which doesn't
support this method for some reason. Since I have no knowledge of
Hibernate, I can only guess how this IdentityMap is supposed to work,
but judging by the stacktrace, it does not implement the keySet method
which it signals by an UnsupportedOperationException.
But I wonder why Betwixt accesses this SessionStatisticsImpl object in
the first place. I mean, it does not sound like a business object, so
perhaps you should hide it via the mapping - define a class mapping
for the business class in question and avoid addDefault in it.

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to