• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Himai Minh
Ranch Hand
Posts: 1573
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!