jenkinsci / jenkinsci/java-client-api
Forbiddeden exception while calling createJob()
- Lenguaje dominante
- Java
- Estrellas
- 913
- Forks
- 466
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hey , I am getting this issue using 0.3.8 version of this maven dependency.
I am able to get the all job from jenkins server and also job details. However, when I am trying to create a new job by using
```
config.xml :
test job from java api
false
true
false
false
false
false
**XXX
Jenkins-Crumb**
```
and then
```
try {
jServer.createJob("test-job", "src/main/resources/config.xml",true);
}catch(Exception e) {
e.printStackTrace();
}
```
I am getting below error
```
Error :
org.apache.http.client.HttpResponseException: Forbidden
at com.offbytwo.jenkins.client.validator.HttpResponseValidator.validateResponse(HttpResponseValidator.java:11)
at com.offbytwo.jenkins.client.JenkinsHttpClient.post_xml(JenkinsHttpClient.java:375)
at com.offbytwo.jenkins.JenkinsServer.createJob(JenkinsServer.java:389)
at com.offbytwo.jenkins.JenkinsServer.createJob(JenkinsServer.java:359)
at com.xxx.App.main(App.java:34)
```
Guía de contribución
Línea de trabajo
Start with JenkinsServer.createJob in JenkinsServer.java and follow its request through JenkinsHttpClient.post_xml and HttpResponseValidator.validateResponse. Inspect the supplied config.xml and App.java call, then reproduce the Forbidden response against the stated dependency version. Done means the rejection cause is identified and createJob has a verified expected outcome or a clearly documented limitation.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- api
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 30/100