Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unhandled exception in lookup [Root exception is org.omg.CORBA.NO_PERMISSION  RSS feed

ronnie yizar
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

we are using a EJBclient invoker from a DB oracle instance
the code is deployed using javaload into the DB, we also deployed wlclient.jar and wl-j2ee-client.jar
our environment details:
DB oracle version:
JDK: 1.5._17

weblogic 11g and weblogic server version is
JDK 1.6._17

we cannot change JVM version client must be JRE5 and server JRE6 and the client must be run on DB side.

basically our client code request the weblogic server for a reference to an EJB object
then we use that object in order to interact with a thirdparty interface using webservice.

our code is :
public class CCSEJBInvoker {
* @throws Exception
public static HashMap getTemplateList(Long projectId,Long projTaskId,String orderType,Long dimUserId) throws Exception {
Context ctx=null;
CCSBeanRemote objCCS=null;
String result;
HashMap hashResult;
try {
objCCS = null;
result = "false";
hashResult = new HashMap();
hashResult.put("result", result);
ctx= CCSEJBInvokerConfig.getInitialContext();
System.out.println("here 1 line:39");
CCSBeanRemoteHome object = (CCSBeanRemoteHome)ctx.lookup("CCSBean");
System.out.println("here 2 line:41" + "object:" + object);
CCSBeanRemoteHome ccsHome = (CCSBeanRemoteHome)PortableRemoteObject.narrow( object , CCSBeanRemoteHome.class);
System.out.println("here 3 line:43" + "ccsHome:" +ccsHome);
objCCS = ccsHome.create();
System.out.println("here 4 line:45" + "objCCS:" +objCCS);
hashResult = objCCS.getTemplateList(projectId,projTaskId,orderType,dimUserId);
catch(Throwable t)
System.out.println("Throwable Exception:" + t.getMessage());
//throw new Exception("Throwable Runtime Exception");
System.out.println("here 5 line:47" + "hashResult:" + hashResult);
System.out.println("here 6 line:49");
catch(SystemException e)
System.out.println("Exception:" + "Error while lookup CCSBean =" + e.getMessage());
throw new CCSException("Error while lookup CCSBean");
catch (Exception e) {
System.out.println("Exception:" +e.getMessage());
throw e;
return hashResult;

in order to get the initialcontext we have the following class which is also loaded into DB
we are getting the creditials from our DB:

public class CCSEJBInvokerConfig {
public static synchronized Context getInitialContext() throws CCSException, NamingException,Exception,SystemException {
String user = getDIMParamValue("ccsWeblogicUser");

String password = getDIMParamValue("ccsWeblogicPassword");

String url = getDIMParamValue("ccsWeblogicURL");

System.out.println("user" + user + " password" + password + " url "
+ url);
System.out.println("Creating initial context");
Properties p = new Properties();
p.put("java.naming.provider.url", url);
System.setProperty("com.sun.CORBA.transport.ORBWaitForResponseTimeout", "7200000");
System.setProperty("com.sun.CORBA.transport.ORBTCPReadTimeouts", "1:60000:300:1");
System.setProperty("", "true");
System.setProperty("", "0");
System.setProperty("networkaddress.cache.ttl", "0");

if (user != null) {
System.out.println("user: " + user);
p.put("", user);
if (password == null) {
password = "";
p.put("", password);
InitialContext ic = null;
try {
ic = new InitialContext(p);
System.out.println("initial context created succesfuly");
catch (Exception e)
System.out.println("Exception:" + "Error while getting Initial Context =" + e.getMessage());
throw e;

return ic;

we are failing on the following row after we get the initialcontext when trying to do lookup for the bean:
CCSBeanRemoteHome object = (CCSBeanRemoteHome)ctx.lookup("CCSBean");

it is not happens all the time it is more like an intermediate issue that we cannot predict when the exception will come.
most of the time it comes on the first try of the session.

this is the exception from oracle trace log:

Feb 14, 2012 3:36:39 PM ccsInterface_preTaskCallout
INFO: projTaskID: 2377211 <-> projectID: 22411
Inside getDIMParamValue
Param Name:
Inside getDIMParamValue
Param Name:
Inside getDIMParamValue
Param Name:
user:weblogic password******* url t3://<<our host ip>>:8158
Creating initial context
initial context created succesfuly
here 1 line:39
Exception:Error while lookup CCSBean =Unhandled exception in lookup
javax.naming.NamingException: Unhandled exception in lookup [Root exception is org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: No]
at weblogic.corba.j2ee.naming.Utils.wrapNamingException(
at weblogic.corba.j2ee.naming.ContextImpl.lookup(
at weblogic.corba.j2ee.naming.ContextImpl.lookup(
at javax.naming.InitialContext.lookup(
at Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at com.cramer.rm.core.db.PKGExecDynamicJava.execute(
Caused by: org.omg.CORBA.NO_PERMISSION: vmcid: 0x0 minor code: 0 completed: No
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
at java.lang.reflect.Constructor.newInstance(
at java.lang.Class.newInstance0(
at java.lang.Class.newInstance(

we tried to add the following permission to the oracle instance:

call dbms_java.grant_permission( 'CRAMER', '', 'enableSubclassImplementation', '' );
call dbms_java.grant_permission(‘CRAMER’,’SYS:java.util.PropertyPermission’ ,‘com.sun.CORBA.transport.ORBTCPReadTimeouts’,’write’);
call dbms_java.grant_permission( 'CRAMER', 'SYS:java.util.PropertyPermission', 'com.sun.CORBA.transport.ORBWaitForResponseTimeout', 'write' )
call dbms_java.grant_permission(‘CRAMER’,’SYS:java.util.PropertyPermission’, ‘’,’write’);
call dbms_java.grant_permission(‘CRAMER’,’SYS:java.util.PropertyPermission’, ‘’,’write’);
call dbms_java.grant_permission(‘CRAMER’,’SYS:java.util.PropertyPermission’ ,‘networkaddress.cache.ttl’,’write’);

also to the java code:

System.setProperty("com.sun.CORBA.transport.ORBWaitForResponseTimeout", "7200000");
System.setProperty("com.sun.CORBA.transport.ORBTCPReadTimeouts", "1:60000:300:1");
System.setProperty("", "true");
System.setProperty("", "0");
System.setProperty("networkaddress.cache.ttl", "0");

also tried to add the following configuration to our weblogic console under the managed server IIOP Protocol definition:
Enable IIOP (checked)
Default IIOP Username : weblogic
Default IIOP Password : <<our password>>

we tried to load wlfullclient5.jar into DB but all weblogic classes become invalid so we restore our DB from the backup.

*this is our ejb-jar.xml:*

<ejb-jar version="2.1" xmlns="" xmlns:xsi="" xsi:schemaLocation="">
<!-- ******************** CONFIGURABLE ENTRY ************************ -->
<description>Application Name</description>
<env-entry-type>java.lang.String </env-entry-type>
<!-- <env-entry-value>CRAMER</env-entry-value> -->
<env-entry-value>Cramer Development</env-entry-value>
<!-- ******************** CONFIGURABLE ENTRY ************************ -->
<description>Version Number</description>
<env-entry-type>java.lang.String </env-entry-type>
<!-- <env-entry-value>CRAMER</env-entry-value> -->
<env-entry-value>11.4 Branch</env-entry-value>
<!-- ******************** CONFIGURABLE ENTRY ************************ -->

*_and this is our weblogic weblogic-ejb-jar.xml:_*

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-ejb-jar xmlns="">

we also tried to write a client in Eclipse using the same JDK 1.5._17 and wlclient.jar we dont get this exception at all even after runing it
in while (true) loop which every 2 sec (thread.sleep) creates the initialcontext and do a lookup for the EJB.

it must be something related to the implemntation of the oracle JVM on the DB which is different from the one we use in eclipse
how can we overcome the exception? are we missing any permission in the DB?, does it related to JNDI cache expired?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!