ServiceConfigurationError [message #1716618] |
Sun, 06 December 2015 13:38 |
|
Hi all,
I intermittenly getting below exception when deploying my application on Virgo:
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
The above error does not always show up, but even if so, if I restart Virgo the error could be thrown.
I suspect that this is a classloading issue but I'm not sure where to begin investigating since I never encountered this in non-OSGI environment or when I launch OSGI via Eclipse OSGI framework launcher.
Below is the version:
Virgo Tomcat/Jetty Server : 3.6.4
Spring: 3.2.5
Any help would be greatly appreciated.
Regards,
Setya
|
|
|
|
Re: ServiceConfigurationError [message #1717141 is a reply to message #1716843] |
Thu, 10 December 2015 09:19 |
|
Hi Daniel,
Thank you for your information.
I've tried SPI Fly and get confirmed by the author that the problem is different from what SPI Fly addresses.
The problem comes from the fact the service interface & implementation were loaded by different classloader hence considered not assignable.
I've added -XX:+TraceClassLoading JVM parameter when starting Virgo and found the following when the problem occurs:
[Loaded org.axonframework.serializer.AnnotationRevisionResolver 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/]
[Loaded org.axonframework.serializer.ChainingConverterFactory 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/]
[Loaded 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/]
[Loaded org.axonframework.serializer.ContentTypeConverter from file:/usr/apps/virgo-jetty-server-3.6.4.RELEASE/./repository/usr/axon-core-2.4.jar]
[Loaded org.axonframework.serializer.AbstractContentTypeConverter from file:/usr/apps/virgo-jetty-server-3.6.4.RELEASE/./repository/usr/axon-core-2.4.jar]
[Loaded org.axonframework.serializer.converters.ByteArrayToInputStreamConverter from file:/usr/apps/virgo-jetty-server-3.6.4.RELEASE/./repository/usr/axon-core-2.4.jar]
[Loaded java.util.ServiceConfigurationError from /usr/lib/jvm/jdk1.7.0_71-x64/jre/lib/rt.jar]
[Loaded org.springframework.core.NestedExceptionUtils from file:/usr/apps/virgo-jetty-server-3.6.4.RELEASE/repository/ext/org.springframework.core-3.2.5.RELEASE.jar]
From above log we see that class org.axonframework.serializer.ContentTypeConverter was loaded twice from different location, when the problem does not occure, it only gets loaded from repository/usr folder.
Thanks & Regards,
Setya
|
|
|
|
Powered by
FUDForum. Page generated in 0.02862 seconds