EJB in EAR can NOT be accessed from remote client!
ybxiang.china Aug 2, 2012 6:41 AMDear all,
I studied jboss-as-quickstarts-7.1.1.CR2\ejb-remote carefully and I can access the EJB bean from remote client successfully.
But, after I put the ejb jar in an ear, and the jndi name follow the syntax:
ejb:<appName>/<moduleName>/<distinctName>/<beanName>!<viewClassName>?stateful
I got an exception which will be described bellow.
I tried new jndi syntax(from https://community.jboss.org/wiki/JBoss7AndEjbRemoteCallWithSecurity):
java:<appName>/<moduleName>/<distinctName>/<beanName>!<viewClassName>?stateful
I still got an exception which will be described bellow.
1. pure EJB jar test
1.1 ejb jar structure
[-]nms-server-ejb.jar
import.sql
[-]META-INF
MANIFEST.MF
beans.xml
persistence.xml
[-]com
[-]ybxiang
[-]nms
[-]server
[-]ejb
[-]session
ISecuredRemoteSession.class
SecuredRemoteSession.class
Please ignore the beans.xml and persistence.xml. They have nothing to do with our discussioin.
1.2 code
(a) ISecuredRemoteSession.java
package com.ybxiang.nms.server.ejb.session;
public interface ISecuredRemoteSession {
int add(int a, int b);
int subtract(int a, int b);
}
(b) SecuredRemoteSession.java
package com.ybxiang.nms.server.ejb.session;
import javax.ejb.Remote;
import javax.ejb.Stateless;
@Stateless
@Remote(ISecuredRemoteSession.class)
public class SecuredRemoteSession implements ISecuredRemoteSession{
@Override
public int add(int a, int b) {
return a + b;
}
@Override
public int subtract(int a, int b) {
return a - b;
}
}
1.3 deploy and start JBoss AS 7
after nms-server-ejb.jar is thrown in jboss-as-7.1.1.Final\standalone\deployments, I start the JBoss AS with command:
standalone.bat -b 192.168.1.100
1.4 client code
I modified RemoteEJBClient according to https://community.jboss.org/thread/177302?start=0&tstart=0, so client does NOT need boss-ejb-client.properties
package com.ybxiang.nms.simpleclient;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.security.auth.callback.CallbackHandler;
import org.jboss.ejb.client.ContextSelector;
import org.jboss.ejb.client.EJBClientConfiguration;
import org.jboss.ejb.client.EJBClientContext;
import org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration;
import org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector;
import org.jboss.naming.remote.client.InitialContextFactory;
import org.xnio.OptionMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Properties;
import com.ybxiang.nms.server.ejb.session.ISecuredRemoteSession;
public class MyRemoteEJBClient {
public static void main(String[] args) throws Exception {
invokeStatelessBean();
}
private static void invokeStatelessBean() throws Exception {
// Let's lookup the remote stateless calculator
final ISecuredRemoteSession statelessRemoteCalculator = lookupRemoteStatelessCalculator();
System.out.println("Obtained a remote stateless calculator for invocation");
// invoke on the remote calculator
int a = 204;
int b = 340;
System.out.println("Adding " + a + " and " + b + " via the remote stateless calculator deployed on the server");
int sum = statelessRemoteCalculator.add(a, b);
System.out.println("Remote calculator returned sum = " + sum);
if (sum != a + b) {
throw new RuntimeException("Remote stateless calculator returned an incorrect sum " + sum + " ,expected sum was " + (a + b));
}
// try one more invocation, this time for subtraction
int num1 = 3434;
int num2 = 2332;
System.out.println("Subtracting " + num2 + " from " + num1 + " via the remote stateless calculator deployed on the server");
int difference = statelessRemoteCalculator.subtract(num1, num2);
System.out.println("Remote calculator returned difference = " + difference);
if (difference != num1 - num2) {
throw new RuntimeException("Remote stateless calculator returned an incorrect difference " + difference + " ,expected difference was " + (num1 - num2));
}
}
private static ISecuredRemoteSession lookupRemoteStatelessCalculator() throws Exception {
//return lookupRemoteStatelessCalculator_WithoutPropertieFile_method1();
return lookupRemoteStatelessCalculator_WithoutPropertieFile_method2_ejb();//ejb
//return lookupRemoteStatelessCalculator_WithoutPropertieFile_method2_ear();//ear
}
private static ISecuredRemoteSession lookupRemoteStatelessCalculator_WithoutPropertieFile_method2_ejb() throws Exception {
String jndiName = "ejb:/nms-server-ejb/SecuredRemoteSession!" + ISecuredRemoteSession.class.getName();
// fetch the Properties somehow (depending on user application's requirement)
final Properties clientConfigProps = new Properties();
{
clientConfigProps.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false");
clientConfigProps.put("remote.connections", "default");
clientConfigProps.put("remote.connection.default.host", "192.168.1.100");
clientConfigProps.put("remote.connection.default.port", "4447");
clientConfigProps.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");
//clientConfigProps.put("jboss.naming.client.ejb.context", "true");
}
// Create a EJB client configuration from the properties
final EJBClientConfiguration ejbClientConfiguration = new PropertiesBasedEJBClientConfiguration(clientConfigProps);
// EJB client context selection is based on selectors. So let's create a ConfigBasedEJBClientContextSelector which uses our EJBClientConfiguration created in previous step
final ContextSelector<EJBClientContext> ejbClientContextSelector = new ConfigBasedEJBClientContextSelector(ejbClientConfiguration);
// Now let's setup the EJBClientContext to use this selector
final ContextSelector<EJBClientContext> previousSelector = EJBClientContext.setSelector(ejbClientContextSelector);
// Now that we have setup the EJB client context (backed by our client configuration and receiver information),
// let's now do the JNDI lookup and invoke on the proxies
final Hashtable props = new Hashtable();
// setup the ejb: namespace URL factory
props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
final Context context = new javax.naming.InitialContext(props);
return (ISecuredRemoteSession)context.lookup(jndiName);
}
}
1.5 run client
I put jboss-as-7.1.1.Final/bin/jboss-client.jar in client class path, Now I run the client successfully with bellow log:
Aug 02, 2012 2:19:49 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.3.GA
Aug 02, 2012 2:19:50 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.3.GA
Aug 02, 2012 2:19:50 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.3.GA
Aug 02, 2012 2:19:52 PM org.jboss.ejb.client.remoting.VersionReceiver handleMessage
INFO: Received server version 1 and marshalling strategies [river]
Aug 02, 2012 2:19:52 PM org.jboss.ejb.client.remoting.ChannelAssociation$ResponseReceiver handleMessage
WARN: Unsupported message received with header 0xffffffff
Aug 02, 2012 2:19:52 PM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver associate
INFO: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@10dae16, receiver=Remoting connection EJB receiver [connection=Remoting connection <be834a>,channel=jboss.ejb,nodename=cv0018179n0]} on channel Channel ID c1ca0f70 (outbound) of Remoting connection 017e72d1 to /192.168.1.100:4447
Aug 02, 2012 2:19:52 PM org.jboss.ejb.client.EJBClient <clinit>
INFO: JBoss EJB Client version 1.0.5.Final
Obtained a remote stateless calculator for invocation
Adding 204 and 340 via the remote stateless calculator deployed on the server
Remote calculator returned sum = 544
Subtracting 2332 from 3434 via the remote stateless calculator deployed on the server
Remote calculator returned difference = 1102
2. EJB in ear
Now I want to put this ejb in an ear.
2.1 structure of nms-server-ear.ear
[-]nms-server-ear.ear
[-]META-INF
MANIFEST.MF
application.xml
[-]lib
[-]nms-server-ejb.jar
import.sql
[-]META-INF
MANIFEST.MF
beans.xml
persistence.xml
[-]com
[-]ybxiang
[-]nms
[-]server
[-]ejb
[-]session
ISecuredRemoteSession.class
SecuredRemoteSession.class
[-]nms-server-war.war
index.html
[-]META-INF
MANIFEST.MF
[-]WEB-INF
beans.xml
faces-config.xml
[-]classes
messages_en.properties
[-]META-INF
[-]lib
2.2 code
(a) application.xml
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="6"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd">
<display-name>nms-server-ear</display-name>
<initialize-in-order>true</initialize-in-order>
<module>
<ejb>nms-server-ejb.jar</ejb>
</module>
<module>
<web>
<web-uri>nms-server-war.war</web-uri>
<context-root>/nms</context-root>
</web>
</module>
</application>
other files have nothing to do with the EJB access, please ignore them.
2.3 deploy
Now, I remove nms-server-ejb.jar from jboss-as-7.1.1.Final\standalone\deployments and put nms-server-ear.ear in jboss-as-7.1.1.Final\standalone\deployments.
From bellow log, we can see that the ear is deployed successfully:
14:29:44,984 INFO [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named SecuredRemoteSession in deployment unit subdeployment "nms-server-ejb.jar" of deployment "nms-server-ear.ear" are as follows:
java:global/nms-server-ear/nms-server-ejb/SecuredRemoteSession!com.ybxiang.nms.server.ejb.session.ISecuredRemoteSession
java:app/nms-server-ejb/SecuredRemoteSession!com.ybxiang.nms.server.ejb.session.ISecuredRemoteSession
java:module/SecuredRemoteSession!com.ybxiang.nms.server.ejb.session.ISecuredRemoteSession
java:jboss/exported/nms-server-ear/nms-server-ejb/SecuredRemoteSession!com.ybxiang.nms.server.ejb.session.ISecuredRemoteSession
java:global/nms-server-ear/nms-server-ejb/SecuredRemoteSession
java:app/nms-server-ejb/SecuredRemoteSession
java:module/SecuredRemoteSession
14:29:45,000 INFO [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016002: Processing weld deployment nms-server-war.war
14:29:45,218 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016005: Starting Services for CDI deployment: nms-server-ear.ear
14:29:45,312 INFO [org.jboss.as.jpa] (MSC service thread 1-7) JBAS011402: Starting Persistence Unit Service 'nms-server-ear.ear/nms-server-ejb.jar#nms-server'
14:29:45,312 INFO [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-7) HHH000204: Processing PersistenceUnitInfo [
name: nms-server
...]
14:29:45,328 INFO [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-7) HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
14:29:45,343 INFO [org.hibernate.dialect.Dialect] (MSC service thread 1-7) HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
14:29:45,375 INFO [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (MSC service thread 1-7) HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory
14:29:45,390 INFO [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-7) HHH000397: Using ASTQueryTranslatorFactory
14:29:46,140 INFO [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-7) HHH000228: Running hbm2ddl schema update
14:29:46,140 INFO [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-7) HHH000102: Fetching database metadata
14:29:46,156 INFO [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-7) HHH000396: Updating schema
14:29:46,171 INFO [org.hibernate.tool.hbm2ddl.SchemaUpdate] (MSC service thread 1-7) HHH000232: Schema update complete
14:29:46,171 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016008: Starting weld service for deployment nms-server-ear.ear
14:29:49,031 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-1) Initializing Mojarra 2.1.7-jbossorg-1 (20120227-1401) for context '/nms'
14:29:50,390 INFO [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /nms
14:29:50,484 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "nms-server-ear.ear"
2.4 client1
Almost the same as above client, exception red codes
package com.ybxiang.nms.simpleclient;
import java.util.Hashtable;
import java.util.Properties;
import javax.naming.Context;
import org.jboss.ejb.client.ContextSelector;
import org.jboss.ejb.client.EJBClientConfiguration;
import org.jboss.ejb.client.EJBClientContext;
import org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration;
import org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector;
import org.jboss.naming.remote.client.InitialContextFactory;
import com.ybxiang.nms.server.ejb.session.ISecuredRemoteSession;
public class RemoteEJBClient_ear {
public static void main(String[] args) throws Exception {
invokeStatelessBean();
}
private static void invokeStatelessBean() throws Exception {
//same as above client
}
private static ISecuredRemoteSession lookupRemoteStatelessCalculator() throws Exception {
return lookupRemoteStatelessCalculator_WithoutPropertieFile_method2_ear();//ear
}
private static ISecuredRemoteSession lookupRemoteStatelessCalculator_WithoutPropertieFile_method2_ear() throws Exception {
//String jndiName = "ejb:/nms-server-ear/nms-server-ejb/SecuredRemoteSession!" + ISecuredRemoteSession.class.getName();//ear
String jndiName = "java:/nms-server-ear/nms-server-ejb/SecuredRemoteSession!" + ISecuredRemoteSession.class.getName();//ear
// fetch the Properties somehow (depending on user application's requirement)
final Properties p = new Properties();//我们可以从属性文件里面读取,也可以自己构造!
{
p.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false");
p.put("remote.connections", "default");
p.put("remote.connection.default.host", "192.168.1.100");
p.put("remote.connection.default.port", "4447");
p.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");
//clientConfigProps.put("jboss.naming.client.ejb.context", "true");
}
// Create a EJB client configuration from the properties
final EJBClientConfiguration ejbClientConfiguration = new PropertiesBasedEJBClientConfiguration(p);
// EJB client context selection is based on selectors. So let's create a ConfigBasedEJBClientContextSelector which uses our EJBClientConfiguration created in previous step
final ContextSelector<EJBClientContext> ejbClientContextSelector = new ConfigBasedEJBClientContextSelector(ejbClientConfiguration);
// Now let's setup the EJBClientContext to use this selector
final ContextSelector<EJBClientContext> previousSelector = EJBClientContext.setSelector(ejbClientContextSelector);
// Now that we have setup the EJB client context (backed by our client configuration and receiver information),
// let's now do the JNDI lookup and invoke on the proxies
final Hashtable props = new Hashtable();
// setup the ejb: namespace URL factory
props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
final Context context = new javax.naming.InitialContext(props);
return (ISecuredRemoteSession)context.lookup(jndiName);
}
}
I got bellow exception:
Aug 02, 2012 6:32:28 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.3.GA
Aug 02, 2012 6:32:28 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.3.GA
Aug 02, 2012 6:32:28 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.3.GA
Aug 02, 2012 6:32:28 PM org.jboss.ejb.client.remoting.VersionReceiver handleMessage
INFO: Received server version 1 and marshalling strategies [river]
Aug 02, 2012 6:32:28 PM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver associate
INFO: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@3d58b2, receiver=Remoting connection EJB receiver [connection=Remoting connection <1382988>,channel=jboss.ejb,nodename=cv0018179n0]} on channel Channel ID de450599 (outbound) of Remoting connection 005e60f2 to /192.168.1.100:4447
Aug 02, 2012 6:32:28 PM org.jboss.ejb.client.remoting.ChannelAssociation$ResponseReceiver handleMessage
WARN: Unsupported message received with header 0xffffffff
Exception in thread "main" javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:344)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at com.ybxiang.nms.simpleclient.RemoteEJBClient_ear.lookupRemoteStatelessCalculator_WithoutPropertieFile_method2_ear(RemoteEJBClient_ear.java:79)
at com.ybxiang.nms.simpleclient.RemoteEJBClient_ear.lookupRemoteStatelessCalculator(RemoteEJBClient_ear.java:48)
at com.ybxiang.nms.simpleclient.RemoteEJBClient_ear.invokeStatelessBean(RemoteEJBClient_ear.java:25)
at com.ybxiang.nms.simpleclient.RemoteEJBClient_ear.main(RemoteEJBClient_ear.java:20)
2.5 client2
package com.ybxiang.nms.simpleclient;
import java.util.Hashtable;
import java.util.Properties;
import javax.naming.Context;
import org.jboss.ejb.client.ContextSelector;
import org.jboss.ejb.client.EJBClientConfiguration;
import org.jboss.ejb.client.EJBClientContext;
import org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration;
import org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector;
import org.jboss.naming.remote.client.InitialContextFactory;
import com.ybxiang.nms.server.ejb.session.ISecuredRemoteSession;
public class RemoteEJBClient_ear {
public static void main(String[] args) throws Exception {
invokeStatelessBean();
}
private static void invokeStatelessBean() throws Exception {
//same as above client
}
private static ISecuredRemoteSession lookupRemoteStatelessCalculator() throws Exception {
return lookupRemoteStatelessCalculator_WithoutPropertieFile_method2_ear();//ear
}
private static ISecuredRemoteSession lookupRemoteStatelessCalculator_WithoutPropertieFile_method2_ear() throws Exception {
String jndiName = "ejb:/nms-server-ear/nms-server-ejb/SecuredRemoteSession!" + ISecuredRemoteSession.class.getName();//ear
//String jndiName = "java:/nms-server-ear/nms-server-ejb/SecuredRemoteSession!" + ISecuredRemoteSession.class.getName();//ear
// fetch the Properties somehow (depending on user application's requirement)
final Properties p = new Properties();//我们可以从属性文件里面读取,也可以自己构造!
{
p.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false");
p.put("remote.connections", "default");
p.put("remote.connection.default.host", "192.168.1.100");
p.put("remote.connection.default.port", "4447");
p.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");
//clientConfigProps.put("jboss.naming.client.ejb.context", "true");
}
// Create a EJB client configuration from the properties
final EJBClientConfiguration ejbClientConfiguration = new PropertiesBasedEJBClientConfiguration(p);
// EJB client context selection is based on selectors. So let's create a ConfigBasedEJBClientContextSelector which uses our EJBClientConfiguration created in previous step
final ContextSelector<EJBClientContext> ejbClientContextSelector = new ConfigBasedEJBClientContextSelector(ejbClientConfiguration);
// Now let's setup the EJBClientContext to use this selector
final ContextSelector<EJBClientContext> previousSelector = EJBClientContext.setSelector(ejbClientContextSelector);
// Now that we have setup the EJB client context (backed by our client configuration and receiver information),
// let's now do the JNDI lookup and invoke on the proxies
final Hashtable props = new Hashtable();
// setup the ejb: namespace URL factory
props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
final Context context = new javax.naming.InitialContext(props);
return (ISecuredRemoteSession)context.lookup(jndiName);
}
}
I got bellow exception:
Aug 02, 2012 6:37:00 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.3.GA
Aug 02, 2012 6:37:00 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.3.GA
Aug 02, 2012 6:37:00 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.3.GA
Aug 02, 2012 6:37:01 PM org.jboss.ejb.client.remoting.VersionReceiver handleMessage
INFO: Received server version 1 and marshalling strategies [river]
Aug 02, 2012 6:37:01 PM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver associate
INFO: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@3d58b2, receiver=Remoting connection EJB receiver [connection=Remoting connection <1382988>,channel=jboss.ejb,nodename=cv0018179n0]} on channel Channel ID cef87624 (outbound) of Remoting connection 005e60f2 to /192.168.1.100:4447
Aug 02, 2012 6:37:01 PM org.jboss.ejb.client.remoting.ChannelAssociation$ResponseReceiver handleMessage
WARN: Unsupported message received with header 0xffffffff
Aug 02, 2012 6:37:01 PM org.jboss.ejb.client.EJBClient <clinit>
INFO: JBoss EJB Client version 1.0.5.Final
Obtained a remote stateless calculator for invocation
Adding 204 and 340 via the remote stateless calculator deployed on the server
Exception in thread "main" java.lang.IllegalStateException: No EJB receiver available for handling [appName:,modulename:nms-server-ear,distinctname:nms-server-ejb] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@8c3770
at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:584)
at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:119)
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)
at $Proxy0.add(Unknown Source)
at com.ybxiang.nms.simpleclient.RemoteEJBClient_ear.invokeStatelessBean(RemoteEJBClient_ear.java:31)
at com.ybxiang.nms.simpleclient.RemoteEJBClient_ear.main(RemoteEJBClient_ear.java:20)
This exception means that the EJB can NOT be found!
-
code.zip 2.8 MB