I tried Tom ...

But its the same error again, could you plz check what I did was what you
asked me to.

Now, I have a mapping.xml file in my local directory which looks like this:

<?xml version="1.0"?>
<betwixt-config>
<!--name of the class to map -->
<class name="com.mms.Person">
<!-- standard definations (same as in standard .betwixt file) -->
<element name="Person">
<element name="personId" property="personId"/>
<element name="firstName" property="firstName"/>
<element name="lastName" property="lastName"/>
<element name="type" property="type"/>
</element>
</class>
</betwixt-config>

where Person is the bean which I want to output as XML format, with all
these elements within it (as shown in mapping.xml)

and then in my Main class I read the mapping file:


beanWriter.getXMLIntrospector().register(new
InputSource("src/com/mms/mapping.xml"));
Person person = (Person) session.load(Person.class,5667);

beanWriter.write("perspectiveResponse", new PerspectiveResponse(person));
System.out.println(outputWriter.toString());


But still getting the same errorstack:
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: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:243)
at org.apache.commons.betwixt.io.AbstractBeanWriter.write(
AbstractBeanWriter.java:174)
at com.mms.HibernateTest.main(HibernateTest.java:52)

Was I doing what you said??? And whats the solution to get out of this
problem.

-Sameer
On 10/17/05, Thomas Dudziak <[EMAIL PROTECTED]> wrote:
>
> IMHO means "in my humble opinon", just like IMO means "in my opinon".
> ITE is probably ( ;-) ) InvocationTargetException
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to