Make sure you clear Glassfish osgi cache by removing the $GLASSFISH_HOME\glassfish\domains\<your_domain>\osgi-cache directory after you replaced the bundles listed above, and before you restart the Glassfish.

Note: If you want to see JPA-RS logs, add a logger for "org.eclipse.persistence.jpars". Currently exceptions are logged at "FINER" log level, so configure the logger to FINER or FINEST. Use Glassfish Admin Console-> Configurations-> default-config-> Logger Settings-> Log Levels tab -> Add Logger to add a logger for the JPA-RS.

2. Clone "examples" from git. The "student" example is stored under student folder.

3. Configure datasource. Create an XA Datasource connection pool called "JPARSStudentDS" and define a new JDBC Resource using this connection pool. You can use any of the databases supported by the eclipselink.
Your database driver should be place under $GLASSFISH_HOME/glassfish/domains/<your_domain_folder>/lib/ext.
Use "Additional Properties" (shown below) tab to define database URL, User and Password (and other mandatory properties that the database you use might require).

Running the Example

Launch Chrome and Postman. Please see Creating and sending requests using Postman if you are not familiar with creating and sending REST request using Postman. If you are using another tool to construct REST requests, please make sure you set Accept header correctly. The Accept header is used by HTTP clients to tell the server what content types they'll accept. The server will then send back a response, which will include a Content-Type header telling the client what the content type of the returned content actually is. HTTP requests can also contain Content-Type headers. With POST or PUT requests, the client actually sends a bunch of data to the server as part of the request, and the Content-Type header tells the server what the data actually is (and thus determines how the server will parse it).The JPA-RS accepts "application/json" and "application/xml" and this example focuses on json.