For creating an itests for the validation messages, it was a requirement to create a subset of tuscany runtime to read contribution metadata, analyze and resolve contribution dependencies. To achieve this i just took the code from sample-domain-management to create a CustomDomainBuilder [source: itest-validation/src/test/java/domain/CustomDomainBuilder.java] which only reads and resolves the contribution and finally report what user-input errors are detected in the contribution.
The code was working fine, untill i introduced the JavaRuntimeModuleActivator into the ModuleActivators and allowed it to start. NPE was thrown when CustomDomainBuilder tried to start the JavaRuntimeModuleActivator at line 61, basically because it failed to read the ProxyFactoryExtensionPoint. To make the code work, i just included the below part of the code before the ModuleActivators are started... // Create an interface contract mapper InterfaceContractMapper mapper = new InterfaceContractMapperImpl(); extensionPoints.addExtensionPoint(mapper); // Create Message factory MessageFactory messageFactory = new MessageFactoryImpl(); // Create Proxy factory ProxyFactory proxyFactory = new DefaultProxyFactoryExtensionPoint(messageFactory, mapper); extensionPoints.addExtensionPoint(proxyFactory); // Create context factory extension point ContextFactoryExtensionPoint contextFactories = new DefaultContextFactoryExtensionPoint(extensionPoints); extensionPoints.addExtensionPoint(contextFactories); Thought this piece of information would be useful, for whose who try to create a custom subset of Tuscany runtime using the new domain-management code base. Another thought is that, should we include this piece of the code in the sample-domain-management code too. Please let me know if any one has thoughts on this. -- Thanks & Regards, Ramkumar Ramalingam