We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I tried to follow the instructions for creating a sample project at https://eclipse-ee4j.github.io/jersey.github.io/documentation/latest/getting-started.html, I get a NullPointerException:
mkdir JerseyExample2
cd JerseyExample2
mvn archetype:generate -DarchetypeArtifactId=jersey-quickstart-grizzly2 -DarchetypeGroupId=org.glassfish.jersey.archetypes -DinteractiveMode=false -DgroupId=com.example -DartifactId=simple-service -Dpackage=com.example -DarchetypeVersion=2.39
cd simple-service/
mvn clean test
Running com.example.MyResourceTest Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec <<< FAILURE! com.example.MyResourceTest.testGetIt() Time elapsed: 0.004 sec <<< FAILURE! java.lang.NullPointerException at com.example.MyResourceTest.testGetIt(MyResourceTest.java:45)
The text was updated successfully, but these errors were encountered:
Yes, sorry for that. It is caused by migrating to Junit 5, where Junit 5 does not run @BeforeEach. It can be fixed by adding
@BeforeEach
<plugin> <!-- Surefire support for JUnit-5 --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>3.0.0-M7</version> </plugin>
It is fixed by #5277
Sorry, something went wrong.
No branches or pull requests
When I tried to follow the instructions for creating a sample project at https://eclipse-ee4j.github.io/jersey.github.io/documentation/latest/getting-started.html, I get a NullPointerException:
mkdir JerseyExample2
cd JerseyExample2
mvn archetype:generate -DarchetypeArtifactId=jersey-quickstart-grizzly2 -DarchetypeGroupId=org.glassfish.jersey.archetypes -DinteractiveMode=false -DgroupId=com.example -DartifactId=simple-service -Dpackage=com.example -DarchetypeVersion=2.39
cd simple-service/
mvn clean test
T E S T S
Running com.example.MyResourceTest
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec <<< FAILURE!
com.example.MyResourceTest.testGetIt() Time elapsed: 0.004 sec <<< FAILURE!
java.lang.NullPointerException
at com.example.MyResourceTest.testGetIt(MyResourceTest.java:45)
The text was updated successfully, but these errors were encountered: