Hi,
I am using Castor to write my object (childs consisting of one parent) retrieved by "select u from User where u =233" in an xml file and i get the following errors:
Code:
java.lang.AbstractMethodError: org.hsqldb.jdbcConnection.getHoldability()I
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.exolab.castor.mapping.loader.FieldHandlerImpl.getValue(FieldHandlerImpl.java:413)
at org.exolab.castor.xml.Marshaller.processAttribute(Marshaller.java:2297)
at org.exolab.castor.xml.Marshaller.marshal
-
-
-
Exception in thread "main"
When i get the parent object, say "select g from Group where g =65" (one group have many users) and write it, no problem. The parent and even child objects can be successfully saved in the xml file.
Here is the code:
Code:
Session session = getHibernateSession();
Query getFrost = session.createQuery(" select distinct u from User u where u.userId =233" );
List result = getFrost.list();
User us = null;
FileWriter file1 = new FileWriter("c:/data1.xml");
for (int i=0; i < result.size(); i++ )
{
us = (User)result.get(i);
try
{
Marshaller.marshal(us, file1);
}
catch(Exception e)
{
System.out.println(e);
}
}
file1.close();
session.close();
Any idea guys?
Thanks.
BTW, the castor forum is down!
Hibernate version:
3