Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

Himai Minh
Ranch Hand
Posts: 1342
  • 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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic