You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@taverna.apache.org by "Stian Soiland-Reyes (JIRA)" <ji...@apache.org> on 2016/05/26 15:50:13 UTC
[jira] [Commented] (TAVERNA-971) jarcache not working through OSGi
[ https://issues.apache.org/jira/browse/TAVERNA-971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15302284#comment-15302284 ]
Stian Soiland-Reyes commented on TAVERNA-971:
---------------------------------------------
SSL error if cache is not used:
{code}
Can't load https://w3id.org/bundle/context
javax.net.ssl.SSLException: Received fatal alert: internal_error
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2023)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1125)
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 org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.client.cache.CachingExec.callBackend(CachingExec.java:592)
at org.apache.http.impl.client.cache.CachingExec.handleCacheMiss(CachingExec.java:356)
at org.apache.http.impl.client.cache.CachingExec.execute(CachingExec.java:275)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
at com.github.jsonldjava.utils.JsonUtils.openStreamForURL(JsonUtils.java:279)
at com.github.jsonldjava.utils.JsonUtils.fromURL(JsonUtils.java:309)
at com.github.jsonldjava.utils.JsonUtils.fromURL(JsonUtils.java:180)
at org.apache.taverna.commandline.CommandLineTool.setupJarCache(CommandLineTool.java:335)
at org.apache.taverna.commandline.CommandLineTool.setupAndExecute(CommandLineTool.java:175)
at org.apache.taverna.commandline.CommandLineTool.run(CommandLineTool.java:106)
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.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:62)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:327)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:87)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:292)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:138)
at java.lang.Thread.run(Thread.java:745)
{code}
> jarcache not working through OSGi
> ---------------------------------
>
> Key: TAVERNA-971
> URL: https://issues.apache.org/jira/browse/TAVERNA-971
> Project: Apache Taverna
> Issue Type: Bug
> Components: Taverna Language
> Affects Versions: language 0.15.1, commandline 3.1.0
> Reporter: Stian Soiland-Reyes
> Assignee: Stian Soiland-Reyes
> Fix For: commandline 3.1.0, language 0.16.0
>
>
> taverna-robundle includes a [jarcache.json|https://github.com/apache/incubator-taverna-language/blob/master/taverna-robundle/src/main/resources/jarcache.json] which specifies [contexts/bundle.jsonld|https://github.com/apache/incubator-taverna-language/blob/master/taverna-robundle/src/main/resources/contexts/bundle.jsonld] to be loaded from the taverna-robundle JAR instead of from https://w3id.org/bundle/context.json
> This uses [JSONLD-Java's JAR cache|https://github.com/jsonld-ava/jsonld-java#loading-contexts-from-classpathjar] - in order to avoiding network access when parsing the manifest JSON-LD of the robundle.
> This does however not work well under OSGi with the Taverna Command Line, as the jarcache within the jsonld-java OSGi bundle can't access /jarcache.json in the taverna-robundle OSGi bundle - at least not without setting Thread.currentThread.setContextClassLoader().
> This caused running of the workflow to fail with a large stack trace at the point of closing the data bundle (this happen with or without -bundle)
> Note that using Jena 3.1.0 and OpenJDK on Ubuntu, access to https://w3id.org/bundle/context.json fails with an "internal error" SSL error, so even with network access it can fail.
> Note that in Taverna Language 0.15.1 there was also a bug that when adding the Apache header to the bundle.json an extra } was added - this worked with earlier versions of Jackson/JSONLD-Java but now after TAVERNA-970 upgrades this fails - thus for the Command Line 3.1.0 I propose a workaround to add a fixed bundle.json on its own classpath, and then set the thread context loader to its own classloader while running the workflow.
> The fix for robundle 0.16.0 would be to set the thread class loader before parsing the manifest.json.
> (Thus we can fix it properly for next Taverna Language, but can ship Command Line 3.1.0 with existing Language 0.15.1)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)