Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Lyo » DoorsOauthSample - Unable to get the Entity of the Resource Shape for Requirements(Unable to get the Entity of the Resource Shape for Requirements)
DoorsOauthSample - Unable to get the Entity of the Resource Shape for Requirements [message #1124001] Thu, 03 October 2013 04:53 Go to next message
Rachita Sakibanda is currently offline Rachita SakibandaFriend
Messages: 9
Registered: September 2013
Junior Member
Hi,

I am currently going through the DoorsOauthSample.java example to understand how it works and have come across a problem where I am not able to get the entity details for Resource Shape (this process occurs in RmUtil.java).

In DoorsOauthSample there are lines that gets the catalog, service provider, requirement creation factory and then requirement shape url. Its the last part where the error is happening. The lines where error is occuring is as follows:

[typeURI value is ......./dwa/rm/oslc/shape/requirement......, which looks correct]

-> response = client.getResource(typeURI.toString(),OSLCConstants.CT_RDF);
-> ResourceShape resourceShape = response.getEntity(ResourceShape.class);

When the first line runs, the reponse has some entity value but the message displayed is "Internal Server Error" and the status is "500".

When the second line runs, the resourceShape value is set to null.

I just wanted to find out if any body else has had this problem with the DoorsOauthSample example and if so then would you be able to provide some help.

Thanks.

Your help would be much appreciated Smile.

Kind Regards,
Rachita Sakibanda
Re: DoorsOauthSample - Unable to get the Entity of the Resource Shape for Requirements [message #1124359 is a reply to message #1124001] Thu, 03 October 2013 13:02 Go to previous messageGo to next message
Maeve OReilly is currently offline Maeve OReillyFriend
Messages: 13
Registered: October 2013
Junior Member
Hi Rachita,

I did get it running with DOORS 9.5. I had trouble with earlier versions. You are passing a module name to it, not a project? These were my parameters:

-url link_to_dwa -user Administrator -password Password123 -project myModule

The -project is a bit confusing; it wants a module not a project.

I would also suggest you look in your <DOORS Web Access install>/server/festival/logs. There is pretty good logging for any OSLC requests there; might give you more detail. The logging level can be increased by going to festival/config and swapping the log4j.support with the log4j.xml and restarting DWA.

There was a defect with http 500s occurring after numerous OSLC requests. Restarting 'fixes' it. It is properly fixed in 9.5.1.2 so if all else fails, try that - I would give you link but I am not allowed. Google fix central site:ibm.com.

HTH,
Maeve
Re: DoorsOauthSample - Unable to get the Entity of the Resource Shape for Requirements [message #1124764 is a reply to message #1124359] Thu, 03 October 2013 22:10 Go to previous messageGo to next message
Rachita Sakibanda is currently offline Rachita SakibandaFriend
Messages: 9
Registered: September 2013
Junior Member
Hi Maeve,

Yep I am definitely passing a module as I understood at the start that it's the module it requires Smile.

I will check the logs to see if that helps, hopefully I find the source of the problem Sad.

Thanks for your help though Smile. Much appreciated Smile.

Kind regards,
Rachita Sakibanda
Re: DoorsOauthSample - Unable to get the Entity of the Resource Shape for Requirements [message #1129740 is a reply to message #1124359] Tue, 08 October 2013 23:35 Go to previous messageGo to next message
Rachita Sakibanda is currently offline Rachita SakibandaFriend
Messages: 9
Registered: September 2013
Junior Member
Hi,

Its me again Smile.

I did look at the logs and found errors saying:

...Null Authentication...
...authentication.UsernameRequiredException: A username is required...
...FAILED_USERNAME_REQUIRED...

I am unsure as to why it is giving this error as I am able to get the catalog URL, Service URL and Requirements creation factory URL so that means Oauth should be working fine right?

Also the webContextUrl that i am passing is http not https, could this be causing the problem with Oauth as DWA is not secure??

Any help would be greatly appreciated! I really want to get this sample working Smile!

Thanks.

Kind Regards,
Rachita Sakibanda
Re: DoorsOauthSample - Unable to get the Entity of the Resource Shape for Requirements [message #1130331 is a reply to message #1129740] Wed, 09 October 2013 12:54 Go to previous messageGo to next message
Maeve OReilly is currently offline Maeve OReillyFriend
Messages: 13
Registered: October 2013
Junior Member
Hi Rachita,

what is the exact version of DWA in use? http should work, but it's possible there is a problem.

Maeve
Re: DoorsOauthSample - Unable to get the Entity of the Resource Shape for Requirements [message #1130670 is a reply to message #1130331] Wed, 09 October 2013 20:32 Go to previous messageGo to next message
Rachita Sakibanda is currently offline Rachita SakibandaFriend
Messages: 9
Registered: September 2013
Junior Member
Hi,

The version of DWA is 9.5.

Thanks,
Rachita
Re: DoorsOauthSample - Unable to get the Entity of the Resource Shape for Requirements [message #1130852 is a reply to message #1130670] Thu, 10 October 2013 01:09 Go to previous messageGo to next message
Rachita Sakibanda is currently offline Rachita SakibandaFriend
Messages: 9
Registered: September 2013
Junior Member
The exact version is 9.5.0.0.

Thanks,
Rachita
Re: DoorsOauthSample - Unable to get the Entity of the Resource Shape for Requirements [message #1131781 is a reply to message #1130852] Thu, 10 October 2013 20:03 Go to previous messageGo to next message
Maeve OReilly is currently offline Maeve OReillyFriend
Messages: 13
Registered: October 2013
Junior Member
hi Rachita,

I have 9.5.1 and I see now when I run the sample I'm getting a http 401 at the end. But it's a long time since I looked at it and it seems I modified the sample a lot. I'll try to spend some time on it tomorrow.

Maeve
Re: DoorsOauthSample - Unable to get the Entity of the Resource Shape for Requirements [message #1131787 is a reply to message #1131781] Thu, 10 October 2013 20:10 Go to previous messageGo to next message
Rachita Sakibanda is currently offline Rachita SakibandaFriend
Messages: 9
Registered: September 2013
Junior Member
Thanks Smile.

But are you able to get the resource shape entity without internal sever error 500 as that's where I am getting the error Sad.

Thanks once again, I just want to get the sample working so I can use it to do other work Smile.

Kind regards,
Rachita
Re: DoorsOauthSample - Unable to get the Entity of the Resource Shape for Requirements [message #1132802 is a reply to message #1131787] Fri, 11 October 2013 11:55 Go to previous messageGo to next message
Maeve OReilly is currently offline Maeve OReillyFriend
Messages: 13
Registered: October 2013
Junior Member
Yes, true I do not have 500s. And I know there is a defect in 9500 where the result is http 500s where it should succeed (200). Try DWA 9.5.1.2 - you'll get it under DOORS on ibm fix central.
Re: DoorsOauthSample - Unable to get the Entity of the Resource Shape for Requirements [message #1132915 is a reply to message #1132802] Fri, 11 October 2013 13:27 Go to previous messageGo to next message
Maeve OReilly is currently offline Maeve OReillyFriend
Messages: 13
Registered: October 2013
Junior Member
Ok, I re-installed Eclipse and the client stuff and it's working for me. Actually it is better than the last time I ran it as now it is creating objects in DOORS, so I think a really useful sample.
I did nothing - added no code except modify of the consumer key/secret.
I'm on 9.5.1 but I would expect 9.5.1.2 to work also. The 500 issue is fixed on both of those.
Re: DoorsOauthSample - Unable to get the Entity of the Resource Shape for Requirements [message #1134304 is a reply to message #1132915] Sat, 12 October 2013 11:45 Go to previous messageGo to next message
Rachita Sakibanda is currently offline Rachita SakibandaFriend
Messages: 9
Registered: September 2013
Junior Member
Thanks, I will try that version and see how it goes Smile.

Are you able to see the xml content from the REST of Firefox?

I tried it (used the oauth feature) but got 401 unauthorised error so I was unable to see the xml info from the front end (wanting to see it to see the URL links).

Have you used it before?

Thanks.

Kind regards,
Rachita
Re: DoorsOauthSample - Unable to get the Entity of the Resource Shape for Requirements [message #1137265 is a reply to message #1134304] Mon, 14 October 2013 11:18 Go to previous message
Maeve OReilly is currently offline Maeve OReillyFriend
Messages: 13
Registered: October 2013
Junior Member
Hi Rachita,

no, I've never succeeded getting to DWA via RESTClient/Poster etc. oAuth too much of a stumbler for me. I did see Mike did a tutorial on it, but it takes more patience than I seem to possess. Look for 'Doing the OAuth Dance using your browser' on youtube, by OpenServicesDotNet. I'm preferring lyo doing it for me.

Have fun,
Maeve
Previous Topic:Value for an Oauth client in DoorsOauthSample by Lyo
Next Topic:How control the verbosity of the rdf?
Goto Forum:
  


Current Time: Thu Apr 18 10:11:01 GMT 2024

Powered by FUDForum. Page generated in 0.05187 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top