Sorry, I don't know weblogic, so maybe that's why I don't understand all you say :
Quote:
I am trying to return a list of Persistent Classes to the client(bean in jsp page), but gets UnmarshalException. This works fine if I try to query directly from the client so I dont think its missing jar files?? I could move the queried data to data holder classes but do not really want to do that. I guess the transient state is not the same at the detached state?
Could you explain a bit more what you do, what works, and what doesn't ? When you say client, you speak about a client that's networkly separated, or on the same machine ?
Quote:
Works....
Code:
Session ses = HibernateUtil.getSessionFactory().getCurrentSession();
Query q = ses.createQuery("select i from XInvoice i order by i.insertedDate");
q.setFirstResult(1);
q.setMaxResults(top);
List l = q.list();
Iterator i = l.iterator();
ArrayList al = new ArrayList();
while(i.hasNext()) {
XInvoice iv = new XInvoice();
XInvoice ivD = (XInvoice)i.next();
iv.setPk(ivD.getPk());
iv.setInvoiceNumber(ivD.getInvoiceNumber());
al.add(iv);
}
return al;
Are you saying that iterating on the list make your code work ? If so, i could be because you're triggering the proxy select, so you would be getting a kind of LazyInitException if not doing this, but I don't understand your stacktrace :-/.