Java 错误ejb:“没有可用于处理的ejb接收器”
线程AWT-EventQueue-0 java.lang.IllegalStateException:EJBClient 00025:没有EJB接收器可用于处理调用上下文org.jboss.EJB.client的[appName:,moduleName:,distinctName:Biblioo]组合。EJBClientInvocationContext@42aee012 位于org.jboss.ejb.client.EJBClientContext.requirejbreceiverejbclientcontext.java:749 位于org.jboss.ejb.client.ReceiverInterceptor.handleInvocationReceiverInterceptor.java:116 位于org.jboss.ejb.client.EJBClientInvocationContext.sendRequestEJBClientInvocationContext.java:183 位于org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetriesEJBInvocationHandler.java:253 位于org.jboss.ejb.client.ejbinationhandler.doinvokeejbinationhandler.java:198 位于org.jboss.ejb.client.ejbinationhandler.doinvokeejbinationhandler.java:181 位于org.jboss.ejb.client.EJBInvocationHandler.invokeEJBInvocationHandler.java:144 位于com.sun.proxy.$Proxy0.addlivruenknown Source 在clientlourd.fenetre$2.actionPerformedfenetre.java:128 位于javax.swing.AbstractButton.FireActionPerformed未知源 位于javax.swing.AbstractButton$Handler.actionPerformedUnknown Source 位于javax.swing.DefaultButtonModel.FireActionPerformed未知源 在javax.swing.DefaultButtonModel.setPressedUnknown源 位于javax.swing.plaf.basic.BasicButtonListener.MouseReleaseDunnown源 位于java.awt.Component.processMouseEventUnknown Source javax.swing.JComponent.processMouseEventUnknown源 位于java.awt.Component.ProcessEvent未知源 位于java.awt.Container.processEventUnknown Source 位于java.awt.Component.dispatchEventImplUnknown Source 位于java.awt.Container.dispatchEventImplUnknown Source 位于java.awt.Component.dispatchEventUnknown Source 位于java.awt.LightweightDispatcher.retargetMouseEventUnknown源 位于java.awt.LightweightDispatcher.processMouseEventUnknown源 位于java.awt.LightweightDispatcher.dispatchEventUnknown Source 位于java.awt.Container.dispatchEventImplUnknown Source 位于java.awt.Window.dispatchEventImplUnknown Source 位于java.awt.Component.dispatchEventUnknown Source 位于java.awt.EventQueue.dispatchEventImplUnknown Source 位于java.awt.EventQueue.access$500Unknown Source 位于java.awt.EventQueue$3.run未知源 位于java.awt.EventQueue$3.run未知源 位于java.security.AccessController.doPrivilegeEdNative方法 位于java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilegeUnknown Source 位于java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilegeUnknown Source 位于java.awt.EventQueue$4.run未知源 位于java.awt.EventQueue$4.run未知源 位于java.security.AccessController.doPrivilegeEdNative方法 位于java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilegeUnknown Source 位于java.awt.EventQueue.dispatchEventUnknown Source 位于java.awt.EventDispatchThread.pumpOneEventForFiltersUnknown Source 位于java.awt.EventDispatchThread.pumpEventsForFilterUnknown源 位于java.awt.EventDispatchThread.pumpEventsForHierarchyUnknown Source 位于java.awt.EventDispatchThread.pumpEventsUnknown源 位于java.awt.EventDispatchThread.pumpEventsUnknown源 位于java.awt.EventDispatchThread.runUnknown SourceJava 错误ejb:“没有可用于处理的ejb接收器”,java,jakarta-ee,jboss,ejb,wildfly,Java,Jakarta Ee,Jboss,Ejb,Wildfly,线程AWT-EventQueue-0 java.lang.IllegalStateException:EJBClient 00025:没有EJB接收器可用于处理调用上下文org.jboss.EJB.client的[appName:,moduleName:,distinctName:Biblioo]组合。EJBClientInvocationContext@42aee012 位于org.jboss.ejb.client.EJBClientContext.requirejbreceiverejbcl
找不到解决方案:\n有什么帮助吗 非常感谢您!这是我的密码: 上下文ctx=null
try{
Properties p = new Properties();
p.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
ctx = new InitialContext(p);
final interface_remote stub =(interface_remote) ctx.lookup("ejb://Biblioo//biblio!bib.interface_remote");
JButton button=新JButton焦耳;
button.AddActionListener新建ActionListener{
public void actionPerformed(ActionEvent arg0) {
stub.addLivre(new Livre());
}
});
捕获异常e
{
e.toString();
}
finally
{
try {
ctx.close();
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
endpoint.name=客户端端点
remote.connectionprovider.create.options.org.xnio.options.SSL\u ENABLED=false
remote.connections=默认值
remote.connection.default.host=127.0.0.1
remote.connection.default.port=8080
remote.connection.default.connect.options.org.xnio.options.SASL\u POLICY\u NOANONYMOUS=false
remote.connection.default.username=admin
remote.connection.default.password=
@遥远的
远程公共接口
{
@凌驾
public void addLivre(Livre L)
{
em.persist(L);
}
}向我们展示您的代码。可能重复的问题已经有十多个答案了。您看过其中任何一个吗?谢谢大家,问题出在jndi中
@PersistenceContext(unitName="Biblio")
private EntityManager em;
public void addLivre(Livre L)
{
em.persist(L);
}