resteasy

Hibernate throwing a QuerySyntaxException with correct class name given

I have a Product class; @Entity public class Product { . . public Product() { } . . } A generic DAO; public class GenericDao<T> { private Class<T> type; @Inject protected EntityManager entityManager; public GenericDao() { } public List<T> list() { return entityManager.createQuery("FROM " + type...

NoSuchMethodError javax.validation.Validator.forExecutables() but the Junit works

Why do I get this exception NoSuchMethodError javax.validation.Validator.forExecutables() when I run the application and the following method is called but the exception is never thrown if I call the method from a JUnit test, it executes perfectly. I'm using Spring AOP 3.2.4 + AspectJ and Hibernate...

POST complex parameters to REST service what would request URL and Body look like

So I am standing up a rest service. It is going to request a post to a resource that is pretty complex. The actual backend requires multiple (19!) parameters. One of which is a byte array. It sounds like this is going to need to be serialized by the client and sent to my service. I am trying to...

Resteasy: java.lang.NoClassDefFoundError: javax/servlet/ServletContext

I have Resteasy servlet and listener configured in web.xml <servlet-mapping> <servlet-name>resteasy-servlet</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping> <!-- Auto scan REST service --> <context-param> <param-name>resteasy.scan</param-name> <param-value>true</param-value> <...

JAX-RS Client Filter to Modify Header Before Request is Dispatched to server

In JAX-RS (RestEasy), I want to implement a client filter that modifies the header before sending the request so I don't do this manually for every single call. Currently I'm doing this in the receiving end to intercept requests before arriving to the resource. @Provider @Priority(Priorities...

DSL-Json with RESTEasy - Getting NoMessageBodyWriterFoundFailure error

I'm integrating RestEasy with Dsl-JSON but I'm getting the following error: Failed executing GET /json/sample/get org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not find MessageBodyWriter for response object of type My code is as below: @Path("/json/sample") public class JSONService...

Peer not authenticated exception while consuming https REST service

I have created REST services using RESTEasy and generated certificate using openssl and configured with https from this JBoss link . When I try to consume the service like this, ClientRequest request = new ClientRequest("https://localhost:8443/services/users"); request.accept(MediaType.APPLICATION...

What is the most portable (or standard) way of returning a list as a response in jax-rs?

Well, anybody can say this question is already asked and answered. Never mind I also found them. JAX-RS: How to automatically serialize a collection when returning a Response object? Using Java-generics template type in RESTful Response object via GenericEntity<List<T>> I'm not confused with the way...

RestEasy - upload file (multipart/form-data) with cyrillic name

When I upload a file to the server, everything is fine. But if the name of the file contains cyrillic characters, on the server that filename appears with question marks. I don't set any character encoding when I send request to the server. I know that if you don't put any character encoding in the...