[
https://issues.apache.org/jira/browse/ARIES-1470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15050338#comment-15050338
]
David Bosschaert commented on ARIES-1470:
-----------------------------------------
Hi Setya,
So the odd one out here is this one:
bq. org.axonframework.serializer.ContentTypeConverter from
file:/usr/apps/virgo-jetty-server-3.6.4.RELEASE/work/deployer/s/axonframework.plan-2.4/5/0/axon-core-2.4.jar/
all the other ones are loaded from .../repository/usr/axon-core-2.4.jar. So it
would be interesting to know why the code loads that class from that odd
location. Maybe it's using the ThreadContextClassLoader (TCCL) to load it,
which would explain the 'random' behaviour as the TCCL could be set to
anything, but this is just a hunch.
*If* it's the TCCL and you have access to the code yourself, then you can set
the TCCL to the appropriate bundle classloader (just take a class loaded by the
bundle and call {{clz.getClass().getClassLoader()}} on it to get a bundle
classloader).
If you don't have access to the code and it's the TCCL then you can use SPI-Fly
to weave in TCCL setter calls...
> java.util.ServiceConfigurationError
> -----------------------------------
>
> Key: ARIES-1470
> URL: https://issues.apache.org/jira/browse/ARIES-1470
> Project: Aries
> Issue Type: Bug
> Components: SPI Fly
> Affects Versions: spifly-1.0.6
> Environment: Eclipse Virgo Jetty Server 3.6.4, Spring Framework 3.2.5
> Reporter: Setya
>
> Deploying application that relies on 3rd party framework that's using
> ServiceLoader into Eclipse Virgo intermittenly causes the following exception
> to be thrown:
> Caused by: java.util.ServiceConfigurationError:
> org.axonframework.serializer.ContentTypeConverter: Provider
> org.axonframework.serializer.converters.ByteArrayToInputStreamConverter not a
> subtype
> at java.util.ServiceLoader.fail(ServiceLoader.java:231)
> at java.util.ServiceLoader.access$300(ServiceLoader.java:181)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:369)
> at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
> at
> org.axonframework.serializer.ChainingConverterFactory.<init>(ChainingConverterFactory.java:51)
> at
> org.axonframework.serializer.AbstractXStreamSerializer.<init>(AbstractXStreamSerializer.java:106)
> at
> org.axonframework.serializer.AbstractXStreamSerializer.<init>(AbstractXStreamSerializer.java:81)
> at
> org.axonframework.serializer.AbstractXStreamSerializer.<init>(AbstractXStreamSerializer.java:70)
> at
> org.axonframework.serializer.xml.XStreamSerializer.<init>(XStreamSerializer.java:53)
> at
> org.axonframework.contextsupport.spring.FileSystemEventStoreBeanDefinitionParser.doParse(FileSystemEventStoreBeanDefinitionParser.java:76)
> at
> org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser.parseInternal(AbstractSingleBeanDefinitionParser.java:85)
> at
> org.springframework.beans.factory.xml.AbstractBeanDefinitionParser.parse(AbstractBeanDefinitionParser.java:59)
> at
> org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
> at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1438)
> at
> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1428)
> at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:195)
> at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:139)
> at
> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:108)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
> ... 21 common frames omitted
> Have tried to weave static bundle using SPI Fly, but the problem persists.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)