Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » Reference online .setup file with authentication
Reference online .setup file with authentication [message #1576617] Wed, 21 January 2015 12:16 Go to next message
Daniel K. is currently offline Daniel K.Friend
Messages: 14
Registered: August 2014
Location: Stuttgart
Junior Member
Hi,
we want to reference in the second step our .setup file located on a web server.
This server is protected using BasicAuthentication, which causes a problem.
We are not able to reference it, only in the case if it is downloaded to the local machine.
How can we reference the online protected .setup file directly?

Regards
Daniel
Re: Reference online .setup file with authentication [message #1576744 is a reply to message #1576617] Wed, 21 January 2015 13:53 Go to previous messageGo to next message
Lothar Wendehals is currently offline Lothar WendehalsFriend
Messages: 4
Registered: July 2009
Junior Member
The problem only occurs when accessing a setup file on a secure url. Oomph throws the following exception:

!ENTRY org.eclipse.oomph.base 4 0 2015-01-21 14:39:56.805
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl$AuthorizationHandlerImpl.reauthorize(ECFURIHandlerImpl.java:271)
at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.createInputStream(ECFURIHandlerImpl.java:525)
at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1269)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$ResourceLocator.demandLoadHelper(ResourceSetImpl.java:804)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$MappedResourceLocator.getResource(ResourceSetImpl.java:1204)
at org.eclipse.oomph.setup.internal.core.util.SetupCoreUtil$1.getResource(SetupCoreUtil.java:256)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:352)
at org.eclipse.oomph.base.util.BaseUtil.loadResourceSafely(BaseUtil.java:52)
at org.eclipse.oomph.setup.ui.wizards.ProjectPage$2$1.processResources(ProjectPage.java:342)
at org.eclipse.emf.common.ui.dialogs.ResourceDialog.okPressed(ResourceDialog.java:372)
at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:466)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4354)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
at org.eclipse.jface.window.Window.open(Window.java:803)
at org.eclipse.oomph.setup.ui.wizards.ProjectPage$2.widgetSelected(ProjectPage.java:462)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4354)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
at org.eclipse.jface.window.Window.open(Window.java:803)
at org.eclipse.oomph.setup.internal.installer.InstallerDialog.show(InstallerDialog.java:334)
at org.eclipse.oomph.setup.internal.installer.InstallerApplication.run(InstallerApplication.java:203)
at org.eclipse.oomph.setup.internal.installer.InstallerApplication.start(InstallerApplication.java:259)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)

It works fine with a URL that doesn't need authentication.
Re: Reference online .setup file with authentication [message #1578599 is a reply to message #1576744] Thu, 22 January 2015 13:51 Go to previous messageGo to next message
Lothar Wendehals is currently offline Lothar WendehalsFriend
Messages: 4
Registered: July 2009
Junior Member
I created a bugzilla issue, bug id: 458137
Re: Reference online .setup file with authentication [message #1578831 is a reply to message #1578599] Thu, 22 January 2015 16:42 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6692
Registered: July 2009
Senior Member
Am 22.01.2015 um 14:51 schrieb Lothar Wendehals:
> I created a bugzilla issue, bug id: 458137
I hope I fixed it ;-)

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: Reference online .setup file with authentication [message #1580020 is a reply to message #1578831] Fri, 23 January 2015 08:25 Go to previous messageGo to next message
Lothar Wendehals is currently offline Lothar WendehalsFriend
Messages: 4
Registered: July 2009
Junior Member
Yes, it works fine. Thank you for your fast response.
Re: Reference online .setup file with authentication [message #1580278 is a reply to message #1580020] Fri, 23 January 2015 11:46 Go to previous messageGo to next message
Daniel K. is currently offline Daniel K.Friend
Messages: 14
Registered: August 2014
Location: Stuttgart
Junior Member
Hi,
yes it is working now with the newest version.
Thanks for the fast fix.

Regards
Daniel
Re: Reference online .setup file with authentication [message #1740809 is a reply to message #1580278] Thu, 18 August 2016 16:26 Go to previous messageGo to next message
Peter Luthardt is currently offline Peter LuthardtFriend
Messages: 43
Registered: February 2014
Member
Hope I am not out of topic,

I want to access my project.setup from our svn with a url like:

https://157.163.26.183:8443/!/#TNT/view/head/TNT/trunk/tnt/tnt-oomphsetup/TNTSecureNexus.setup

But nothing happens. I do not see anything in the log, and no popup appears!
Re: Reference online .setup file with authentication [message #1740885 is a reply to message #1740809] Fri, 19 August 2016 11:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
I think my NNTP posted answers are lost. I'll try to web forum:


Peter,

There is logic in ECFURIHandlerImpl for authorization:

if (authorizatonHandler != null)
{
if (errorCode == HttpURLConnection.HTTP_UNAUTHORIZED || API_GITHUB_HOST.equals(getHost(uri)) && errorCode == HttpURLConnection.HTTP_NOT_FOUND)
{
if (authorization == null)
{
authorization = authorizatonHandler.authorize(uri);
if (authorization.isAuthorized())
{
--i;
continue;
}
}

You're not being prompted for a user name and password? That's what I would expect. I have used this with setups that require authentication, but I think it depends a bit on what kind of authentication the server requires.

There's also -Doomph.setup.ecf.trace=true which you could try to find out more what's going on. It prints to stdout...


On 16.08.2016 16:14, Peter Luthardt wrote:
> Hello,
>
> I am an OOMPH beginner and I got stuck. I have create some project setups which I add to the user project by providing there url.
>
> If I use a url which does not require authentication everything works fine, but now we have switched to a secure nexus and the setups are not accessible any more.
> I get this exception in the log when trying to access the file directly:
> Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://depvnx01/nexus/service/local/repositories/snapshots/content/...
> at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)
> at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
> at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
> at org.eclipse.ecf.provider.filetransfer.retrieve.UrlConnectionRetrieveFileTransfer.getDecompressedStream(UrlConnectionRetrieveFileTransfer.java:552)
> at org.eclipse.ecf.provider.filetransfer.retrieve.UrlConnectionRetrieveFileTransfer.openStreams(UrlConnectionRetrieveFileTransfer.java:322)
> ... 49 more When I use the redirection url (https://depvnx01/nexus/service/local/artifact/maven/redirect?r=public&g=...&a=..&v=LATEST&e=setup)I get no exception and nothing happens.
>
> The best way would be to access the setup from our svn server, but here I need authentication, too
> Could you please give me a hint where to look. Or do I use the wrong approach?
> Thanks.



Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Reference online .setup file with authentication [message #1741250 is a reply to message #1740885] Wed, 24 August 2016 07:36 Go to previous messageGo to next message
Peter Luthardt is currently offline Peter LuthardtFriend
Messages: 43
Registered: February 2014
Member
Thank you for your answer.

I have switched on the trace now I can see an exception:
org.eclipse.oomph.util.IORuntimeException: java.lang.IllegalArgumentException: invalid segment: https___svnhost.mhp.dev_8443_!_#TransportEmulator_view_head_emulator_trunk_emulator_eclipse-setup_Emulator.setup
        at org.eclipse.oomph.base.util.BaseUtil.loadResourceSafely(BaseUtil.java:96)
        at org.eclipse.oomph.setup.ui.wizards.ProjectPage$AddUserProjectDialog.processResources(ProjectPage.java:1910)
        at org.eclipse.emf.common.ui.dialogs.ResourceDialog.okPressed(ResourceDialog.java:372)
        at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:466)
        at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
        at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
        at org.eclipse.jface.window.Window.open(Window.java:803)
        at org.eclipse.oomph.setup.ui.wizards.ProjectPage$2.widgetSelected(ProjectPage.java:258)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
        at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
        at org.eclipse.jface.window.Window.open(Window.java:803)
        at org.eclipse.oomph.setup.internal.installer.InstallerDialog.show(InstallerDialog.java:373)
        at org.eclipse.oomph.setup.internal.installer.InstallerApplication.run(InstallerApplication.java:196)
        at org.eclipse.oomph.setup.internal.installer.InstallerApplication.start(InstallerApplication.java:296)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
Caused by: java.lang.IllegalArgumentException: invalid segment: https___svnhost.mhp.dev_8443_!_#TransportEmulator_view_head_emulator_trunk_emulator_eclipse-setup_Emulator.setup
        at org.eclipse.emf.common.util.URI$URIPool$URIComponentsAccessUnit.getInternalizedValue(URI.java:1866)
        at org.eclipse.emf.common.util.URI$URIPool$URIComponentsAccessUnit.getInternalizedValue(URI.java:1)
        at org.eclipse.emf.common.util.Pool.doIntern(Pool.java:932)
        at org.eclipse.emf.common.util.URI$URIPool.intern(URI.java:1979)
        at org.eclipse.emf.common.util.URI$Hierarchical.appendSegment(URI.java:4163)
        at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.getCacheFile(ECFURIHandlerImpl.java:804)
        at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.createInputStream(ECFURIHandlerImpl.java:470)
        at org.eclipse.emf.ecore.resource.impl.URIHandlerImpl.contentDescription(URIHandlerImpl.java:286)
        at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.contentDescription(ExtensibleURIConverterImpl.java:372)
        at org.eclipse.emf.ecore.resource.impl.ResourceFactoryRegistryImpl.getContentTypeIdentifier(ResourceFactoryRegistryImpl.java:157)
        at org.eclipse.emf.ecore.resource.impl.ResourceFactoryRegistryImpl.getFactory(ResourceFactoryRegistryImpl.java:123)
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$2.delegatedGetFactory(ResourceSetImpl.java:459)
        at org.eclipse.emf.ecore.resource.impl.ResourceFactoryRegistryImpl.getFactory(ResourceFactoryRegistryImpl.java:144)
        at org.eclipse.emf.ecore.resource.impl.ResourceFactoryRegistryImpl.getFactory(ResourceFactoryRegistryImpl.java:85)
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.createResource(ResourceSetImpl.java:431)
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandCreateResource(ResourceSetImpl.java:243)
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$ResourceLocator.demandCreateResource(ResourceSetImpl.java:772)
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$MappedResourceLocator.getResource(ResourceSetImpl.java:1199)
        at org.eclipse.oomph.setup.internal.core.util.SetupCoreUtil$1.getResource(SetupCoreUtil.java:306)
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:352)
        at org.eclipse.oomph.base.util.BaseUtil.loadResourceSafely(BaseUtil.java:86)
        ... 36 more


What is wrong with this url? In Browser it works.
The original I entered was (https://svnhost.mhp.dev:8443/!/#TransportEmulator/view/head/emulator/trunk/emulator/eclipse-setup/Emulator.setup)
Re: Reference online .setup file with authentication [message #1741254 is a reply to message #1741250] Wed, 24 August 2016 08:05 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Yes, this URL looks problematic:

https://svnhost.mhp.dev:8443/!/#TransportEmulator/view/head/emulator/trunk/emulator/eclipse-setup/Emulator.setup

Firstly, org.eclipse.oomph.util.IOUtil.encodeFileName(String) doesn't convert/replace the # character, so it doesn't produce a valid segment in the file: URI that's being created by getCacheFile. Please open a Bugzilla for that.

But it's further problematic because EMF will want to append #/ to it to create a reference to the root Project instance in that resource. But the first # in the URI is the start of the fragment, whereas you're already using the fragment to reference the resource itself.

The following would avoid this problem:

https://svnhost.mhp.dev:8443/!/%23TransportEmulator/view/head/emulator/trunk/emulator/eclipse-setup/Emulator.setup

But I'm not sure the server will interpret this correctly. Hopefully it will, because in the end, you can't use a fragment to refer to a resource and then use another fragment beyond that to refer to contents within the resource, so the first one really does need to be encoded...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Reference online .setup file with authentication [message #1741267 is a reply to message #1741254] Wed, 24 August 2016 09:37 Go to previous messageGo to next message
Peter Luthardt is currently offline Peter LuthardtFriend
Messages: 43
Registered: February 2014
Member
Thank you,

I was able to change the url to : https://SVNHOST.MHP.DEV:8443/svn/TransportEmulator/emulator/trunk/emulator/eclipse-setup/Emulator.setup (This looks much cleaner)
But now I get only prompted that the URI does not contain a valid project. (No Trace no log)
Re: Reference online .setup file with authentication [message #1741383 is a reply to message #1741267] Wed, 24 August 2016 15:15 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Does the URL yield raw XML, as opposed to some type of HTML wrapper around the XML?

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Reference online .setup file with authentication [message #1742052 is a reply to message #1740809] Thu, 18 August 2016 16:48 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Peter,

Didn't I answer this like this last time? Where are you accessing
this? Have you tried this trace flag with the installer or IDE (and of
course redirecting stdout to a file so you can review it)?


There is logic in ECFURIHandlerImpl for authorization:

if (authorizatonHandler != null)
{
if (errorCode == HttpURLConnection.HTTP_UNAUTHORIZED ||
API_GITHUB_HOST.equals(getHost(uri)) && errorCode ==
HttpURLConnection.HTTP_NOT_FOUND)
{
if (authorization == null)
{
authorization = authorizatonHandler.authorize(uri);
if (authorization.isAuthorized())
{
--i;
continue;
}
}

You're not being prompted for a user name and password? That's what I
would expect. I have used this with setups that require
authentication, but I think it depends a bit on what kind of
authentication the server requires.

There's also -Doomph.setup.ecf.trace=true which you could try to find
out more what's going on. It prints to stdout...


On 16.08.2016 16:14, Peter Luthardt wrote:
> Hello,
>
> I am an OOMPH beginner and I got stuck. I have create some project
> setups which I add to the user project by providing there url.
>
> If I use a url which does not require authentication everything works
> fine, but now we have switched to a secure nexus and the setups are
> not accessible any more.
> I get this exception in the log when trying to access the file directly:
> Caused by: java.io.IOException: Server returned HTTP response code:
> 401 for URL:
> https://depvnx01/nexus/service/local/repositories/snapshots/content/...
> at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)
> at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
> at
> sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
> at
> org.eclipse.ecf.provider.filetransfer.retrieve.UrlConnectionRetrieveFileTransfer.getDecompressedStream(UrlConnectionRetrieveFileTransfer.java:552)
> at
> org.eclipse.ecf.provider.filetransfer.retrieve.UrlConnectionRetrieveFileTransfer.openStreams(UrlConnectionRetrieveFileTransfer.java:322)
> ... 49 more When I use the redirection url
> (https://depvnx01/nexus/service/local/artifact/maven/redirect?r=public&g=...&a=..&v=LATEST&e=setup)I
> get no exception and nothing happens.
>
> The best way would be to access the setup from our svn server, but
> here I need authentication, too
> Could you please give me a hint where to look. Or do I use the wrong
> approach?
> Thanks.


On 18.08.2016 18:26, Peter Luthardt wrote:
> Hope I am not out of topic,
>
> I want to access my project.setup from our svn with a url like:
>
> https://157.163.26.183:8443/!/#TNT/view/head/TNT/trunk/tnt/tnt-oomphsetup/TNTSecureNexus.setup
>
>
> But nothing happens. I do not see anything in the log, and no popup
> appears!


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Reference online .setup file with authentication [message #1748454 is a reply to message #1741383] Wed, 23 November 2016 10:02 Go to previous messageGo to next message
Peter Luthardt is currently offline Peter LuthardtFriend
Messages: 43
Registered: February 2014
Member
Sorry for the delay, but I had other things to do.
I did not solve the problem, but managed to copy the setup files to a share. This is not nice but it works.
By now I found the trace.
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.oomph.util.IOExceptionWithCause: Exception connecting to https://svnhost.mhp.dev:8443/svn/TransportEmulator/emulator/trunk/emulator/eclipse-setup/Emulator.setup.
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$ResourceLocator.demandLoadHelper(ResourceSetImpl.java:804)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$MappedResourceLocator.getResource(ResourceSetImpl.java:1204)
	at org.eclipse.oomph.setup.internal.core.util.SetupCoreUtil$1.getResource(SetupCoreUtil.java:306)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:352)
	at org.eclipse.oomph.base.util.BaseUtil.loadResourceSafely(BaseUtil.java:86)
	at org.eclipse.oomph.setup.ui.wizards.ProjectPage$AddUserProjectDialog.processResources(ProjectPage.java:1910)
	at org.eclipse.emf.common.ui.dialogs.ResourceDialog.okPressed(ResourceDialog.java:372)
	at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:466)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:619)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
	at org.eclipse.jface.window.Window.open(Window.java:803)
	at org.eclipse.oomph.setup.ui.wizards.ProjectPage$2.widgetSelected(ProjectPage.java:258)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
	at org.eclipse.jface.window.Window.open(Window.java:803)
	at org.eclipse.oomph.setup.internal.installer.InstallerDialog.show(InstallerDialog.java:373)
	at org.eclipse.oomph.setup.internal.installer.InstallerApplication.run(InstallerApplication.java:196)
	at org.eclipse.oomph.setup.internal.installer.InstallerApplication.start(InstallerApplication.java:296)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
Caused by: org.eclipse.oomph.util.IOExceptionWithCause: Exception connecting to https://svnhost.mhp.dev:8443/svn/TransportEmulator/emulator/trunk/emulator/eclipse-setup/Emulator.setup.
	at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.createInputStream(ECFURIHandlerImpl.java:678)
	at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1269)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
	... 41 more
Caused by: org.eclipse.ecf.filetransfer.IncomingFileTransferException: Exception connecting to https://svnhost.mhp.dev:8443/svn/TransportEmulator/emulator/trunk/emulator/eclipse-setup/Emulator.setup.
	at org.eclipse.ecf.provider.filetransfer.retrieve.UrlConnectionRetrieveFileTransfer.openStreams(UrlConnectionRetrieveFileTransfer.java:345)
	at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.sendRetrieveRequest(AbstractRetrieveFileTransfer.java:885)
	at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.sendRetrieveRequest(AbstractRetrieveFileTransfer.java:576)
	at org.eclipse.ecf.provider.filetransfer.retrieve.MultiProtocolRetrieveAdapter.sendRetrieveRequest(MultiProtocolRetrieveAdapter.java:106)
	at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.createInputStream(ECFURIHandlerImpl.java:581)
	... 45 more
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://svnhost.mhp.dev:8443/svn/TransportEmulator/emulator/trunk/emulator/eclipse-setup/Emulator.setup
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
	at org.eclipse.ecf.provider.filetransfer.retrieve.UrlConnectionRetrieveFileTransfer.getDecompressedStream(UrlConnectionRetrieveFileTransfer.java:552)
	at org.eclipse.ecf.provider.filetransfer.retrieve.UrlConnectionRetrieveFileTransfer.openStreams(UrlConnectionRetrieveFileTransfer.java:322)
	... 49 more


Maybe this helps.
Re: Reference online .setup file with authentication [message #1748457 is a reply to message #1748454] Wed, 23 November 2016 10:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Are you using a very recent build of Oomph 1.6? There were some very serious problems that have recently been fixed. I'd generally expect a prompt for a user name password in response to any 401...

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Reference online .setup file with authentication [message #1748496 is a reply to message #1748457] Wed, 23 November 2016 15:52 Go to previous messageGo to next message
Peter Luthardt is currently offline Peter LuthardtFriend
Messages: 43
Registered: February 2014
Member
Thank you,

I was using version 1.4
Now I updated the installer and it still do not work. It only say, that: The URI 'https://svnhost. ... Emulator.setup' does not contain a valid project.
After the update I do not find the traces any more.
eclipse-inst.ini contains:

-vmargs
..
-Doomph.setup.ecf.trace=true
-Xms256M
-Xmx1024M

Do I have to add any other properties now?
Re: Reference online .setup file with authentication [message #1748498 is a reply to message #1748496] Wed, 23 November 2016 16:00 Go to previous messageGo to next message
Peter Luthardt is currently offline Peter LuthardtFriend
Messages: 43
Registered: February 2014
Member
Now it works !!!!!!!

I removed:
-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4
-Djava.net.preferIPv4Stack=true

from the -vmargs

Now I was prompted for user and password. May be you could explain what these properties are doing.
I am happy.Smile
Thank you.
Re: Reference online .setup file with authentication [message #1748538 is a reply to message #1748498] Thu, 24 November 2016 08:02 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
The first looks like an ECF property. I guess you added that yourself. I'd have to Goggle what that means, but it looks bad to exclude the Apache frameworks that are normally used...

The second looks like a pure Java thing. I suspect it only makes a different when you're on a network that support IP6 but something isn't working well unless pure IP4 is used. But again, I'd have to Google what that means...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Reference online .setup file with authentication [message #1752727 is a reply to message #1748538] Thu, 26 January 2017 14:50 Go to previous messageGo to next message
Stanley Hillner is currently offline Stanley HillnerFriend
Messages: 4
Registered: January 2017
Junior Member
Hi, we have the same problem here with an HTTPS-URL and basic authentication for the git repository.
I don't get the prompt for username and password with latest eclipse installer (1.6.0 B2790).
Re: Reference online .setup file with authentication [message #1752743 is a reply to message #1752727] Thu, 26 January 2017 20:03 Go to previous messageGo to next message
Stanley Hillner is currently offline Stanley HillnerFriend
Messages: 4
Registered: January 2017
Junior Member
Hi again, I have now added the ECF system property: -Doomph.setup.ecf.trace=true
And the log tells me that the following:

> ECF: https://.../theSetup.setup uri=https://.../theSetup.setup
> ECF: https://.../theSetup.setup cacheURI=file:/C:/Users/xxx/.eclipse/org.eclipse.oomph.setup/cache/https___..._theSetup.setup
> ECF: https://.../theSetup.setup eTag=null
> ECF: https://.../theSetup.setup expectedETag=null
> ECF: https://.../theSetup.setup authorizationHandler=org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl$AuthorizationHandlerImpl@1536602f authorizations: {} securePreferences: org.eclipse.oomph.preferences.util.PreferencesUtil$AutoRefreshSecurePreferencesWrapper@f7c34f6f uiServices: org.eclipse.oomph.p2.internal.ui.P2ServiceUI@2a1edad4
> ECF: https://.../theSetup.setup trying=0
> ECF: https://.../theSetup.setup triedReauthorization=0
> ECF: https://.../theSetup.setup authorization=Authorization [user=, password=]
> ECF: https://.../theSetup.setup triedProxyReauthorization=0
> ECF: https://.../theSetup.setup proxyAuthorization=null
> ECF: https://.../theSetup.setup writing cache
> ECF: https://.../theSetup.setup returning successful results

I didn't get the user/password prompt and the authorization handler uses empty username and password.
Is there any magic property to set for switching the authorization handler or something? Or can this be a windows issue?
Re: Reference online .setup file with authentication [message #1752894 is a reply to message #1752743] Mon, 30 January 2017 11:31 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
It should end up in this code in ECFURIHandlerImpl, but only if the server responds with the appropriate error code for that:
  // We assume contents can be accessed via the github API https://developer.github.com/v3/repos/contents/#get-contents
                // That API, for security reasons, does not return HTTP_UNAUTHORIZED, so we need this special case for that host.
                else if (errorCode == HttpURLConnection.HTTP_UNAUTHORIZED
                    || API_GITHUB_HOST.equals(getHost(uri)) && errorCode == HttpURLConnection.HTTP_NOT_FOUND)
                {
                  // Get the authorization if we don't already have one.
                  if (authorization == null)
                  {
                    authorization = authorizationHandler.authorize(uri);

                    // If it is authorized, use it now.
                    if (authorization.isAuthorized())
                    {
                      --i;
                      continue;
                    }
                  }

                  // If the authorization remains authorizable, prompt for the password at most three times.
                  if (!authorization.isUnauthorizeable() && triedReauthorization++ < 3)
                  {
                    authorization = authorizationHandler.reauthorize(uri, authorization);
                    if (authorization.isAuthorized())
                    {
                      --i;
                      continue;
                    }
                  }
                }
              }

Perhaps your server, like github doesn't return a 403 because some hacker might try to use this to detect if something exists on the server...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Reference online .setup file with authentication [message #1752947 is a reply to message #1752894] Tue, 31 January 2017 08:16 Go to previous messageGo to next message
Stanley Hillner is currently offline Stanley HillnerFriend
Messages: 4
Registered: January 2017
Junior Member
Ok, Gitlab sends a redirect (302) to the login page when I send a GET to a raw URL as an anonymous user.
I assume there is currently no way to work around this?
Would it be possible to add an option to the "Add User Projects" page for specifying credentials for the URI to use? This way one could set the credentials beforehand and if none are provided the installer could query the URI with the current mechanism.
Re: Reference online .setup file with authentication [message #1752961 is a reply to message #1752947] Tue, 31 January 2017 11:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
I ran into a similar problem on a customer project and provided infrastructure in ECFURIHandlerImpl to deal with it. But I've not documented it properly yet. I'm traveling now so won't have time for the next two weeks either, but if you look in the source at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.Main maybe that could solve your problem. The general idea is that you can specify a transformation that will yield a login URL for authentication and the "real" URL that will use the authorization information...

Otherwise I'll need some way to reproduce your problem and see if what's there already is sufficient or not. Feel free to open a Bugzilla, but keep in mind that I'll need to be able to reproduce an analog of the problem...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Reference online .setup file with authentication [message #1752967 is a reply to message #1752961] Tue, 31 January 2017 12:21 Go to previous message
Stanley Hillner is currently offline Stanley HillnerFriend
Messages: 4
Registered: January 2017
Junior Member
Hi Ed, thanks for the quick reply but it's not that urgent.
I had a look into the ECFURIHandlerImpl and it was just too complex to get to the point quickly enougth.

However, I'll setup a small test repo on our gitlab server for you and will contact you through mail. Maybe you have some time for it after your travelling.
Thanks so far!
Previous Topic:Execution of bat file
Next Topic:Multiple Workspaces during installation
Goto Forum:
  


Current Time: Sun Dec 08 01:10:57 GMT 2024

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

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

Back to the top