Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Web Services and the fly likes Couldn't find JAX-B element for class java.lang.String error on REST method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Couldn Watch "Couldn New topic
Author

Couldn't find JAX-B element for class java.lang.String error on REST method

Mikael Gyth
Greenhorn

Joined: Sep 30, 2012
Posts: 7
Hello. I have a problem i can't seem to figure out.

I have a set of REST Methods, this is two of them:


The first one works just fine, the second one when I try to call it, I get this error:


And in Glassfish I get:


Can anyone please help me sort this out? Let me know if you need any aditional info.

Thanks in advance.

Edit: I know the parameters and the sql query doesn't make any sense in it's current state, I'v just been removing most of the query to get something i knew worked.
Mikael Gyth
Greenhorn

Joined: Sep 30, 2012
Posts: 7
Solution was to define the returning entity object in the namedQuery.

 
wood burning stoves
 
subject: Couldn't find JAX-B element for class java.lang.String error on REST method
 
Similar Threads
Returning a String from Server (REST) and getting Errors..
Netbeans 6.8M1 and JAX-RS using Jersey problems
Can't deploy EJB jar to Glassfish
Glassfish deployment issues
Jersey Response issue driving me batty!