0

The following code works fine in JBoss, but when deployed in Apache Tomcat it gives

javax.naming.NameNotFoundException: Name [SPConnectorClient] is not bound in this Context. Unable to find [SPConnectorClient].

Code:

logger.info("SPConnectorClientEJB::callSubmitRequest");
        SPResponse response = new SPResponse();
        Object responseObj = null;
        try
        {
          InitialContext ctx = null;

          ctx = new InitialContext();
          logger.info("Got InitialContext");

          SPConnectorClientHome home = (SPConnectorClientHome)ctx.lookup("SPConnectorClient");

          SPConnectorClientRemote remote = null;
          remote = home.create();
          logger.info("Got Remote Object!");

Code in Setenv.sh file:

JAVA_OPTS="$JAVA_OPTS -DSPAppspecificJNDI=java:global/SP/sp_app_specific/SPConnectorClient!com.cdac.sp.SPConnectorClientRemote"

0 Answers0