this is my file below.
===
package java_source;

import weblogic.management.Helper;
import weblogic.management.MBeanHome;
import weblogic.management.security.authentication.GroupE ditorMBean;
import weblogic.management.security.authentication.UserEd itorMBean;
import weblogic.management.security.authentication.Authen ticationProviderMBean;
import weblogic.management.security.authentication.*;

public class ManageInfor
{
public static boolean createuser(String username,String userpwd,String description)
{
String adminuser="weblogic";
String adminpwd="weblogic";
String url="t3://localhost:7001";

boolean result=false;
MBeanHome adminHome=(MBeanHome)Helper.getAdminMBeanHome(admi nuser,adminpwd,url);
AuthenticationProviderMBean[] providers = adminHome.getActiveDomain().getSecurityConfigurati on().findDefaultRealm().getAuthenticationProviders ();
int pnum=providers.length;
if(pnum>0)
{
for(int i=0;i {
UserEditorMBean editor = (UserEditorMBean)providers;
try
{
boolean bb = editor.userExists(username);
if(!(bb))
{
editor.createUser(username,userpwd,description);
result=true;
break;
}
}
catch(Exception e)
{
e.printStackTrace();
result=false;
}
}
}
return result;
}
}
===
The error occured in this line which content is "editor.createUser(username,userpwd,description);".

weblogic.management.NoAccessRuntimeException:
[Management:141102]Subject: principals=[] does not have access to perform Admin actions.

why?