"vlokesh" wrote : Your Query is wrong.... | | Change this | | return (CustomerCMP) em.createQuery("from Customer c where c.Name =:Name").getSingleResult() | | return em.createQuery("from Customer c").getResultList(); | | To | | return (CustomerCMP) em.createQuery("from CustomerCMP c where c.Name =:Name").getSingleResult() | | return em.createQuery("from CustomerCMP c").getResultList(); | | in both method calls. | | Regards. | | Lokesh. | | Hi Lokesh,
the getCustomers works great. The getCustomer (code see below) now generates the exception below. The server is still running and I can rerun the client with the same results. What did I screw up ? tia exception in thread "main" java.lang.reflect.UndeclaredThrowableException at $Proxy0.getCustomer(Unknown Source) at client.Client.getOneCust(Client.java:47) at client.Client.main(Client.java:31) Caused by: java.rmi.ConnectException: Failed to communicate. Problem during marshalling/unmarshalling; nested exception is: java.net.SocketTimeoutException: Read timed out private static void getOneCust() | { | System.out.println("Getting"); | CustomerCMP cust1 = cust.getCustomer("Andrew"); | System.out.printf("%s %s\r\n", cust1.getName(), cust1.getContact()); | System.out.println("done"); | } | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3894371#3894371 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3894371 ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user