• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

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

Ranch Hand
Posts: 1738
  • 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
Boost this thread!