Hi,
I would like to create a springcontainer using javaconfig with a custom class loader. This is what I've tried:
However I get an exception when doing the refresh:Code:System.err.println(RnaCompoundDBConfig.class.getName()); JavaConfigApplicationContext applicationContext = new JavaConfigApplicationContext(); // here I set my custom classloader which is url-class loader applicationContext.setClassLoader(this.getClass().getClassLoader()); applicationContext.addConfigClass(RnaCompoundDBConfig.class); applicationContext.refresh();
The AsmUtils seem to ignore my custom classloader. What could be my mistake?Code:java.io.FileNotFoundException: Class file [de/mpicbg/tds/rm/hcstools/RnaCompoundDBConfig.class] not found). Check the log messages... (ProcessThread.run()) java.lang.RuntimeException: java.io.FileNotFoundException: Class file [de/mpicbg/tds/rm/hcstools/RnaCompoundDBConfig.class] not found org.springframework.config.java.internal.parsing.asm.AsmUtils.getClassAsStream(AsmUtils.java:98) org.springframework.config.java.internal.factory.support.AsmJavaConfigBeanDefinitionReader.loadBeanDefinitions(AsmJavaConfigBeanDefinitionReader.java:69) org.springframework.config.java.internal.process.InternalConfigurationPostProcessor.parseAnyConfigurationClasses(InternalConfigurationPostProcessor.java:128) org.springframework.config.java.internal.process.InternalConfigurationPostProcessor.postProcessBeanFactory(InternalConfigurationPostProcessor.java:76) org.springframework.config.java.context.JavaConfigApplicationContext.invokeBeanFactoryPostProcessors(JavaConfigApplicationContext.java:121) org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:362) de.mpicbg.tds.rm.hcstools.AnnotateRNAScreen.setupService(AnnotateRNAScreen.java:50)
Any help is appreciated.
Best, Holger


