我有一个工作正常的春季项目。 我更新了我在我的机器上的java平台(通过自动的java更新通知)
在更新之后,当我编码时,我有一个蓝屏,现在我无法在Tomcat上部署解决方案,因为我一直有这个错误:
Aug 21, 2014 5:25:21 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'arepScreeningController' defined in file [E:\ORQR\css\code\IDE\webapps\AfDB-CSS\WEB-INF\classes\com\gcap\css\controller\ArepScreeningController.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.gcap.css.controller.ArepScreeningController]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
The import java.util.Arrays cannot be resolved
Arrays cannot be resolved
Arrays cannot be resolved
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.gcap.css.controller.ArepScreeningController]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
The import java.util.Arrays cannot be resolved
Arrays cannot be resolved
Arrays cannot be resolved
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)
... 20 more
Caused by: java.lang.Error: Unresolved compilation problems:
The import java.util.Arrays cannot be resolved
Arrays cannot be resolved
Arrays cannot be resolved
at com.gcap.css.controller.ArepScreeningController.<init>(ArepScreeningController.java:10)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
... 22 more
当我检查控制器时,我发现:
我的项目现在无法解决import java.util.Arrays;
!
一点帮助解决这个问题将不胜感激!
谢谢你!答案 0 :(得分:0)
这可能是一个很长的镜头但是因为在此之前你有一个蓝屏,可能是Java安装已经损坏。创建一个新的基本项目并尝试使用它来Arrays
,如果问题仍然存在,请重新安装Java;如果不是你有一些配置问题,它可能来自Maven或类似的,如果你正在使用它们。