I'm running WebLogic 12c and have several beans deployed as part of an EAR file. I also have a standalone client which I'm running from Eclipse that is trying to access the remote EJBs. I'm using annotations and therefore the global, portable JNDI names from EJB 3.1 (e.g. java:global/ifactory/ifactory-ejb-4.0.0/BomServiceBean!com.icumed.ifactory3.service.BomServiceRemote).
However, when the remote client tries to call the EBJ, I get the following exception:
11:45:03,400 ERROR [com.icumed.ifactory3.service.RemoteServiceFactoryImpl] [getService('java:global/ifactory/ifactory-ejb-4.0.0/BomServiceBean!com.icumed.ifactory3.service.BomServiceRemote')] Context may not be null
java.lang.AssertionError: Context may not be null
at weblogic.j2eeclient.SimpleContext.checkForNameUnderRemoteNode(SimpleContext.java:103)
at weblogic.j2eeclient.SimpleContext.internalLookup(SimpleContext.java:68)
at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:39)
at weblogic.jndi.SimpleContext.lookup(SimpleContext.java:86)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at com.icumed.ifactory3.service.RemoteServiceFactoryImpl.getService(RemoteServiceFactoryImpl.java:323)
The bean looks like this:
@Stateless
public class BomServiceBean extends AbstractSessionBean implements LocalBomService, BomServiceRemote
{
...
}
Further information: this error occurs when wlthint3client.jar and then wlclient.jar are on the classpath.
When only wlthint3client.jar is on the classpath, the exception is
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long
at weblogic.rmi.internal.StubInfo.getEnvQueriedJNDITimeout(StubInfo.java:256)
at weblogic.rmi.internal.StubInfo.setEnvQueriedJNDITimeout(StubInfo.java:242)
at weblogic.rmi.internal.StubInfo.readObject(StubInfo.java:238)
When wlclient.jar and then wlthint3client.jar are on the classpath, WebLogic prints this log message:
The connection attempt was rejected because the incoming protocol iiop is not enabled on channel Default[iiop][12]
How do I correct this?