22:17:47,204 ERROR [org.springframework.web.servlet.DispatcherServlet] (MSC service thread 1-5) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Emp_ZzService' defined in ServletContext resource [/WEB-INF/application-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.hetaoo.service.Emp_ZzService]: Specified class is an interface at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1039) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:985) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:938) [spring-context-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) [spring-context-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:602) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:521) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:462) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at javax.servlet.GenericServlet.init(GenericServlet.java:242) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07] Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.hetaoo.service.Emp_ZzService]: Specified class is an interface at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:67) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1032) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] ... 27 more 22:17:47,221 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/Server]] (MSC service thread 1-5) StandardWrapper.Throwable: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Emp_ZzService' defined in ServletContext resource [/WEB-INF/application-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.hetaoo.service.Emp_ZzService]: Specified class is an interface at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1039) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:985) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:938) [spring-context-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) [spring-context-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:602) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:521) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:462) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at javax.servlet.GenericServlet.init(GenericServlet.java:242) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07] Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.hetaoo.service.Emp_ZzService]: Specified class is an interface at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:67) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1032) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] ... 27 more 22:17:47,238 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/Server]] (MSC service thread 1-5) Servlet /Server threw load() exception: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.hetaoo.service.Emp_ZzService]: Specified class is an interface at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:67) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1032) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:985) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:636) [spring-beans-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:938) [spring-context-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) [spring-context-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:602) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:521) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:462) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) [spring-webmvc-3.2.16.RELEASE.jar:3.2.16.RELEASE] at javax.servlet.GenericServlet.init(GenericServlet.java:242) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3655) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3873) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
httpinvoker spring配置文件
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd"> <beans> <bean id="Emp_ZzService" class="com.hetaoo.service.Emp_ZzService" /> <!-- 基于Url映射方式,这个配置,就是把userService接口,提供给远程调用 --> <bean id="httpEmp_ZzService" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter"> <property name="service" ref="Emp_ZzService"/> <property name="serviceInterface" value="com.hetaoo.service.Emp_ZzService"/> </bean> <!-- 远程服务的URL --> <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="mappings"> <props> <prop key="/httpEmp_ZzService">httpEmp_ZzService</prop> </props> </property> </bean> </beans>
老外的回答
You can't, Spring needs something it can make an instance from, the interface isn't enough.
In your spring.xml, the value of the class attribute for your bean with id="humanResourceService" should be the name of your implementation class, not the interface. Spring needs you to tell it what implementation class you want it to use for this.
相关推荐
@AspectJ配置Spring AOP,文档,Aspect jar包, 可运行的demo,
nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator]: ...
<br> 测试代码完成测试 <br> 报错:Cannot instantiate class: org.jnp.interfaces.NamingContextFactory <br> 添加 引用 <br>继续报错是因为JNDI访问名称错误,也是用了原来的那个了。哈哈。...
学习spring boot的一个简单demo 导入eclipse可以直接使用,希望我的分享能帮助到你
No Hibernate Session bound to thread,没有绑定线程解决办法,找了好久才找到的
解决目前memcached不支持hibernate4的缺陷,hibernate配置<property name="hibernate.cache.region.factory_class">com.googlecode.hibernate.memcached.MemcachedRegionFactory</property>
phpmailer是一个php发送邮件的类库; 在window下使用基本没有问题,如果在linux上无法使用,出现could not connect to smtp host错误,可以参考我文章中的解决方案
# field metadata is used to instantiate the marshmallow field height : float = field ( metadata = { "validate" : marshmallow . validate . Range ( min = 0 )}) name : str = field ( default = ...
b) it is also possible to instantiate the 'MapProducer' class directly inside a java application, then to process an openGis request by passing the request string inside a 'ClientRequest'. After the ...
我的版本 unbuntu 64位(2) fabship2 runApp.sh buildchannel.sh ... cause:instantiate proposal resulted in an error :: Error: 2 UNKNOWN: chaincode error (status: 500, message: is not a valid endorseme
Unity3D教程:Prefabs与Instantiate1
The class will be used provided at least one of the interface's methods is implemented. A single instance of BurpExtender will be instantiated and shared between all plugins. To make use of the ...
类解析器 查找和实例化带有样式的类。 :flexed_biceps: 入门 from class_resolver import Resolver ...# Instantiate with a dictionary assert A ( name = 'hi' ) == resolver . make ( 'A' , { 'name' : 'h
定义:Define an interface for creating an object,but let subclasses decide which class to instantiate.Factory Method lets a class defer instantiation to subclasses. (定义一个用于创建对象的接口,让...
jain sip 入门文档jain sip 入门文档jain sip 入门文档jain sip 入门文档jain sip 入门文档jain sip 入门文档jain sip 入门文档jain sip 入门文档
React堆 用于React的声明性WebAssembly实例安装您可以使用...// supposing an "add.wasm" module that exports a single function "add"const ExampleComponent = ( ) => ( < Wasm xss=removed> { ( { loading , erro
学习使用Prefabs和instantiate使用方法!
10.000 empty runs: 191nsdefault empty console project: 563msdefault + include "windows.h": 607ms default + instantiate 1000 std::vector<T>'s: 607msdefault + instantiate 10.000 std::vector<T>'s: 1064...
if a browser obtained a JPEG image, this framework would enable the browser to identify that stream of data as an JPEG image, and from that type, the browser could locate and instantiate an object ...
java二进制补码源码 Java程序的基本结构练习:创建同一个类的多个对象 请在中创建指定类的多个对象并修改其成员。在提交Pull Request之前,你应当在本地确保所有代码已经编译通过,并且通过了测试(mvn ...