Hello All,
In my machine JBoss running as a service . Hibernate version used is : Hibernate3
My bean contains code to execute a hibernate query
Code in the bean is
Code:
String strQuery = "SELECT tab.distinguishedName from testquery.CUSMUser tab";
Session session = HibernateUtility.getSession();
HibernateUtility.beginTransaction();
LOG.info("Select query is " + strQuery);
Query query = session.createQuery(strQuery);
LOG.info("Starting iteration");
for (Iterator it = query.iterate(); it.hasNext();) {
Object row = it.next();
String dn = row.toString();
LOG.info("Value " + dn);
lstValues.add(dn);
}
LOG.info("Ending iteration");
HibernateUtility.commitTransaction();
Problem is when ever the client call this method it gives following exception at client side
Error unmarshaling return header; nested exception is:
java.net.SocketException: Connection reset
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
java.net.SocketException: Connection reset
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:203)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:118)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:227)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:167)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
at $Proxy1.queryObjects(Unknown Source)
at testquery.driverClient.main(driverClient.java:33)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
at java.io.DataInputStream.readByte(DataInputStream.java:241)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:189)
... 11 more
If instead of query i try Criteria it works fine .
What could be the possible reason for this ?
Please help.
Best Regards
Ratheesh
[/code]