What configuration should be configure in accessing thing permission in web logic server here is my code. I'm new in Web Logic help me how to look up with this problem and things to be configure in web logic server. i did the assigning of password at my web logic server IIOP from this link, but same thing happens. http://www.weblogicspecialist.com/sites/weblogicspecialist.nsf/docs/WebLogic%20CORBA%20NO_PERMISSION!opendocument
public static void main(String ar[])throws Exception{
String username="weblogic";
String password="@dm1n";
Properties p=new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
p.put(Context.PROVIDER_URL,"t3://192.168.1.188:7001");
p.put(Context.SECURITY_PRINCIPAL, username);
p.put(Context.SECURITY_CREDENTIALS, password);
InitialContext ctx=new InitialContext(p);
DataSource ds=(DataSource)ctx.lookup("ds_orclmrcos");
System.out.println(ds);
Connection con=ds.getConnection();
Statement st=con.createStatement();
st.executeUpdate("insert into TBL_CUSTOMER(CUST_ID, CUST_FNAME, CUST_MNAME, CUST_LNAME,CUST_ADDRESS,CUST_STATUS)"+
"VALUES('C-002', 'ALVIN', 'C.','TEST','MANILA', 'PERMANENT')");
System.out.println(" records inserted");
}
I'm facing this error
Exception in thread "main" 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(Utils.java:83)
at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:291)
at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:227)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.rest.client.Type4Conn.main(Type4Conn.java:24)
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(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(Unknown Source)
at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(Unknown Source)
at org.omg.CORBA.portable.ObjectImpl._invoke(Unknown Source)
at weblogic.corba.cos.naming._NamingContextAnyStub.resolve_any(_NamingContextAnyStub.java:80)
at weblogic.corba.j2ee.naming.ContextImpl.lookup(ContextImpl.java:267)
... 3 more