Fix NoSuchMethodError: ParserRegistry.parse
package org.radargun.service;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.infinispan.commons.util.FileLookupFactory;
+import org.infinispan.configuration.parsing.ConfigurationBuilderHolder;
+import org.infinispan.configuration.parsing.ParserRegistry;
import org.radargun.Service;
/**
@@ -14,4 +20,16 @@ public class Infinispan100EmbeddedService extends Infinispan94EmbeddedService {
protected Infinispan100Lifecycle createLifecycle() {
return new Infinispan100Lifecycle(this);
}
+
+ @Override
+ protected ConfigurationBuilderHolder createConfiguration(String configFile) {
+ ClassLoader classLoader = getClass().getClassLoader();
+ try (InputStream input = FileLookupFactory.newInstance().lookupFileStrict(configFile, classLoader)) {
+ ConfigurationBuilderHolder holder = new ParserRegistry().parse(input, null);
+ return holder;
+ } catch (IOException e) {
+ log.error("Failed to get configuration input stream", e);
+ }
+ return null;
+ }
}
\ No newline at end of file
