aspose file tools*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes get a classCastException im getFibs() method on p.257 of Java Web Service Up and Running. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "get a classCastException im getFibs() method on p.257 of Java Web Service Up and Running." Watch "get a classCastException im getFibs() method on p.257 of Java Web Service Up and Running." New topic
Author

get a classCastException im getFibs() method on p.257 of Java Web Service Up and Running.

Himai Minh
Ranch Hand

Joined: Jul 29, 2012
Posts: 592
I am still struggling with the example on p 256.
First I commented out the DerbyPlatform in persistence.xml ,the client prints Fib(1) = 1 , Fib(2) = 1 ...


However, on the service side of the Glassfish, I get a class cast exception on List list = (List) next.
It cannot type cast the object in fib_nums to list.
Here is the code from the book:


I changed the code a little bit:

I got a MarshallException. It seems that the results cannot be marshaled into XML before being sent to the client.

Please help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: get a classCastException im getFibs() method on p.257 of Java Web Service Up and Running.
 
Similar Threads
Do not carry my list on page XHTML
Native Queries
Previous replicated result in getResultList()
java.lang.ClassCastException: java.lang.Integer cannot be cast to com.user
Extract output of CreateNativeQuery