Skip to content
Advertisement

Tag: jersey

AbstractMethodError when creating JdkHttpServer for JAX-RS

I’m trying to create a Java server for a REST API and following this question I used jersey’s JdkHttpServer. I imported the necessary jars (from here), but when I start the server the following error appears: My code is the following: And in PokerResource I’ve got all the paths for the API. Am I missing some import or do I

JAX-RS (jersey implementation) ExceptionMapper aren’t catching ConstraintViolationException

I have an ExceptionMapper as a @Provider for handling all of my exceptions. So it is obvious that my class implements ExceptionMapper<Throwable> and we as know, all exceptions are extended Throwable somehow. Now I used jax-rs @NotNull to checking my resources input values to be not null and by some search, I realized it will throw ConstraintViolationException when the annotated

java.lang.NoClassDefFoundError: io/jsonwebtoken/SignatureAlgorithm

i have the following code that tries to create a jwt token. there will always be an error as shown below whenever it tries to execute SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256; I have manually deleted the jwt jar file and update maven again to reinstall the jar but the issue still persist. Any help will be greatly appreciated! Error Log java.lang.NoClassDefFoundError:

Jackson adds backslash in json

I’m building REST service on Jersey and using Jackson to produce JSON from java classes of my model. Model with absolutely simple values, I think this is the most typical case. But I get strange result: My expecting result: My source values of fields does NOT contains any special characters. These are simple words. There’re my Java classes. Entity: Class

How to send enclose data in DELETE request in Jersey client?

I have the following server-side code in Jersey 2.x: On client side, I want to use Jersey 2.x client to send a delete request to the above web service. However, from the documentation of Jersey client API, I didn’t find how to enclose the following data in DELETE request: From the Jersey client API, the SyncInvoker class doesn’t support a

ServletContextListener SEVERE: Error configuring application listener of class marktest.Config

My Java servlet appears to be complaining that it can’t find a file which is included in the package (marktest). Im using Eclipse (Indigo) to develop and Tomcat7. Here is the error: Here is Config.java which contains the class implementing ServletContextListener which it says it can’t find in the error: and here is web.xml I’m rather stumped even after much

Advertisement