问题描述
- java.lang.VerifyError:
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'oaChangeService' defined in ServletContext resource [/WEB-INF/classes/spring/applicationContext-oaUserChange.xml]: Instantiation of bean failed; nested exception is java.lang.VerifyError: (class: com/sino/ies/oaChange/service/impl/OaChangeServiceImpl method: export signature: (Lcom/sino/ies/oaChange/form/OaChangeForm;Ljava/io/File;Ljavax/servlet/http/HttpServletRequest;Ljava/sql/Connection;)Ljava/io/File;) Incompatible argument to function
Caused by: java.lang.VerifyError: (class: com/sino/ies/oaChange/service/impl/OaChangeServiceImpl method: export signature: (Lcom/sino/ies/oaChange/form/OaChangeForm;Ljava/io/File;Ljavax/servlet/http/HttpServletRequest;Ljava/sql/Connection;)Ljava/io/File;) Incompatible argument to function
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.getDeclaredConstructor(Unknown Source)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:54)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:757)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:722)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
[2015-04-10 08:37:52894] [ERROR] org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/]
--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 'oaChangeService' defined in ServletContext resource [/WEB-INF/classes/spring/applicationContext-oaUserChange.xml]: Instantiation of bean failed; nested exception is java.lang.VerifyError: (class: com/sino/ies/oaChange/service/impl/OaChangeServiceImpl method: export signature: (Lcom/sino/ies/oaChange/form/OaChangeForm;Ljava/io/File;Ljavax/servlet/http/HttpServletRequest;Ljava/sql/Connection;)Ljava/io/File;) Incompatible argument to function
Caused by: java.lang.VerifyError: (class: com/sino/ies/oaChange/service/impl/OaChangeServiceImpl method: export signature: (Lcom/sino/ies/oaChange/form/OaChangeForm;Ljava/io/File;Ljavax/servlet/http/HttpServletRequest;Ljava/sql/Connection;)Ljava/io/File;) Incompatible argument to function
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.getDeclaredConstructor(Unknown Source)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:54)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:757)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:722)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:386)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
解决方案
根据错误提示检查代码,这样置给出错误一般人无法判断,谢谢
解决方案二:
方法的参数不对嘛 Incompatible argument to function
解决方案三:
Incompatible argument to function 不兼容的参数函数,
稍微提一下查看异常的方法,查看第一个Caused by的信息,
然后 向上看抛异常的是(有的话)哪个方法、第几行,找到哪个类哪一行的执行语句出错了
解决方案四:
这种exception通常jar包版本不对,编译对应的class 方法不对。
VerifyError!
解决方案五:
BeanCreationException: Error creating bean with name 'oaChangeService' defined in ServletContext resource 这个是在spring的 框架中bean的创建没能弄出来。你在提供些 资料给我 ,不然 我也不好给您回答,毕竟 注入的问题,我也经常弄错
时间: 2024-12-27 09:34:57