Questions tagged [jersey-1.0]

Jersey 1.0 is the open source, production quality, JAX-RS 1.1 (JSR 311) reference implementation for building RESTful Web services. Only use this tag if your question specifically pertains to Jersey 1.0.

Jersey 1.0 is the open source, production quality, JAX-RS 1.1 (JSR-311) reference implementation for building RESTful Web services. Jersey provides an API so that developers may extend Jersey to suit their needs. The governance policy is the same as the one used in the GlassFish project.

204 questions
2
votes
3 answers

Is there any way to log every web service call coming to an Application in Jersey

I'm using Jersey 1.8 in My Application. Now, there are lots of service classes. Is there any way to log all the request coming to different services. That means, is it possible to create something like a generic filter via which all request will go,…
anij
  • 1,322
  • 5
  • 23
  • 39
2
votes
0 answers

Handle an array of POJO in JSON via jersey

My server receives a JSON array via POST [{"name" : "foo", "price" : 15.0, "time" : 123130283812}, {"name" : "bar", "price" : 15.8, "time" : 123130283812}] I want my method to handle this parameter so I create private static class PriceInfo { …
Dat Chu
  • 10,822
  • 13
  • 58
  • 82
2
votes
1 answer

How to produce JSON output with Jersey 1.17.1 using JAXB

There is a correct answer to this question already on this site. The problem is that the question is for Jersey 1.6 and the correct answer for Jersey 1.17.1 is buried at the bottom. I figured I'd create a correct question for this answer so that…
Daniel Kaplan
  • 62,768
  • 50
  • 234
  • 356
1
vote
1 answer

Convert Jersey 1.x client to Jersey 2.x client

I have the following code which works with jersey 1.x. However, I need to make it work with jersey 2.x and I noticed that a lot of the jersey classes and methods changed from one version to another. Any idea? Client client = null; try { …
Mandy Lastra
  • 181
  • 1
  • 12
1
vote
1 answer

JAX-RS register instance as an endpoint?

I have a rest endpoint class similar to this: @Path("/users") public class Users { private final Database database; public Users(Database database) { this.database = database; } @GET @Path("/{id}") public Response…
1
vote
0 answers

Jersey error after migrating EAR from Jboss EAP 6.4 to Jboss EAP 7.3

Recently i migrated a jboss eap 6.4 application to jboss eap 7.3. The application uses resteasy and jersey(1.9.1) for some service implementations. Since resteasy is automatically loaded by jboss, i have excluded that from the deployment using the…
proceso
  • 11
  • 1
1
vote
2 answers

Not able to convert underscore case to camel case with Jackson

I have a DTO class which has a property like: @JsonIgnoreProperties(ignoreUnknown = true) public class WPPostResponse { @JsonProperty("featuredMedia") Long featured_media; public Long getFeatured_media() { return…
John Doe
  • 2,225
  • 6
  • 16
  • 44
1
vote
1 answer

Jersey 1.x and Tomcat: how to register a ContainerRequestFilter programmatically, i.e. without web.xml?

My application In my JAX-RS/Jersey application running in Tomcat, I need to run a filter class that implements ContainerRequestFilter before every resource method. The filter determines whether or not the service is available right now1. This is…
Gary Sheppard
  • 4,764
  • 3
  • 25
  • 35
1
vote
0 answers

Prevent Jersey responding to an API call when Accept is not application/json

I'm currently using Jersey 1.18 (for legacy reasons). I have an api endpoint: @GET @Path("/something") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public final Response doMyThing(final @Context HttpServletRequest…
ndtreviv
  • 3,473
  • 1
  • 31
  • 45
1
vote
1 answer

Spring Autowired Beans are not injected

I'm trying to setup a simple REST application using Jersey + Jetty and Spring for setting up beans for Autowiring. I am also managing this through Gradle. I have 2 main endpoints /users and /greeting. A GET on /greeting only returns text response…
rapidclock
  • 1,677
  • 2
  • 17
  • 32
1
vote
0 answers

SEVERE: A message body reader for Java type, class , and MIME media type, application/json, was not found

I am creating a REST service with jersey. Here the request handler class's method. @POST @Path("/deleteWorkers") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public Response deleteWorkers(DeleteWorkerPOJO…
bula
  • 8,719
  • 5
  • 27
  • 44
1
vote
3 answers

What could possibly be wrong in creating maven project if you have error in pom.xml file

missing artifact org.glassfish.extras glassfish-embedded-web:jar3.1.1 and there's an error in the pom.xml file of my maven project using jersey. please explain what is wrong? the error mark is in the dependency tag below
1
vote
1 answer

Oracle JDBC exception, in webapp, in Tomcat deployment: No suitable driver at java.sql.DriverManager.getDriver

I am unit-testing my jersey web-service through jersey client using eclipse Oxygen.3a, Tomcat 9, JDK 1.8, and ojbc14.jar in my WEB-INF/lib of my web-app in eclipse. I do not have any ojdbc.jar's in my Tomcat/lib dir. So there is single copy of my…
Soumali Chatterjee
  • 309
  • 1
  • 4
  • 13
1
vote
1 answer

HTTP method GET is not supported by this URL Rest-full WS on WL 12.2.1

I have developed a Rest-full WS which runs successfully on tomcat. The application deploys succesfully in Weblogic 12.2.1 without any exceptions. However, on hitting the URI, I face "HTTP method GET is not supported by this URL Rest-full WS" in…
Prerna shah
  • 321
  • 3
  • 20
1
vote
0 answers

How to add a Jersey ClientResponseFilter

When defining a jersey ContainerResponseFilter, we added it as follows: PackagesResourceConfig rc = new PackagesResourceConfig("com.company.xxx"); rc.getContainerResponseFilters().add(new MyContainerResponseFilter()); We have also created a…
user1052610
  • 4,440
  • 13
  • 50
  • 101