the code of the FileUploadDaoImpl.java我遇到一個問題,當我導入一箇舊的java項目。它由Spring和mybatis創建。不知道爲什麼它不能工作?誰可以幫助我。這是在overstackflow的第一個問題。非常感謝你們所有人。org.springframework.beans.factory.BeanCreationException,無法解析導入java.util.Arrays數組無法解析數組無法解析
信息:初始化彈簧根的WebApplicationContext 2016年10月21日09:07:29663 ERROR [com.alibaba.druid.pool.DruidAbstractDataSource] - maxidle,則棄用 的log4j:ERROR沒有輸出流或文件的附加器設置命名爲[日誌文件]。 2016-10-21 09:07:31,335 INFO [com.alibaba.druid.pool.DruidDataSource] - {dataSource-1} inited 2016-10-21 09:07:40,569 INFO [com.alibaba.druid.pool .druidDataSource] - {dataSource-1}已關閉 2016-10-21 09:07:40,569錯誤[org.springframework.web.context.ContextLoader] - 上下文初始化失敗 org.springframework.beans.factory.BeanCreationException:創建錯誤在文件[E:\ javaProject.metadata.me_tcat \ webapps \ pre \ WEB-INF \ classes \ com \ app \ pub \ service \ impl \ FileUpLoadImpl.class]中定義名稱爲'fileUpLoadImpl'的bean:bean實例化失敗;嵌套異常是org.springframework.beans.BeanInstantiationException:無法實例化bean類[com.app.pub.service.impl.FileUpLoadImpl]:構造函數拋出異常;嵌套的例外是java.lang.Error的:未解決的編譯問題: 進口java.util.Arrays中不能得到解決 數組不能得到解決
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1037)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:983)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
產生的原因:org.springframework.beans.BeanInstantiationException:無法實例bean類[com.app.pub.service.impl.FileUpLoadImpl]:構造函數拋出異常;嵌套的例外是java.lang.Error的:未解決的編譯問題: 進口java.util.Arrays中不能得到解決 數組不能得到解決
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1030)
... 37 more
產生的原因:java.lang.Error的:未解決的編譯問題: 進口java.util.Arrays中不能得到解決 數組不能得到解決
at com.app.pub.service.impl.FileUpLoadImpl.<init>(FileUpLoadImpl.java:12)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
... 39 more
2016年10月21日09:07:40569錯誤[org.springframework.web.context.ContextLoader] - 上下文初始化失敗 組織.springframework。 beans.factory.BeanCreationException:在文件[E:\ javaProject.metadata.me_tcat \ webapps \ pre \ WEB-INF \ classes \ com \ app \ pub \ service \ impl \ FileUpLoadImpl.class中定義名稱爲'fileUpLoadImpl'的bean時出錯]:bean的實例化失敗;嵌套異常是org.springframework.beans.BeanInstantiationException:無法實例化bean類[com.app.pub.service.impl.FileUpLoadImpl]:構造函數拋出異常;嵌套的例外是java.lang.Error的:未解決的編譯問題: 進口java.util.Arrays中不能得到解決 數組不能得到解決
你可以顯示'FileUploadDaoImpl'的代碼嗎? – gschambial
我只想着如何上傳FileUploadDaoImpl的代碼?它總是顯示我感到非常困惑的錯誤。 – kent
你最近切換了你的java版本嗎?你目前使用哪個版本? – gschambial