On Mon, Jan 28, 2013 at 6:17 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:
On Mon, Jan 28, 2013 at 4:21 PM, Justin Deoliveira <jdeolive@anonymised.com> wrote:
Hmmm… nothing comes to mind as to why we have to load the schema on startup. I guess I would put a breakpoint in the org.geotools.gml3.v3_2.GML.buildSchema() method and see why and where its being triggered from, to see if it can be avoided.
Hmm, it’s coming from here:
// Trigger immediate construction of full GML schema before dependencies are constructed, to
// handle cyclic dependencies. See GEOT-3327.
try {
getSchema();
} catch (IOException e) {
throw new RuntimeException(e);
}
Ah, forgot one bit, the above method is called as we initialize FeatureTypeSchemaBuilder:
Thread [main] (Suspended (breakpoint at line 2732 in GML))
owns: GML (id=57)
owns: ConcurrentHashMap<K,V> (id=58)
owns: ConcurrentHashMap<K,V> (id=59)
owns: Object (id=60)
GML.buildSchema() line: 2732
GML(XSD).getSchema() line: 232
GML.() line: 71
GML.() line: 55
FeatureTypeSchemaBuilder$GML32.createTypeMappingProfile() line: 960
FeatureTypeSchemaBuilder$GML32(FeatureTypeSchemaBuilder$GML3).(GeoServer) line: 895
FeatureTypeSchemaBuilder$GML32.(GeoServer) line: 944
XmlSchemaEncoder$V20.(GeoServer) line: 121
NativeConstructorAccessorImpl.newInstance0(Constructor, Object) line: not available [native method]
NativeConstructorAccessorImpl.newInstance(Object) line: 39
DelegatingConstructorAccessorImpl.newInstance(Object) line: 27
Constructor.newInstance(Object…) line: 513
BeanUtils.instantiateClass(Constructor, Object…) line: 147
CglibSubclassingInstantiationStrategy(SimpleInstantiationStrategy).instantiate(RootBeanDefinition, String, BeanFactory, Constructor<?>, Object) line: 110
ConstructorResolver.autowireConstructor(String, RootBeanDefinition, Constructor, Object) line: 280
DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).autowireConstructor(String, RootBeanDefinition, Constructor, Object) line: 1035
DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).createBeanInstance(String, RootBeanDefinition, Object) line: 939
DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).doCreateBean(String, RootBeanDefinition, Object) line: 485
DefaultListableBeanFactory(AbstractAutowireCapableBeanFactory).createBean(String, RootBeanDefinition, Object) line: 456
AbstractBeanFactory$1.getObject() line: 294
DefaultListableBeanFactory(DefaultSingletonBeanRegistry).getSingleton(String, ObjectFactory) line: 225
DefaultListableBeanFactory(AbstractBeanFactory).doGetBean(String, Class, Object, boolean) line: 291
DefaultListableBeanFactory(AbstractBeanFactory).getBean(String) line: 193
DefaultListableBeanFactory.preInstantiateSingletons() line: 585
GeoServerTestApplicationContext(AbstractApplicationContext).finishBeanFactoryInitialization(ConfigurableListableBeanFactory) line: 913
GeoServerTestApplicationContext(AbstractApplicationContext).refresh() line: 464
GetFeatureTest(GeoServerSystemTestSupport).setUp(SystemTestData) line: 201
GetFeatureTest(GeoServerSystemTestSupport).setUp(TestData) line: 1
GetFeatureTest(GeoServerBaseTestSupport).doSetup() line: 150
NativeMethodAccessorImpl.invoke0(Method, Object, Object) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object) line: 25
Method.invoke(Object, Object…) line: 597
FrameworkMethod$1.runReflectiveCall() line: 45
FrameworkMethod$1(ReflectiveCallable).run() line: 15
FrameworkMethod.invokeExplosively(Object, Object…) line: 42
RunBefores.evaluate() line: 27
RunAfters.evaluate() line: 30
RunRules.evaluate() line: 18
BlockJUnit4ClassRunner(ParentRunner).runLeaf(Statement, Description, RunNotifier) line: 263
BlockJUnit4ClassRunner.runChild(FrameworkMethod, RunNotifier) line: 68
BlockJUnit4ClassRunner.runChild(Object, RunNotifier) line: 47
ParentRunner$3.run() line: 231
ParentRunner$1.schedule(Runnable) line: 60
BlockJUnit4ClassRunner(ParentRunner).runChildren(RunNotifier) line: 229
ParentRunner.access$000(ParentRunner, RunNotifier) line: 50
ParentRunner$2.evaluate() line: 222
RunBefores.evaluate() line: 28
RunAfters.evaluate() line: 30
BlockJUnit4ClassRunner(ParentRunner).run(RunNotifier) line: 300
JUnit4TestClassReference(JUnit4TestReference).run(TestExecution) line: 50
TestExecution.run(ITestReference) line: 38
RemoteTestRunner.runTests(String, String, TestExecution) line: 467
RemoteTestRunner.runTests(TestExecution) line: 683
RemoteTestRunner.run() line: 390
RemoteTestRunner.main(String) line: 197
Cheers
Andrea
–
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it