Skip to content

Apache Lucene open-source search software

Do not throw cached Exception, create new

Noble Paulbdefedfa425f
diff --git a/solr/core/src/java/org/apache/solr/core/PluginBag.java b/solr/core/src/java/org/apache/solr/core/PluginBag.java
index 9c550074005..fe1c88263c4 100644
--- a/solr/core/src/java/org/apache/solr/core/PluginBag.java
+++ b/solr/core/src/java/org/apache/solr/core/PluginBag.java
@@ -338,7 +338,9 @@ public class PluginBag<T> implements AutoCloseable {
@Override
public T get() {
if (lazyInst != null) return lazyInst;
- if (solrException != null) throw solrException;
+ if (solrException != null) {
+ throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,"Unrecoverable error", solrException);
+ }
if (createInst()) {
// check if we created the instance to avoid registering it again
registerMBean(lazyInst, core, pluginInfo.name);