Get error with Restfull Webservice two parameters from namedQuery

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Get error with Restfull Webservice two parameters from namedQuery

PegasusKnight Lionki
Hallo there, it's been one week i am trying to fix this problem and still can't solve it.
I have created restful webservice from netbeans wizard, for the find id get request is working fine. I thought it will be very easy if i put WHERE query and change the getSingleResult to getResultList.  But i am wrong, i never get the result i wanted, it' says :

javax.servlet.ServletException: java.lang.ClassCastException: java.util.Vector cannot be cast to web.Barang

i tried everything to fix this, from modifying the count rest from generated code to change the produce code from xml to plain text,
and still, i won't work.

i know, i am newbie at java, but 7 days working on same thing and can't fix it is driving me crazy.

please help.
thank you very much.

p.s here my screenshots


Capture.PNG (64K) Download Attachment
Capture1.PNG (56K) Download Attachment
Capture2.PNG (51K) Download Attachment
theError.PNG (41K) Download Attachment