>我使用 Hibernate 和 EJB 用 Eclipse 创建了一个动态 Web 项目。当我启动jboss时,我遇到的错误就是这个(第一行表示"连接被主机中的软件中止"(
14:56:01,061 ERROR [org.jboss.remoting.remote.connection] (Remoting "20160170-ait:MANAGEMENT" read-1) JBREM000200: Remote connection failed: java.io.IOException: Connessione interrotta dal software del computer host
14:56:04,792 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "FaultManager_WebService.war"
14:56:05,929 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-5) JNDI bindings for session bean named DisserviziWS in deployment unit deployment "FaultManager_WebService.war" are as follows:
java:global/FaultManager_WebService/DisserviziWS!com.alten.ws.DisserviziWS
java:app/FaultManager_WebService/DisserviziWS!com.alten.ws.DisserviziWS
java:module/DisserviziWS!com.alten.ws.DisserviziWS
java:global/FaultManager_WebService/DisserviziWS
java:app/FaultManager_WebService/DisserviziWS
java:module/DisserviziWS
14:56:06,157 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.unit."FaultManager_WebService.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."FaultManager_WebService.war".INSTALL: Failed to process phase INSTALL of deployment "FaultManager_WebService.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [rt.jar:1.6.0_38]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.6.0_38]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_38]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS014544: No EJB found with interface of type 'com.alten.dao.DisserviziDaoImpl' for binding com.alten.ws.DisserviziWS/disserviziDaoImpl
at org.jboss.as.ejb3.deployment.processors.EjbInjectionSource.getResourceValue(EjbInjectionSource.java:88)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.addJndiBinding(ModuleJndiBindingProcessor.java:227)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor$1.handle(ModuleJndiBindingProcessor.java:194)
at org.jboss.as.ee.component.ClassDescriptionTraversal.run(ClassDescriptionTraversal.java:54)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.processClassConfigurations(ModuleJndiBindingProcessor.java:162)
at org.jboss.as.ee.component.deployers.ModuleJndiBindingProcessor.deploy(ModuleJndiBindingProcessor.java:155)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
对于此类问题,我应该检查什么?
似乎你已经声明了一个DisserviziDaoImpl变量,@EJB注释来注入bean,顾名思义,这是你的Impl类型。您需要将变量声明更改为接口(本地或远程(,该接口显示为">DisserviziDao"。