Hibernate 没有可用于处理的EJB接收器
我正在开发一个简单的EJB应用程序我完成了EJB应用程序它的工作实体是在数据库中创建的,但是当我尝试使用RMI使用客户端EJB连接到我的EJB应用程序时,我出现了一个错误,即没有可用的EJB接收器来处理我创建了另一个动态web应用程序,该应用程序在控制台中使用soap web服务,我看到web服务是使用地址生成的,但我无法获取wsdl 客户端RMI代码:Hibernate 没有可用于处理的EJB接收器,hibernate,jpa,jakarta-ee,soap,ejb-3.1,Hibernate,Jpa,Jakarta Ee,Soap,Ejb 3.1,我正在开发一个简单的EJB应用程序我完成了EJB应用程序它的工作实体是在数据库中创建的,但是当我尝试使用RMI使用客户端EJB连接到我的EJB应用程序时,我出现了一个错误,即没有可用的EJB接收器来处理我创建了另一个动态web应用程序,该应用程序在控制台中使用soap web服务,我看到web服务是使用地址生成的,但我无法获取wsdl 客户端RMI代码: public class ClientRemote { public static void main(String[] args)
public class ClientRemote {
public static void main(String[] args) {
try {
Context ctx=new InitialContext();
String appName="BanqueEAR";
String moduleName="BanqueEJB";
String beanName="BK";
String remoteInterface=BanqueRemote.class.getName();
String name="ejb:"+appName+"/"+moduleName+"/"+beanName+"!"+remoteInterface;
BanqueRemote proxy=(BanqueRemote) ctx.lookup(name);
proxy.addCompte(new Compte());
proxy.addCompte(new Compte());
proxy.addCompte(new Compte());
Compte cp=proxy.getCompte(1L);
System.out.println(cp.getSolde());
proxy.verser(1L, 4000);
proxy.retirer(1L, 2000);
proxy.virement(1L,2L ,1000);
List<Compte> cptes=proxy.listComptes();
for(Compte c:cptes){
System.out.println(c.getCode()+":"+c.getSolde());
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
而web服务soap就是它的工作
address=http://localhost:8095/BanqueWeb/BanqueService
implementor=service.BanqueService
serviceName={http://service/}BanqueServiceService
portName={http://service/}BanqueServicePort
annotationWsdlLocation=null
wsdlLocationOverride=null
mtomEnabled=false
但是我无法从链接中获取wsdl
我无法使用客户端RMI连接到我的应用程序我有以下错误:
**INFO: EJBCLIENT000013: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@10587f1, receiver=Remoting connection EJB receiver [connection=org.jboss.ejb.client.remoting.ConnectionPool$PooledConnection@176b067,channel=jboss.ejb,nodename=pc-ayoub]} on channel Channel ID 982c07dd (outbound) of Remoting connection 01951908 to /127.0.0.1:8080
janv. 17, 2016 6:02:21 PM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver associate
INFO: EJBCLIENT000015: Initial module availability report for Remoting connection EJB receiver [connection=org.jboss.ejb.client.remoting.ConnectionPool$PooledConnection@176b067,channel=jboss.ejb,nodename=pc-ayoub] wasn't received during the receiver context association
java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:BanqueEAR, moduleName:BanqueEJB, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@80503
at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:749)**
有人知道我如何解决这个问题吗?你在用WildFly吗?我在尝试远程ejb连接时遇到了类似的问题,该连接在JBossAS7和WildFly 8的项目中工作。使用远程ejb调用有具体的原因吗?从体系结构的角度来看,这是非常不推荐的-早期的想法是让EJB直接相互通信,而不是像建议的那样,在顶部有一层隐藏业务逻辑,例如REST服务。Thx现在可以使用REST服务
java:global/BanqueEAR/BanqueEJB/BK!metier.BanqueLocal
java:app/BanqueEJB/BK!metier.BanqueLocal
java:module/BK!metier.BanqueLocal
java:global/BanqueEAR/BanqueEJB/BK!metier.BanqueRemote
java:app/BanqueEJB/BK!metier.BanqueRemote
java:module/BK!metier.BanqueRemote
java:jboss/exported/BanqueEAR/BanqueEJB/BK!metier.BanqueRemote
address=http://localhost:8095/BanqueWeb/BanqueService
implementor=service.BanqueService
serviceName={http://service/}BanqueServiceService
portName={http://service/}BanqueServicePort
annotationWsdlLocation=null
wsdlLocationOverride=null
mtomEnabled=false
**INFO: EJBCLIENT000013: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@10587f1, receiver=Remoting connection EJB receiver [connection=org.jboss.ejb.client.remoting.ConnectionPool$PooledConnection@176b067,channel=jboss.ejb,nodename=pc-ayoub]} on channel Channel ID 982c07dd (outbound) of Remoting connection 01951908 to /127.0.0.1:8080
janv. 17, 2016 6:02:21 PM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver associate
INFO: EJBCLIENT000015: Initial module availability report for Remoting connection EJB receiver [connection=org.jboss.ejb.client.remoting.ConnectionPool$PooledConnection@176b067,channel=jboss.ejb,nodename=pc-ayoub] wasn't received during the receiver context association
java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:BanqueEAR, moduleName:BanqueEJB, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@80503
at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:749)**