Skip to content
New issue

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

HttpResponseException: Not Found (createJob) #176

Closed
garburator opened this issue Aug 16, 2016 · 3 comments
Closed

HttpResponseException: Not Found (createJob) #176

garburator opened this issue Aug 16, 2016 · 3 comments
Labels
Milestone

Comments

@garburator
Copy link

garburator commented Aug 16, 2016

Hi there,

I've been having issues with JenkinsServer.createJob(String jobName, String jobXml). When performing the action I get an http error from the validator (partial stack trace):

org.apache.http.client.HttpResponseException: Not Found at com.offbytwo.jenkins.client.validator.HttpResponseValidator.validateResponse(HttpResponseValidator.java:11) at com.offbytwo.jenkins.client.JenkinsHttpClient.get(JenkinsHttpClient.java:157) at com.offbytwo.jenkins.client.JenkinsHttpClient.getQuietly(JenkinsHttpClient.java:203) at com.offbytwo.jenkins.client.JenkinsHttpClient.post_xml(JenkinsHttpClient.java:361) at com.offbytwo.jenkins.JenkinsServer.createJob(JenkinsServer.java:334) at com.offbytwo.jenkins.JenkinsServer.createJob(JenkinsServer.java:298)

Source of the issue:
screen shot 2016-08-16 at 3 33 11 pm

The strange thing is the jobs are created.

Jenkins Client API Version: 0.3.5
Jenkins Server Version: 1.642

@khmarbaise
Copy link
Member

Can you just try using the following method in your code:

createJob(String jobName, String jobXml, Boolean crumbFlag);

like this:

createJob(job.getjobName(), job.getXML(), false);

@garburator
Copy link
Author

Thanks Karl, adding the false crumbFlag has stopped the error. Just curious as to you know why this stops the error?

@khmarbaise khmarbaise added the bug label Aug 18, 2016
@khmarbaise khmarbaise added this to the Release 0.3.6 milestone Aug 18, 2016
@khmarbaise
Copy link
Member

That's what I assumed, cause there is a bug in the code which calls with crumbFlag=true which is your case wrong...

khmarbaise added a commit that referenced this issue Aug 18, 2016
 o Followup and fix the appropriate test to use the correct
   verifier.
khmarbaise added a commit that referenced this issue Aug 18, 2016
 o Followup and fix the appropriate integration test to use
   crumbFlag=true.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants