Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMFStore] Creating a Workspace causes certificate path issues
[EMFStore] Creating a Workspace causes certificate path issues [message #1728043] Wed, 30 March 2016 13:58 Go to next message
Joshua Hampl is currently offline Joshua HamplFriend
Messages: 2
Registered: March 2016
Junior Member
We are developing an application that uses a java api (restfb) to read data from facebook pages. For persistance purposes, we decided to utilize EMFStore. However, after a workspace is created:

 ESWorkspace workspace = ESWorkspaceProvider.INSTANCE.getWorkspace(); 


every call of the restfb api results in a SunCertPathBuilderException (see below). This error does not occur without running EMFStore.
Any suggestions and ideas are much appreciated!

com.restfb.exception.FacebookNetworkException: A network error occurred while trying to communicate with Facebook: Facebook request failed (HTTP status code null)
	at com.restfb.DefaultFacebookClient.makeRequestAndProcessResponse(DefaultFacebookClient.java:1029)
	at com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:958)
	at com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:921)
	at com.restfb.DefaultFacebookClient.obtainUserAccessToken(DefaultFacebookClient.java:711)
	at de.fosil.stf.sona.services.facebook.internal.FacebookService.setVerificationCode(FacebookService.java:86)
	at de.fosil.stf.sona.wizards.FBLoginWizardPage$1.changed(FBLoginWizardPage.java:48)
	at org.eclipse.swt.browser.IE$7.handleEvent(IE.java:629)
	at org.eclipse.swt.ole.win32.OleEventTable.sendEvent(OleEventTable.java:55)
	at org.eclipse.swt.ole.win32.OleEventSink.notifyListener(OleEventSink.java:152)
	at org.eclipse.swt.ole.win32.OleEventSink.Invoke(OleEventSink.java:120)
	at org.eclipse.swt.ole.win32.OleEventSink.access$1(OleEventSink.java:97)
	at org.eclipse.swt.ole.win32.OleEventSink$1.method6(OleEventSink.java:71)
	at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:119)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
	at org.eclipse.jface.window.Window.open(Window.java:808)
	at de.fosil.stf.sona.handler.NewFacebookCommandHandler.execute(NewFacebookCommandHandler.java:17)
	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:498)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:825)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:701)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$6(HandledContributionItem.java:685)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:613)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
	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.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:164)
	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:498)
	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)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509)
	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
	at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
	at com.restfb.DefaultWebRequestor.execute(DefaultWebRequestor.java:355)
	at com.restfb.DefaultWebRequestor.executeGet(DefaultWebRequestor.java:93)
	at com.restfb.DefaultFacebookClient$3.makeRequest(DefaultFacebookClient.java:971)
	at com.restfb.DefaultFacebookClient.makeRequestAndProcessResponse(DefaultFacebookClient.java:1027)
	... 57 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
	at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
	at sun.security.validator.Validator.validate(Validator.java:260)
	at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491)
	... 71 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
	at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
	at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
	... 77 more

Re: [EMFStore] Creating a Workspace causes certificate path issues [message #1728419 is a reply to message #1728043] Mon, 04 April 2016 09:49 Go to previous messageGo to next message
Edgar Mueller is currently offline Edgar MuellerFriend
Messages: 17
Registered: March 2016
Junior Member
Hi Joshua,

this most probably happens because EMFStore ships with its own keystore
which does not contain the necessary certificate(s) for Facebook when
trying to create the SSL connection.
Could you import the respective certificates into EMFStore's keystore
(which can be found at $HOME/.emfstore/client/profiles/<YOUR_PROFILE>)
and try again? A good tool for managing Keystores via a UI is the
Keystore Explorer (http://www.keystore-explorer.org).
Hope this helps.

Cheers,
Edgar


Am 30.03.2016 um 17:42 schrieb Joshua Hampl:
> We are developing an application that uses a java api (restfb) to read
> data from facebook pages. For persistance purposes, we decided to
> utilize EMFStore. However, after a workspace is created:
> ESWorkspace workspace = ESWorkspaceProvider.INSTANCE.getWorkspace();
> every call of the restfb api results in a SunCertPathBuilderException
> (see below). This error does not occur without running EMFStore.
> Any suggestions and ideas are much appreciated!
>
> com.restfb.exception.FacebookNetworkException: A network error occurred
> while trying to communicate with Facebook: Facebook request failed (HTTP
> status code null)
> at
> com.restfb.DefaultFacebookClient.makeRequestAndProcessResponse(DefaultFacebookClient.java:1029)
>
> at
> com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:958)
>
> at
> com.restfb.DefaultFacebookClient.makeRequest(DefaultFacebookClient.java:921)
>
> at
> com.restfb.DefaultFacebookClient.obtainUserAccessToken(DefaultFacebookClient.java:711)
>
> at
> de.fosil.stf.sona.services.facebook.internal.FacebookService.setVerificationCode(FacebookService.java:86)
>
> at
> de.fosil.stf.sona.wizards.FBLoginWizardPage$1.changed(FBLoginWizardPage.java:48)
>
> at org.eclipse.swt.browser.IE$7.handleEvent(IE.java:629)
> at
> org.eclipse.swt.ole.win32.OleEventTable.sendEvent(OleEventTable.java:55)
> at
> org.eclipse.swt.ole.win32.OleEventSink.notifyListener(OleEventSink.java:152)
>
> at org.eclipse.swt.ole.win32.OleEventSink.Invoke(OleEventSink.java:120)
> at
> org.eclipse.swt.ole.win32.OleEventSink.access$1(OleEventSink.java:97)
> at
> org.eclipse.swt.ole.win32.OleEventSink$1.method6(OleEventSink.java:71)
> at
> org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:119)
> at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
> at org.eclipse.jface.window.Window.open(Window.java:808)
> at
> de.fosil.stf.sona.handler.NewFacebookCommandHandler.execute(NewFacebookCommandHandler.java:17)
>
> 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:498)
> at
> org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
> at
> org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
>
> at
> org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
>
> at
> org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
> at
> org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
>
> at
> org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
>
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:825)
>
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:701)
>
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$6(HandledContributionItem.java:685)
>
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:613)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
> 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.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
>
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
>
> at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:164)
>
> 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:498)
> 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)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
> Caused by: javax.net.ssl.SSLHandshakeException:
> sun.security.validator.ValidatorException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to
> find valid certification path to requested target
> at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
> at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
> at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
> at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
> at
> sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509)
>
> at
> sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
> at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
> at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
> at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
> at
> sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
>
> at
> sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
> at
> sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
> at
> sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
> at
> sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
>
> at
> sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
>
> at com.restfb.DefaultWebRequestor.execute(DefaultWebRequestor.java:355)
> at
> com.restfb.DefaultWebRequestor.executeGet(DefaultWebRequestor.java:93)
> at
> com.restfb.DefaultFacebookClient$3.makeRequest(DefaultFacebookClient.java:971)
>
> at
> com.restfb.DefaultFacebookClient.makeRequestAndProcessResponse(DefaultFacebookClient.java:1027)
>
> ... 57 more
> Caused by: sun.security.validator.ValidatorException: PKIX path building
> failed: sun.security.provider.certpath.SunCertPathBuilderException:
> unable to find valid certification path to requested target
> at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
> at
> sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
> at sun.security.validator.Validator.validate(Validator.java:260)
> at
> sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
>
> at
> sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
>
> at
> sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
>
> at
> sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491)
>
> ... 71 more
> Caused by: sun.security.provider.certpath.SunCertPathBuilderException:
> unable to find valid certification path to requested target
> at
> sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
>
> at
> sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
>
> at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
> at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
> ... 77 more
>
>


--
Edgar Mueller

Get Professional Eclipse Support:
http://eclipsesource.com/en/services/developer-support/


--
Edgar Mueller

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMFStore] Creating a Workspace causes certificate path issues [message #1728442 is a reply to message #1728419] Mon, 04 April 2016 12:04 Go to previous message
Joshua Hampl is currently offline Joshua HamplFriend
Messages: 2
Registered: March 2016
Junior Member
Hey Edgar,

thanks for the help. We found that EMFStore changes the system properties to point to its own keystore/trustsore locations, so we changed them back for now, until we know which certificate facebook connections require.

Have a nice day!

Joshua Hampl
Previous Topic:[EMF Forms] ECPCellEditor Instantiate
Next Topic:[Edapt] Own EDataType and Factory
Goto Forum:
  


Current Time: Thu Apr 25 08:30:48 GMT 2024

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

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

Back to the top