Description: After setting up two GeoWave datastores in GeoServer using the new per namespace classpath configuration the second data store accessed will fail with the error below as the unguarded initializer will run again and attempt to re-register the factory.
Setup:
- Configure two namespace classloaders in Accumulo
- Configure two GeoWave datastores with each one using a different namespace
Stack Trace:
exception while doing multi-scan
java.lang.Error: factory already defined
at java.net.URL.setURLStreamHandlerFactory(URL.java:1104)
at mil.nga.giat.geowave.vector.query.CqlQueryFilterIterator.(CqlQueryFilterIterator.java:66)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:379)
at org.apache.accumulo.core.iterators.IteratorUtil.loadIterators(IteratorUtil.java:239)
at org.apache.accumulo.core.iterators.IteratorUtil.loadIterators(IteratorUtil.java:216)
at org.apache.accumulo.core.iterators.IteratorUtil.loadIterators(IteratorUtil.java:194)
at org.apache.accumulo.tserver.Tablet$ScanDataSource.createIterator(Tablet.java:1985)
at org.apache.accumulo.tserver.Tablet$ScanDataSource.iterator(Tablet.java:1923)
at org.apache.accumulo.core.iterators.system.SourceSwitchingIterator.seek(SourceSwitchingIterator.java:163)
at org.apache.accumulo.tserver.Tablet.lookup(Tablet.java:1499)
at org.apache.accumulo.tserver.Tablet.lookup(Tablet.java:1606)
at org.apache.accumulo.tserver.TabletServer$ThriftClientHandler$LookupTask.run(TabletServer.java:1119)
at org.apache.accumulo.trace.instrument.TraceRunnable.run(TraceRunnable.java:47)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.accumulo.trace.instrument.TraceRunnable.run(TraceRunnable.java:47)
at org.apache.accumulo.core.util.LoggingRunnable.run(LoggingRunnable.java:34)
at java.lang.Thread.run(Thread.java:745)
Description: After setting up two GeoWave datastores in GeoServer using the new per namespace classpath configuration the second data store accessed will fail with the error below as the unguarded initializer will run again and attempt to re-register the factory.
Setup:
Stack Trace:
exception while doing multi-scan
java.lang.Error: factory already defined
at java.net.URL.setURLStreamHandlerFactory(URL.java:1104)
at mil.nga.giat.geowave.vector.query.CqlQueryFilterIterator.(CqlQueryFilterIterator.java:66)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:379)
at org.apache.accumulo.core.iterators.IteratorUtil.loadIterators(IteratorUtil.java:239)
at org.apache.accumulo.core.iterators.IteratorUtil.loadIterators(IteratorUtil.java:216)
at org.apache.accumulo.core.iterators.IteratorUtil.loadIterators(IteratorUtil.java:194)
at org.apache.accumulo.tserver.Tablet$ScanDataSource.createIterator(Tablet.java:1985)
at org.apache.accumulo.tserver.Tablet$ScanDataSource.iterator(Tablet.java:1923)
at org.apache.accumulo.core.iterators.system.SourceSwitchingIterator.seek(SourceSwitchingIterator.java:163)
at org.apache.accumulo.tserver.Tablet.lookup(Tablet.java:1499)
at org.apache.accumulo.tserver.Tablet.lookup(Tablet.java:1606)
at org.apache.accumulo.tserver.TabletServer$ThriftClientHandler$LookupTask.run(TabletServer.java:1119)
at org.apache.accumulo.trace.instrument.TraceRunnable.run(TraceRunnable.java:47)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.accumulo.trace.instrument.TraceRunnable.run(TraceRunnable.java:47)
at org.apache.accumulo.core.util.LoggingRunnable.run(LoggingRunnable.java:34)
at java.lang.Thread.run(Thread.java:745)