You have downloaded Jersey 2 (which RI of JAX-RS 2). The tutorial you’re referring to uses Jersey 1. Download Jersey 1.17.1 from (here), should be sufficient for you.
Jersey 1 uses com.sun.jersey
, and Jersey 2 uses org.glassfish.jersey
hence the exception.
Also note that also init-param
starting with com.sun.jersey
won’t be recognized by Jersey 2.
Edit
Registering Resources and Providers in Jersey 2 contains additional info on how to register classes/instances in Jersey 2.
Related Posts:
- web.xml is missing and
is set to true - web.xml is missing and
is set to true - How to solve could not create the virtual machine error of Java Virtual Machine Launcher?
- How to solve could not create the virtual machine error of Java Virtual Machine Launcher?
- Editor does not contain a main type
- The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
- The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
- Eclipse: Enable autocomplete / content assist
- java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing
- “insufficient memory for the Java Runtime Environment ” message in eclipse
- Control an Arduino with Java
- How do I resolve the “java.net.BindException: Address already in use: JVM_Bind” error?
- Opening JSF Facelets page shows “This XML file does not appear to have any style information associated with it.”
- The program can’t start because cygwin1.dll is missing… in Eclipse CDT
- Eclipse C++ : “Program “g++” not found in PATH”
- Unbound classpath container in Eclipse
- ‘cannot open git-upload-pack’ error in Eclipse when cloning or pushing git repository
- “Server Tomcat v7.0 Server at localhost failed to start” without stack trace while it works in terminal
- “Server Tomcat v7.0 Server at localhost failed to start” without stack trace while it works in terminal
- web.xml is missing and
is set to true – web.xml is there and can’t edit deployment assembly - eclipse won’t start – no java virtual machine was found
- How to solve “Plugin execution not covered by lifecycle configuration” for Spring Data Maven Builds
- Eclipse returns error message “Java was started but returned exit code = 1”
- Ant “JAVA_HOME does not point to the JDK” – but it does
- Program “make” not found in PATH
- Eclipse internal error while initializing Java tooling
- How to clear console in Java – Eclipse
- Eclipse keyboard shortcut to indent source code to the left?
- eclipse for chrome?
- Can eclipse be configured to automatically fix missing Imports?
- Program “make” not found in PATH
- Importing Maven project into Eclipse
- How to show the Project Explorer window in Eclipse?
- Avoiding “resource is out of sync with the filesystem”
- Eclipse Mars vs Luna
- Push eclipse project to GitHub with EGit
- How to open an existing project in Eclipse?
- CodePro Analytix: Where to find the plugin
- How to open Console window in Eclipse?
- Some projects cannot be imported because they already exist in the workspace error in Eclipse
- Java error no lwjgl64 in path?
- Can’t start Eclipse – Java was started but returned exit code=13
- “Error occurred during initialization of VM; Could not reserve enough space for object heap” using -Xmx3G
- A JNI error has occurred, please check your installation and try again in Eclipse x86 Windows 8.1
- “Error occurred during initialization of VM; Could not reserve enough space for object heap” using -Xmx3G
- Editor does not contain a main type in Eclipse [duplicate]
- undefined reference to `WinMain@16′
- JRE Missing when installing eclipse
- Server Tomcat v9.0 Server at localhost failed to start
- Cannot find “Package Explorer” view in Eclipse
- what does Dead Code mean under Eclipse IDE Problems Section
- Eclipse: Java was started but returned error code=13
- How to change a package name in Eclipse?
- Eclipse “Error: Could not find or load main class”
- Error: Selection does not contain a main type
- javax.naming.NameNotFoundException
- Integrate Ant builder into Eclipse: Error “Variable references empty selection”
- eclipse won’t start – no java virtual machine was found
- Eclipse Java error: This selection cannot be launched and there are no recent launches
- How can I avoid this Ant Build error?
- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
- Eclipse error, “The selection cannot be launched, and there are no recent launches”
- The import org.apache.commons cannot be resolved in eclipse juno
- How do I set up Eclipse/EGit with GitHub?
- Failed to load the JNI shared Library (JDK)
- Eclipse java debugging: source not found
- No appenders could be found for logger(log4j)?
- Error occurred during initialization of VM (java/lang/NoClassDefFoundError: java/lang/Object)
- Corrupt jar file
- What does this GCC error “… relocation truncated to fit…” mean?
- JaxbRepresentation gives error “doesnt contain ObjectFactory.class or jaxb.index”
- Java project in Eclipse: The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
- Member declaration not found
- Cross compiler prefix and path in eclipse
- The ResourceConfig instance does not contain any root resource classes
- Cannot be resolved to a variable error in Eclipse
- Using JavaFX in JRE 8, “Access restriction” error
- Eclipse Problems View not showing Errors anymore
- Installation error: INSTALL_FAILED_OLDER_SDK
- “Cannot be resolved to a type” when attempting to use Scanner
- java eclipse red exclamation mark
- Eclipse is executing the wrong Java file
- “insufficient memory for the Java Runtime Environment ” message in eclipse
- Unknown version of Tomcat was specified in Eclipse
- Which Eclipse IDE version to choose?
- How to configure Eclipse CDT for cmake?
- Java says this method has a constructor name
- How can i fix this equals on primitive type(int)
- Error :- java runtime environment JRE or java development kit must be available in order to run eclipse
- How fix Error:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
- Maven dependency update on commandline
- The import javax.servlet can’t be resolved
- Eclipse EGit Checkout conflict with files: – EGit doesn’t want to continue
- “please check gdb is codesigned – see taskgated(8)” – How to get gdb installed with homebrew code signed?
- How to solve “Unresolved inclusion:
” in a C++ file in Eclipse CDT? - How do I enable index downloads in Eclipse for Maven dependency search?
- Spring Boot – Cannot determine embedded database driver class for database type NONE
- Check if a database is well installed
- WordPress site under localhost is disassociated with the code
- Is it a good idea to edit WordPress within Eclipse? [closed]