You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ctakes.apache.org by "Finan, Sean" <Se...@childrens.harvard.edu> on 2021/01/13 15:26:45 UTC

Re: Running PiperGui produces authentication error [EXTERNAL]

Hi Eugenia,

The authentication code in trunk is not exactly the same as Peter's original code.  I tried to simplify things so that the user does not need to make any url changes.  

If the url specified in the dictionary properties xml is the old umls user/pass rest url then the new code automatically ignores it and uses the current api key url.  

IF the user has specified a url that is other than the old url and other than the new url, then that url IS used on the assumption that the user has specified some proxy such as a local stub/mock server or an institutional proxy server required for external network access etc. 

I went with the "allow but ignore old url" so that users can download the dictionary as-is and not worry about editing the xml.  That also meant that I didn't need to go through all of the dictionaries, modify their xmls and check in the updates.

So my advice is to start over without any changes to your xml file.  Specify the --key parameter on your command line or specify the  umlsKey parameter in your piper file.  Nothing else should be required.  The old url will be ignored, as will any old user and password combination.  One key to rule them all.

Peter provided some excellent code and I think that once everybody makes a minor change they will find the new workflow much better and easier than the old.

Meanwhile, I am still fighting with maven central/nexus to get our 4.0.0.1 patch release hosted.  As long as you are using trunk you are fine.

Sean

________________________________________
From: Monogyiou, Eugenia <Eu...@nttdata.com>
Sent: Friday, January 8, 2021 4:29 PM
To: dev@ctakes.apache.org
Subject: RE: Running PiperGui produces authentication error [EXTERNAL]

* External Email - Caution *


Apologies for the blanket email pressed send too soon.

So additionally to the points below I did locate the cli parameters in the DictionarySubPipe.piper file , I removed them so they are not loaded at all. I tried again after that with the umlsURL value set to null and once more I got the same error. Attached the version using the entry of the URL set to null value only , no vendor or credentials

Many thanks for your patience and support,

Kind Regards,

Eugenia Monogyiou | NTT Data UK
Consulting & IT Solutions Ltd. 1 Royal Exchange, London EC3V 3DG

Mob: +44 (0)7971623683 Email: eugenia.monogyiou@nttdata.com


-----Original Message-----
From: Monogyiou, Eugenia <Eu...@nttdata.com>
Sent: 08 January 2021 21:18
To: dev@ctakes.apache.org
Subject: RE: Running PiperGui produces authentication error

Hi,

I tried your suggestion Peter but I guess I am still missing something because I am getting the same error . I am attaching the xml where I re-added the parameters and replaced with null values as below

          <property key="umlsVendor" value=""/>
          <property key="umlsUser" value=""/>
          <property key="umlsPass" value=""/>

I also tried removing all but the URL entry with an empty value : <property key="umlsUrl" value=""/>  : Same error in both cases.

Also to note that when I load the piper file the cli parameters umlsuser and umlspwd are also loaded on the left (without a default value though) . I am not sure why that is --where are those CLI parameters drawn from? I tried setting them with umlsuser =umls_api_key  umlspwd ="<my api key here>" but to no avail!

Thank you,

Kind Regards,

Eugenia Monogyiou | NTT Data UK
Consulting & IT Solutions Ltd. 1 Royal Exchange, London EC3V 3DG

Mob: +44 (0)7971623683 Email: eugenia.monogyiou@nttdata.com


-----Original Message-----
From: Peter Abramowitsch <pa...@gmail.com>
Sent: 08 January 2021 20:06
To: dev@ctakes.apache.org
Subject: Re: Running PiperGui produces authentication error

Hi Eugenia
Yes you need to set the url value to "" in the sno_rx.xml

The system still maintains the ability to give an alternate URL as we do in our installation where we've created a proxy process, but it sounds like
you need your instance of cTakes to contact the uts site directly.   In
your case, cTakes is treating the old url in your file as the alternate url.

