From a92eb9beb5880fd1962f490c8ec6d9c73812c668 Mon Sep 17 00:00:00 2001 From: TwoLettuce Date: Tue, 17 Feb 2026 17:58:37 -0700 Subject: [PATCH 1/5] Added Phase 3 TA Tip concerning the use of Gson instead of jackson --- instruction/chess-tips/chess-tips.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/instruction/chess-tips/chess-tips.md b/instruction/chess-tips/chess-tips.md index 6cb059c8..88379f22 100644 --- a/instruction/chess-tips/chess-tips.md +++ b/instruction/chess-tips/chess-tips.md @@ -98,6 +98,20 @@ Or if this problem is happening with error handling, try to return the error in Return new Gson().toJson(Map.of(“message”, ex.getMessage())); ``` +## Autograder doesn't compile my project - package com.fasterxml.jackson.core does not exist + +If your code runs on your local machine, but your code will not compile, or you receive 500 HTTP status codes, one potential reason is that your project has added the jackson dependency, which the autograder does not use. You might be doing something like: + +```java +ctx.json(registerResponse); +``` + +The autograder expects you to use specific dependencies, one of which is Gson. Serializing your response with Gson rather than with Jackson will ensure that your project isn't using any dependencies that are undefined to the autograder. In this example: + +```java +ctx.result(gson.toJson(registerResponse)); +``` + ## How do I read the authToken from an HTTP request? Refer to the [Web API](https://github.com/softwareconstruction240/softwareconstruction/blob/main/instruction/web-api/web-api.md#http-headers) instruction. From cc8a49de0eee929a5741b727d2ff4fb777a5caca Mon Sep 17 00:00:00 2001 From: TwoLettuce Date: Wed, 18 Feb 2026 16:19:20 -0700 Subject: [PATCH 2/5] improvement to the documentation highlighting an additional error that could have stemmed from the same problem --- instruction/chess-tips/chess-tips.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instruction/chess-tips/chess-tips.md b/instruction/chess-tips/chess-tips.md index 88379f22..3ba51244 100644 --- a/instruction/chess-tips/chess-tips.md +++ b/instruction/chess-tips/chess-tips.md @@ -98,7 +98,7 @@ Or if this problem is happening with error handling, try to return the error in Return new Gson().toJson(Map.of(“message”, ex.getMessage())); ``` -## Autograder doesn't compile my project - package com.fasterxml.jackson.core does not exist +## Autograder doesn't compile my project - package com.fasterxml.jackson.core does not exist / expected: <401> but was: <500> If your code runs on your local machine, but your code will not compile, or you receive 500 HTTP status codes, one potential reason is that your project has added the jackson dependency, which the autograder does not use. You might be doing something like: From c186661284c27c14e68c7d0ee463da3bec3aeeec Mon Sep 17 00:00:00 2001 From: TwoLettuce <77355424+TwoLettuce@users.noreply.github.com> Date: Wed, 18 Feb 2026 16:28:14 -0700 Subject: [PATCH 3/5] generalized TA tip to cover more issues. Clarified autograder dependency issues and suggested using Gson for serialization. --- instruction/chess-tips/chess-tips.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/instruction/chess-tips/chess-tips.md b/instruction/chess-tips/chess-tips.md index 3ba51244..a2da5433 100644 --- a/instruction/chess-tips/chess-tips.md +++ b/instruction/chess-tips/chess-tips.md @@ -100,17 +100,13 @@ Return new Gson().toJson(Map.of(“message”, ex.getMessage())); ## Autograder doesn't compile my project - package com.fasterxml.jackson.core does not exist / expected: <401> but was: <500> -If your code runs on your local machine, but your code will not compile, or you receive 500 HTTP status codes, one potential reason is that your project has added the jackson dependency, which the autograder does not use. You might be doing something like: +If your code fails to compile in the autograder or you receive 500 HTTP status codes but runs fine on your local machine, one potential reason is that your project is using dependencies beyond what is used in the specifications of the project. This will cause problems because the autograder might not be using those dependencies. One specific dependency you might be using is jackson, which would be reflected if your handlers or servers are doing something similar to the following: ```java ctx.json(registerResponse); ``` -The autograder expects you to use specific dependencies, one of which is Gson. Serializing your response with Gson rather than with Jackson will ensure that your project isn't using any dependencies that are undefined to the autograder. In this example: - -```java -ctx.result(gson.toJson(registerResponse)); -``` +The autograder expects you to use specific dependencies, one of which is Gson. Serializing your response with Gson rather than with Jackson will ensure that your project isn't using any dependencies that are undefined to the autograder. ## How do I read the authToken from an HTTP request? From 1ecfc88109725889c9690cf9dcbe4e87374ac5e0 Mon Sep 17 00:00:00 2001 From: TwoLettuce <77355424+TwoLettuce@users.noreply.github.com> Date: Fri, 20 Feb 2026 12:36:40 -0700 Subject: [PATCH 4/5] Added hyperlink to PetShop server to indicate correct serialization --- instruction/chess-tips/chess-tips.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/instruction/chess-tips/chess-tips.md b/instruction/chess-tips/chess-tips.md index a2da5433..84514b8a 100644 --- a/instruction/chess-tips/chess-tips.md +++ b/instruction/chess-tips/chess-tips.md @@ -98,15 +98,15 @@ Or if this problem is happening with error handling, try to return the error in Return new Gson().toJson(Map.of(“message”, ex.getMessage())); ``` -## Autograder doesn't compile my project - package com.fasterxml.jackson.core does not exist / expected: <401> but was: <500> +## Autograder doesn't compile my project - package com.fasterxml.jackson.databind does not exist / expected: <401> but was: <500> -If your code fails to compile in the autograder or you receive 500 HTTP status codes but runs fine on your local machine, one potential reason is that your project is using dependencies beyond what is used in the specifications of the project. This will cause problems because the autograder might not be using those dependencies. One specific dependency you might be using is jackson, which would be reflected if your handlers or servers are doing something similar to the following: +If your code fails to compile in the autograder or you receive 500 HTTP status codes but runs fine on your local machine, one potential reason is that your project is using dependencies beyond what is used in the specifications of the project. This will cause problems because the autograder might not be using those dependencies. One specific dependency you might be using is jackson, which would be reflected if your handler or server is doing something similar to the following: ```java ctx.json(registerResponse); ``` -The autograder expects you to use specific dependencies, one of which is Gson. Serializing your response with Gson rather than with Jackson will ensure that your project isn't using any dependencies that are undefined to the autograder. +The autograder expects you to use specific dependencies, one of which is Gson. Serializing your response with Gson rather than with Jackson will ensure that your project isn't using any dependencies that are undefined to the autograder. Feel free to look at [PetShop's Server class](https://github.com/softwareconstruction240/softwareconstruction/blob/main/petshop/server/src/main/server/PetServer.java) and examine how serialization is done there. ## How do I read the authToken from an HTTP request? From e833ed830fdc49b92750126845d5b00d94c065ce Mon Sep 17 00:00:00 2001 From: TwoLettuce <77355424+TwoLettuce@users.noreply.github.com> Date: Tue, 24 Feb 2026 18:00:09 -0700 Subject: [PATCH 5/5] Update chess-tips.md with dependency guidance Added guidance on handling IntelliJ errors related to jackson dependency and autograder compilation issues. --- instruction/chess-tips/chess-tips.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/instruction/chess-tips/chess-tips.md b/instruction/chess-tips/chess-tips.md index 84514b8a..66d70800 100644 --- a/instruction/chess-tips/chess-tips.md +++ b/instruction/chess-tips/chess-tips.md @@ -98,6 +98,12 @@ Or if this problem is happening with error handling, try to return the error in Return new Gson().toJson(Map.of(“message”, ex.getMessage())); ``` +## IntelliJ is giving me errors and is asking me to add the jackson dependency to my project + +It is possible that javalin will suggest that you use the jackson dependency to deal with serialization. If you see this suggestion, it could mean that you are not properly serializing your response or that your endpoint is not returning what the client expects. Check your return types and what you are sending across the server to the client and make sure it matches your sequence diagram and the project specs. + +In this project, **you should not add any additional dependencies** beyond what the project instruction tells you to add. + ## Autograder doesn't compile my project - package com.fasterxml.jackson.databind does not exist / expected: <401> but was: <500> If your code fails to compile in the autograder or you receive 500 HTTP status codes but runs fine on your local machine, one potential reason is that your project is using dependencies beyond what is used in the specifications of the project. This will cause problems because the autograder might not be using those dependencies. One specific dependency you might be using is jackson, which would be reflected if your handler or server is doing something similar to the following: