Run OSLC Java Samples on Jazz server using OSLC client
I am trying to run RQMFormSample in org.eclipse.lyo.client.oslc.samples.
I specify these arguments in the Run Configuration
-user itrust
-password itrust1info&
-project "Adaptive Cruise Control Testing"
and I get this error
SEVERE: OSLCC002: An error occurred attempting to login to the Jazz server. Status code 401. Server location: https://jazz.net:443/preview01-qm.
org.eclipse.lyo.client.exception.JazzAuthErrorException: OSLCC002: An error occurred attempting to login to the Jazz server. Status code 401. Server location: https://jazz.net:443/preview01-qm.
at org.eclipse.lyo.client.oslc.jazz.JazzFormAuthClient.login(JazzFormAuthClient.java:200)
at org.eclipse.lyo.client.oslc.samples.RQMFormSample.main(RQMFormSample.java:104)
On debugging I found that JazzFormAuthClient is failing at the form authentication.
HttpPost securityCheck = new HttpPost(this.authUrl + "/j_security_check");
StringEntity entity = new StringEntity("j_username=" + this.user + "&j_password=" + this.password);
securityCheck.setHeader("Accept", "/");
securityCheck.setHeader("X-Requested-With", "XMLHttpRequest");
securityCheck.setEntity(entity);
securityCheck.addHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");
securityCheck.addHeader("OSLC-Core-Version", "2.0");
securityCheck.addHeader("Cookie", jsaCsrfCookie);
resp = httpClient.execute(securityCheck); //fails here
Let me know if we can run the Java sample against the Jazz set up .Does it have the right permissions.
Or what is the way to run these samples
|
Accepted answer
As far as I can tell, you cannot use this technique against the jazz.net servers - there are many servers in the jazz.net domain and some URIs are not properly exposed by the reverse proxy.
Anusuya Manohar selected this answer as the correct answer
|
2 other answers
|
Thanks Subajit for the response.
I think adapter.properties is used to configure the classes in org.eclipse.lyo.client.oslc.samples.automation package
Anyways, I tried to change the parameter values in the properties file but I get the same error.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.