-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Query execution causes java.rmi.UnmarshalException
PostPosted: Thu Apr 12, 2007 1:17 am 
Newbie

Joined: Thu Apr 12, 2007 1:11 am
Posts: 1
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]


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.