So remove that URL definition in your sno_rx.xml  and it will now point to
the correct url which is:   https://urldefense.proofpoint.com/v2/url?u=https-3A__utslogin.nlm.nih.gov_cas_v1_api-2Dkey&d=DwIGaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=uZua5jAlW4moM6ExVxVuasoBdXcFDPmjrRgK5F7H8Qk&s=h-ljCCMzqWzOu8b5d0OGHfEtbDRGmvcaJ_K-W0DDw_g&e=  and
is hard wired into the code module.  You don't need to define it anywhere

Peter



Peter

On Fri, Jan 8, 2021 at 8:05 PM Monogyiou, Eugenia < Eugenia.Monogyiou@nttdata.com> wrote:

> Hi ,
>
> Thanks for the prompt response.
> (First of all please ignore the contextAnnotator error: classpath was
> not applied when "use of module" etc. restart , apply etc. sorted that out).
> Now on to the authentication error
>
> When I look into the following files I cannot find any vendor,
> umlsuser, umlspw and umlsaddr values to set to an empty string.
>
> 1.resources/org/apache/ctakes/dictionary/lookup/fast/*.xml   or
>
> 2.desc/ctakes-dictionary-lookup/desc/analysis_engine/DictionaryLookupA
> nnotatorUMLS.xml
>
> 3.desc/ctakes-side-effect/desc/analysis_engine/DictionaryLookupAnnotat
> or_sideEffectUMLS.xml
> 4.
> desc/ctakes-clinical-pipeline/desc/analysis_engine/auto/defaultPipelin
> e.xml
>
> However when I check the sno_rx_16ab.xml I do find the following which
> I removed entirely :
>
> <property key="umlsUrl" value="
> https://urldefense.proofpoint.com/v2/url?u=https-3A__uts-2Dws.nlm.nih.gov_restful_isValidUMLSUser-2522_&d=DwIGaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=uZua5jAlW4moM6ExVxVuasoBdXcFDPmjrRgK5F7H8Qk&s=8IHycMwexMnuWoWa8gj648n9ANrb8ZvcovnxkqxK-vo&e= >
>          <property key="umlsVendor" value="NLM-6515182895"/>
>          <property key="umlsUser" value="CHANGE_ME"/>
>          <property key="umlsPass" value="CHANGE_ME"/>
>
> The error I get :
> [...] Using dictionary descriptor
> org/apache/ctakes/dictionary/lookup/fast/ sno_rx_16ab.xml Using
> alternate umlsURL found via : properties Checking UMLS account at
> https://urldefense.proofpoint.com/v2/url?u=https-3A__uts-2Dws.nlm.nih.gov_restful_isValidUMLSUser-2522_&d=DwIGaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=uZua5jAlW4moM6ExVxVuasoBdXcFDPmjrRgK5F7H8Qk&s=8IHycMwexMnuWoWa8gj648n9ANrb8ZvcovnxkqxK-vo&e= >   UMLS account at
> https://urldefense.proofpoint.com/v2/url?u=https-3A__uts-2Dws.nlm.nih.gov_restful_isValidUMLSUser-2522_&d=DwIGaQ&c=qS4goWBT7poplM69zy_3xhKwEW14JZMSdioCoppxeFU&r=fs67GvlGZstTpyIisCYNYmQCP6r0bcpKGd4f7d4gTao&m=uZua5jAlW4moM6ExVxVuasoBdXcFDPmjrRgK5F7H8Qk&s=8IHycMwexMnuWoWa8gj648n9ANrb8ZvcovnxkqxK-vo&e= > is not valid.
> Verify you are setting command line etc. etc. for umlsuser and umlspwd
> correctly Initialization of annotator class
> org.apache.ctakes.dictionary.lookup2.ae.DefaultJCasTermAnnotator
> failed
>
> Any ideas please? Many thanks for your assistance
>
> Kind Regards,
>
> Eugenia Monogyiou | NTT Data UK
> Consulting & IT Solutions Ltd. 1 Royal Exchange, London EC3V 3DG
>
> Mob: +44 (0)7971623683 Email: eugenia.monogyiou@nttdata.com
>
>
> -----Original Message-----
> From: Peter Abramowitsch <pa...@gmail.com>
> Sent: 08 January 2021 18:47
> To: dev@ctakes.apache.org
> Subject: Re: Running PiperGui produces No Analysis Component found for
> ContextDependentTokenizerAnnotator error
>
> Hi Eugenia
>
> Not sure if Sean has changed this part of the code that I had checked
> in, I'm still using my original check-in.  So there may be a small
> alignment issue if you are using his newer version and my original instructions.
>
> Raising the level of log4j to DEBUG, the UmlsUserValidator module should
> report where it is getting the credentials from.     So that should show
> you if there are any "rogue" credentials that are being read in favor of
> your environment variable.   Make sure also that the URL fields in those
> XML files are also nulled out in case they still contain the old UTS url.
> The validator module will supply the correct URL unless you need to
> override it.
>
> Let us know the exact value of the variable(s) you are supplying.  If,
> for instance, you have a left-over UMLSUSER variable and it still has
> your old value, that would be a problem.  If you do have it, its value
> must be the string  "umls_api_key"  and the password variable would
> contain the key itself.
>
> Regards
> Peter
>
>
>
>
> On Fri, Jan 8, 2021 at 4:44 PM Monogyiou, Eugenia <
> Eugenia.Monogyiou@nttdata.com> wrote:
>
> > Hello,
> >
> > Sean is probably very busy with the release so if anyone else could
> > please provide any guidance on the below would very much appreciated
> > as I am working on a tight deadline at the moment :(
> >
> > I switched recently to Intellij and I no longer encountering all the
> > weird maven plugin errors produced with Eclipse - however I have not
> > been able to run the Gui successfully yet.
> >
> > 1.       I got the code from the latest trunk and I do not seem to have
> > any password/ username to remove from any xml files (am I missing
> > something?) I have set an environment variable with the api key
> >
> > 2.       I run the PiperRunnerGui by navigating to
> > \ctakes-gui\src\main\java\org\apache\ctakes\gui\pipeline\PiperRunner
> > Gu i , right-click and run successfully (no run configuration set)
> >
> > 3.       I navigate to
> > \ctakes-clinical-pipeline-res\src\main\resources\org\apache\ctakes\c
> > li nical\pipeline\ and I load the DefaultFastPipeline.piper
> >
> > 4.       First of all I had to copy here all the required subPipe files
> in
> > the directory before the file was load successfully - I am not sure
> > this is default behaviour or I am missing config
> >
> > 5.       and then when I attempted to run, it failed immediately with
> > org.apache.uima.resource.ResourceInitializationException: MESSAGE
> > LOCALIZATION FAILED: Can't find resource for bundle
> > java.util.PropertyResourceBundle, key No Analysis Component found
> > for ContextDependentTokenizerAnnotator
> >
> > Adding dependencies to the clinical pipeline and/or ctakes-gui pom
> > file did not help.
> >
> > Many sincere thanks in advance,
> >
> >
> > Kind Regards,
> >
> > Eugenia Monogyiou | NTT Data UK
> > Consulting & IT Solutions Ltd. 1 Royal Exchange, London EC3V 3DG
> >
> > Mob: +44 (0)7971623683 Email: eugenia.monogyiou@nttdata.com<mailto:
> > eugenia.monogyiou@nttdata.com>
> >
> > Disclaimer: This email and any attachments are sent in strictest
> > confidence for the sole use of the addressee and may contain legally
> > privileged, confidential, and proprietary data. If you are not the
> > intended recipient, please advise the sender by replying promptly to
> > this email and then delete and destroy this email and any
> > attachments without any further use, copying or forwarding.
> >
> Disclaimer: This email and any attachments are sent in strictest
> confidence for the sole use of the addressee and may contain legally
> privileged, confidential, and proprietary data. If you are not the
> intended recipient, please advise the sender by replying promptly to
> this email and then delete and destroy this email and any attachments
> without any further use, copying or forwarding.
>
Disclaimer: This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding.
Disclaimer: This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding.