目前我們使用的是春天的版本是3.2。就是它具有開放JDK 7春天哪個版本支持開放JDK或反之亦然請確認
我們更換JRE和JDK,打開後發現了以下錯誤兼容JDK
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'applicationContext-main' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1041)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:273)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1008)
at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(Singlet
這是一個完整的堆棧跟蹤
[main] INFO org.springframework.context.support.ClassPathXmlApplicationContext - Refreshing
org[email protected]3f9a23f5: startup date [Mon Dec 12 05:35:37 IST 2016]; root of context hierarchy
[main] INFO org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.s[email protected]1ec73967: defining beans []; root of factory hierarchy
Application context could not be created. Will now exit
org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [applicationContext-main], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'applicationContext-main' is defined
at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:409)
下面這個是共享較早
堆棧跟蹤
發佈完整堆棧跟蹤而不是代碼片段。除非你使用內部的sun類,否則應該沒有什麼能夠阻止你使用OpenJDK。 –
謝謝您的回覆牛仔布你可以檢查最新的堆棧跟蹤並幫助我們? –
顯然它沒有找到你期望它們的資源。因此,無論是剪切運氣,還是使用OpenJDK解決路徑問題。你只是切換到OpenJDK,你沒有從6升級到7? –