0

I am working on a project using JDeveloper 10g (yes, imagine that).
The project consists of developing RESTful web services with Jersey.
What is driving me crazy, is that whenever I use the javax.ws.rs.core.Response I get this error when trying to build my project:

Error: Status$Family not found  in enum javax.ws.rs.core.Response.Status.Family

I found this thread in java.net. As Paul said, I thought it would be some version conflict (jre 5). So I downgraded to Jersey 1.2, and used the jsr311-api-111.jar as advised, but no chance.
Would anyone have an idea how to solve this problem ? PS: The same project, can be built fine in JDeveloper 11g.

Laabidi Raissi
  • 3,263
  • 1
  • 22
  • 28

3 Answers3

1

In JDEV 10g project properties under compiler, check the box for Use Javac. The default compiler for Make in JDEV 10g is ojc, and this interferes with jsr311. It will compile with javac.

NJL
  • 11
  • 1
0

You are referring to JSR-311 API

https://jsr311.java.net/nonav/javadoc/index.html?javax/ws/rs/core/Response.Status.Family.html

You can find the jar in https://jsr311.java.net/

Replace the new jar with an older version to solve this issue. Good luck!

Viswanath
  • 1,413
  • 13
  • 25
0

In my case I used the fully qualified name in the code instead of importing the class

javax.ws.rs.core.Response.ResponseBuilder builder = 
                javax.ws.rs.core.Response.status(javax.ws.rs.core.Response.Status.OK);
javax.ws.rs.core.Response response
jww
  • 97,681
  • 90
  • 411
  • 885
rubix
  • 1