commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sameer Nanda <sam5...@gmail.com>
Subject Re: [betwixt] Problem loading a Bean in Betwixt
Date Mon, 17 Oct 2005 18:05:25 GMT
Hi Konstantin,

I tried different thing like,

1) not closing the Hibernate Session at all (bad trick :)
2) Loading the DB values via Hibernate in the default constructor of my
PerspectiveResponse Bean

But still the same error message. I definetly have the feeling that Betwixt
doesnt like the way the Person class is been loaded via Hibernate. I am
checking on with the Hibernate guys about the same and would let you guys
know. But still at the back of my mind I think its Betwixt which is not able
to load the values from the Bean and generate the XML output. Any thougths
!!!!!!!

Regards,
Sameer

On 10/17/05, Konstantin Priblouda <kpriblouda@yahoo.com> wrote:
>
> OK, It seems that betwixt chocked on
> hibernate proxy ( or some collections )
> or maybe session was already closed...
>
> I think it's more hibernate problem than betwixt.
> ( When you are using hibernate,
> you will get some dynamic proxy instead of your real
> object )
>
> regards,
>
> --- Sameer Nanda <sam504u@gmail.com> wrote:
>
> > Heres how the stacktrace look like:
> >
> >
> > 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)
> > at
> >
> org.apache.commons.betwixt.io.AbstractBeanWriter.writeBean(
> > AbstractBeanWriter.java:348)
> > at
> >
> org.apache.commons.betwixt.io.AbstractBeanWriter.writeBean(
> > AbstractBeanWriter.java:267)
> > at
> >
> org.apache.commons.betwixt.io.AbstractBeanWriter.writeElementContent(
> > AbstractBeanWriter.java:945)
> > at
> >
> org.apache.commons.betwixt.io.AbstractBeanWriter.writeElement(
> > AbstractBeanWriter.java:820)
> > at
> >
> org.apache.commons.betwixt.io.AbstractBeanWriter.writeBean(
> > AbstractBeanWriter.java:362)
> > at
> >
> org.apache.commons.betwixt.io.AbstractBeanWriter.writeBean(
> > AbstractBeanWriter.java:267)
> > at
> >
> org.apache.commons.betwixt.io.AbstractBeanWriter.writeElementContent(
> > AbstractBeanWriter.java:945)
> > at
> >
> org.apache.commons.betwixt.io.AbstractBeanWriter.writeElement(
> > AbstractBeanWriter.java:820)
> > at
> >
> org.apache.commons.betwixt.io.AbstractBeanWriter.writeBean(
> > AbstractBeanWriter.java:362)
> > at
> >
> org.apache.commons.betwixt.io.AbstractBeanWriter.writeBean(
> > AbstractBeanWriter.java:267)
> > at
> >
> org.apache.commons.betwixt.io.AbstractBeanWriter.writeElementContent(
> > AbstractBeanWriter.java:936)
> > at
> >
> org.apache.commons.betwixt.io.AbstractBeanWriter.writeElement(
> > AbstractBeanWriter.java:820)
> > at
> >
> org.apache.commons.betwixt.io.AbstractBeanWriter.writeBean(
> > AbstractBeanWriter.java:362)
> > at
> >
> org.apache.commons.betwixt.io.AbstractBeanWriter.writeBean(
> > AbstractBeanWriter.java:243)
> > at
> >
> org.apache.commons.betwixt.io.AbstractBeanWriter.write(
> > AbstractBeanWriter.java:174)
> > at com.mms.HibernateTest.main(HibernateTest.java:74)
> >
> > Thanks,
> > Sameer
> >
> > On 10/17/05, Konstantin Priblouda
> > <kpriblouda@yahoo.com> wrote:
> > >
> > >
> > >
> > > --- Sameer Nanda <sam504u@gmail.com> wrote:
> > >
> > > > Hi All,
> > > >
> > > > I have a problem loading a Bean with Betwixt. I
> > am
> > > > loading a Person Bean
> > > > with Hibernate (DB Persistence tool) and passing
> > the
> > > > bean to Betwixt to O/P
> > > > the Bean in an XML format. The data is loaded
> > from
> > > > the DB (and I confirmed
> > > > the same) and when I call the BeanWriter to
> > output
> > > > the bean it throws me an
> > > > error:
> > > >
> > >
> > > > But if I run the Main I get an error:
> > > >
> > > > java.lang.UnsupportedOperationException
> > > >
> > >
> > >
> > > Could you show the stacktrace? ( look who is
> > barfing )
> > >
> > > regards,
> > >
> > > ----[ Konstantin Pribluda http://www.pribluda.de
> > ]----------------
> > > Still using XDoclet 1.x? XDoclet 2 is released and
> > of production quality.
> > > check it out: http://xdoclet.codehaus.org
> > >
> > >
> > >
> > > __________________________________
> > > Start your day with Yahoo! - Make it your home
> > page!
> > > http://www.yahoo.com/r/hs
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > commons-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > commons-user-help@jakarta.apache.org
> > >
> > >
> >
>
>
> ----[ Konstantin Pribluda http://www.pribluda.de ]----------------
> Still using XDoclet 1.x? XDoclet 2 is released and of production quality.
> check it out: http://xdoclet.codehaus.org
>
>
>
> __________________________________
> Yahoo! Music Unlimited
> Access over 1 million songs. Try it free.
> http://music.yahoo.com/unlimited/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message