【问题标题】:error ejb : "No EJB receiver available for handling"错误 ejb:“没有可用于处理的 EJB 接收器”
【发布时间】:2017-04-19 22:06:10
【问题描述】:

线程“AWT-EventQueue-0”java.lang.IllegalStateException 中的异常:EJBCLIENT000025:没有 EJB 接收器可用于处理调用上下文 org.jboss.ejb.client 的 [appName:, moduleName:, distinctName:Biblioo] 组合。 EJBClientInvocationContext@42aee012 在 org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:749) 在 org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:116) 在 org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:183) 在 org.jboss.ejb.client.EJBInvocationHandler.sendRequestWithPossibleRetries(EJBInvocationHandler.java:253) 在 org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:198) 在 org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:181) 在 org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:144) 在 com.sun.proxy.$Proxy0.addLivre(未知来源) 在 clientlourd.fenetre$2.actionPerformed(fenetre.java:128) 在 javax.swing.AbstractButton.fireActionPerformed(未知来源) 在 javax.swing.AbstractButton$Handler.actionPerformed(未知来源) 在 javax.swing.DefaultButtonModel.fireActionPerformed(未知来源) 在 javax.swing.DefaultButtonModel.setPressed(未知来源) 在 javax.swing.plaf.basic.BasicButtonListener.mouseReleased(未知来源) 在 java.awt.Component.processMouseEvent(未知来源) 在 javax.swing.JComponent.processMouseEvent(未知来源) 在 java.awt.Component.processEvent(未知来源) 在 java.awt.Container.processEvent(未知来源) 在 java.awt.Component.dispatchEventImpl(未知来源) 在 java.awt.Container.dispatchEventImpl(未知来源) 在 java.awt.Component.dispatchEvent(未知来源) 在 java.awt.LightweightDispatcher.retargetMouseEvent(未知来源) 在 java.awt.LightweightDispatcher.processMouseEvent(未知来源) 在 java.awt.LightweightDispatcher.dispatchEvent(未知来源) 在 java.awt.Container.dispatchEventImpl(未知来源) 在 java.awt.Window.dispatchEventImpl(未知来源) 在 java.awt.Component.dispatchEvent(未知来源) 在 java.awt.EventQueue.dispatchEventImpl(未知来源) 在 java.awt.EventQueue.access$500(未知来源) 在 java.awt.EventQueue$3.run(未知来源) 在 java.awt.EventQueue$3.run(未知来源) 在 java.security.AccessController.doPrivileged(本机方法) 在 java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(未知来源) 在 java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(未知来源) 在 java.awt.EventQueue$4.run(未知来源) 在 java.awt.EventQueue$4.run(未知来源) 在 java.security.AccessController.doPrivileged(本机方法) 在 java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(未知来源) 在 java.awt.EventQueue.dispatchEvent(未知来源) 在 java.awt.EventDispatchThread.pumpOneEventForFilters(未知来源) 在 java.awt.EventDispatchThread.pumpEventsForFilter(未知来源) 在 java.awt.EventDispatchThread.pumpEventsForHierarchy(未知来源) 在 java.awt.EventDispatchThread.pumpEvents(未知来源) 在 java.awt.EventDispatchThread.pumpEvents(未知来源) 在 java.awt.EventDispatchThread.run(未知来源)

找不到解决方案:\任何帮助?!

【问题讨论】:

标签: java jakarta-ee jboss ejb wildfly


【解决方案1】:

非常感谢!这是我的代码:

上下文 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 按钮 = new JButton("Ajouter");
button.addActionListener(new 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_ENABLED=false

remote.connections=default

remote.connection.default.host=127.0.0.1

remote.connection.default.port = 8080

remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false

remote.connection.default.username=admin

remote.connection.default.password=


@远程

公共接口interface_remote {

public void addLivre(Livre L);
public List<Livre> consulterLivres();
public Livre consulterlivres(Long ID_livre);
public void updateLivre(Livre L);
public void supprimerLivre(Long ID_livre);

}


@Stateless (name="biblio")

公共类 biblio_Impl 实现 interface_remote、interface_local {

@PersistenceContext(unitName="Biblio")
private EntityManager em;

@Override

    public void addLivre(Livre L)

    {

        em.persist(L);

    }

}

【讨论】:

    猜你喜欢
    • 2013-02-28
    • 1970-01-01
    • 2012-09-08
    • 2016-07-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-05
    • 2018-03-10
    相关资源
    最近更新 更多