It's all about the answers!

Ask a question

java.lang.Exception: Error occured while posting HTTP/1.1 403 Forbidden


KT PD (5910) | asked Jul 03 '23, 6:07 a.m.
edited Jul 05 '23, 1:11 a.m.

 Hi team,

We are using DNG 7.0.2 SR1.
We are trying OSLC workshop net.jazz.oslc.consumer.rm.client examples to get and post requirement data through java application.
We are able to run Example 1, 2 and 3, but when we are trying to create folder as per the example 4, we are gettig below error:
"java.lang.Exception: Error occurred while posting HTTP/1.1 403 Forbidden"
We are using JazzAdmin credentials in all examples.
Please assist.

Additional Information:
I am working on OSLC workshop net.jazz.oslc.consumer.rm.client.
Example 4: 
 This example demonstrates how to create a requirement resource using the Creation Factory OSLC REST API.A Jazz Team server must be started. Updated for RM v4.0 to add folder support.

Line number : 92 onwards (Step (3) : (Optional)  Create folders should only be used with RM Version 4.0 or above)

Thanks


Comments
David Honey commented Jul 03 '23, 10:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Please include the exception stacktrace. If it's not in the response, it might be logged in rm.log.


Ian Barnard commented Jul 04 '23, 7:35 a.m. | edited Jul 04 '23, 7:36 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

JazzAdmin doesn't automatically give you superpower to edit data: your user only has the permissions of the role(s) you have as a project member so check that your user has a role with permission to create folders.


Ralph Schoon commented Jul 04 '23, 7:41 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

That workshop is quite old. Lab 4 runs in Tomcat. It may well be, that the code does no longer work.
Also, the workshop has a unique numbering. Provide the step numbers you want to talk about.


Ian Barnard commented Jul 04 '23, 12:27 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Have you confirmed that your user has permission to create folders? e.g. can you create a folder manually? 


KT PD commented Jul 05 '23, 6:15 a.m.

Yes, I have permission to create the folder manually 


KT PD commented Jul 05 '23, 6:16 a.m. | edited Jul 05 '23, 6:23 a.m.

I have added additional information in the question itself regarding error .

In the same code when I checked the factory URL to create folder in RM, that will redirect to default component as it is GC enabled project area.
How can I customize the code to create the folder on required configuration.


Thanks


Ralph Schoon commented Jul 05 '23, 7:18 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 Are you using YOUR credentials? You need to check if the credentials you use in the code can do what you want to do. 

The workshop is quite old and not really maintained. Last update was 2016. 


KT PD commented Jul 05 '23, 2:30 p.m.

Hi Ralph, 
Thank you for the reply. 
I have tried to update DNG artifact links externally using Rest or OSLC APIs.
I have tried the same, so using Rest API I can able to update the created artifact but when I am trying to link the artifact with work item using implemented by or any type of link, It is not giving expected result as this linking information is saved in work item side in RTC.
using workitem.json file I can able to update it.

but, I want to update that also through DNG API side. can you please help me on it to update the artifact linking through DNG side.
Please assist.
Thanks


Ralph Schoon commented Jul 06 '23, 1:29 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Your comment here has nothing to do with the question.

My understanding is, that links between DNG artifacts and EWM or ETM or other not DNG artifacts are usually not stored in DNG to avoid to have to maintain backlinks. The Links are stored in the other application and are discovered using LQE/LDX. 

So, you can not use the DNG OSLC API to update the links. You need to use the EWM/ETM API. 

showing 5 of 9 show 4 more comments

Be the first one to answer this question!


Register or to post 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.