DOC : processDefinition is NULL

Hi,
I have some trouble with the documentation

section 2.3.2 :

RepositoryService repositoryService = processEngine.getRepositoryService();
Deployment deployment = repositoryService.createDeployment()
.addClasspathResource(“holiday-request.bpmn20.xml”)
.deploy();

The doc says : “We can now verify that the process definition is known to the engine (and learn a bit about the API) by querying it through the API. This is done by creating a new ProcessDefinitionQuery object through the RepositoryService.”

deployment.getId() gives a number, so it works, ok
But the next section of the doc gives a NULL POINTER EXCEPTION :

ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery()
.deploymentId(deployment.getId())
.singleResult();
System.out.println("Found process definition : " + processDefinition.getName());
=> NULL POINTER EXCEPTION

Is it the same with all of you or i did something wrong ?

Thanks in advance
:paperclips::triangular_ruler::scissors::paperclips::triangular_ruler::scissors::paperclips::triangular_ruler::scissors:

The issue was coming from my XML file which was corrupted.
Solution :
1 / inside my eclipse project, i created a new folder named resources,
2 / Right-click on resources folder, new, other, xml folder, “xml File”, copy paste holiday-request.bpmn20.xml,
3 / Right-click on HolidayRequest.java, run as, run configuration, user entries, advanced, add folders, select the “resources” previously created
4 / enjoy !

Erixx