Oracle WLST创建自定义身份验证提供程序

时间:2019-02-18 09:47:05

标签: authentication weblogic classnotfoundexception weblogic12c wlst

我正在运行Weblogic 12.2.1.2,并尝试使用WLST和py脚本创建自定义身份验证提供程序。

该脚本是使用Admin Server gui中的record选项生成的。

当我尝试运行生成的脚本时,我遇到了ClassNotFoundException。

Creating MyCustomProvider provider
Starting an edit session ...
Started edit session, be sure to save and activate your changes once you are done.
Problem invoking WLST - Traceback (innermost last):
  File "/u01/oracle/createCustomProvider.py", line 10, in ?
    at weblogic.management.jmx.MBeanServerInvocationHandler.newProxyInstance(MBeanServerInvocationHandler.java:645)
    at weblogic.management.jmx.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:433)
    at com.sun.proxy.$Proxy33.createAuthenticationProvider(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)

java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: my.custom.package.MyCustomProviderIdentityAsserterV2MBean

包含MyCustomProvider类的jar位于$ DOMAIN_HOME / lib

CLASSPATH env会相应更新。

脚本创建失败,但是我可以通过Admin Server gui手动创建提供程序。

这是我的脚本代码:

connect('user','password','t3://localhost:7001')

edit()
print 'Creating MyCustomProvider provider'
startEdit()

cd('/')

cd('/SecurityConfiguration/base_domain/Realms/myrealm')
cmo.createAuthenticationProvider('MyCustomProvider', 'my.custom.package.MyCustomProviderIdentityAsserterV2')

cd('/SecurityConfiguration/base_domain/Realms/myrealm/AuthenticationProviders/MyCustomProvider')
cmo.setControlFlag('OPTIONAL')

activate()

脚本在第十行失败:

cmo.createAuthenticationProvider('MyCustomProvider', 'my.custom.package.MyCustomProviderIdentityAsserterV2')

您是否知道我在做什么错?

谢谢。

0 个答案:

没有答案