]
Tristan Tarrant reassigned ISPN-10563:
--------------------------------------
Assignee: Dan Berindei
Unable to start blueprint container for bundle
org.infinispan.multimap/9.4.1.Final org.osgi.service.blueprint.container.Component
Definition Exception: Unable to validate xml
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: ISPN-10563
URL:
https://issues.jboss.org/browse/ISPN-10563
Project: Infinispan
Issue Type: Bug
Components: Multimap
Affects Versions: 9.4.1.Final
Environment: java 1.8.0_191
org.eclipse.osgi 3.14.0.v20190517-1309
org.apache.felix.scr 2.1.14.v20190123-1619
infinispan-core 9.4.1.Final
infinispan-commons 9.4.1.Final
infinispan-multimap 9.4.1.Final
infinispan-persistence-soft-index 9.4.1.Final
Reporter: NHUT THAI LE
Assignee: Dan Berindei
Priority: Major
Using infinispan-multimap in equinox, when starting server i got this error:
14:52:24.059 [Blueprint Extender: 3] ERROR o.a.a.b.c.BlueprintContainerImpl - Unable to
start blueprint container for bundle org.infinispan.multimap/9.4.1.Final
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to validate
xml
at org.apache.aries.blueprint.parser.Parser.validate(Parser.java:349)
~[org.apache.aries.blueprint.core_1.9.0.jar:1.9.0]
at org.apache.aries.blueprint.parser.Parser.validate(Parser.java:336)
~[org.apache.aries.blueprint.core_1.9.0.jar:1.9.0]
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:345)
[org.apache.aries.blueprint.core_1.9.0.jar:1.9.0]
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:278)
[org.apache.aries.blueprint.core_1.9.0.jar:1.9.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[na:1.8.0_45]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_45]
at
org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)
[org.apache.aries.blueprint.core_1.9.0.jar:1.9.0]
at
org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:45)
[org.apache.aries.blueprint.core_1.9.0.jar:1.9.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[na:1.8.0_45]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_45]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
[na:1.8.0_45]
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
[na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[na:1.8.0_45]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.3: Element
'blueprint' cannot have character [children], because the type's content type
is element-only.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
~[na:1.8.0_45]
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
~[na:1.8.0_45]
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:437)
~[na:1.8.0_45]
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
~[na:1.8.0_45]
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)
~[na:1.8.0_45]
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:458)
~[na:1.8.0_45]
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3237)
~[na:1.8.0_45]
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.elementLocallyValidComplexType(XMLSchemaValidator.java:3200)
~[na:1.8.0_45]
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.elementLocallyValidType(XMLSchemaValidator.java:3160)
~[na:1.8.0_45]
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processElementContent(XMLSchemaValidator.java:3062)
~[na:1.8.0_45]
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleEndElement(XMLSchemaValidator.java:2140)
~[na:1.8.0_45]
at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(XMLSchemaValidator.java:859)
~[na:1.8.0_45]
at
com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.finishNode(DOMValidatorHelper.java:342)
~[na:1.8.0_45]
at
com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:247)
~[na:1.8.0_45]
at
com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:190)
~[na:1.8.0_45]
at
com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:109)
~[na:1.8.0_45]
at javax.xml.validation.Validator.validate(Validator.java:124) ~[na:1.8.0_45]
at org.apache.aries.blueprint.parser.Parser.validate(Parser.java:346)
~[org.apache.aries.blueprint.core_1.9.0.jar:1.9.0]
... 14 common frames omitted
Looking at the org.infinispan.multimap_9.4.1.Final.jar\OSGI-INF\blueprint\blueprint.xml i
found that it contains ${services}. Look like some pre-processing need to run when
packaging this bundle to replace that place holder with <service> tag
Also noticed that the bundle contain service file to be loaded by ServiceLoader which is
not available in an OSGI env, if this is the only way to load service then perhaps, the
manifest of the bundle also need to specify that it require a service mediator