WEB LOGIC:引起:org.omg.CORBA.NO_PERMISSION:vmcid:0x0次要代码:0已完成:否

时间:2013-11-19 02:12:01

标签: web-services weblogic weblogic11g weblogic12c java-client

  

在访问Web逻辑服务器中的事物权限时应配置哪些配置是我的代码。我是Web Logic的新手帮助我如何查看这个问题以及要在Web逻辑服务器中配置的东西。   我通过此链接在我的Web逻辑服务器IIOP上分配了密码,但同样的事情发生了。   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");


    }
  

我正面临这个错误

 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

0 个答案:

没有答案