在离线模式下为Weblogic 12.2.1.3创建数据源

时间:2018-10-25 17:25:56

标签: weblogic weblogic12c wlst

我想在离线模式下使用WLST创建Weblogic数据源,并且在创建属性时遇到错误:

create('my_Prop','Properties')

这是整个脚本:

readDomain('C:\\weblogic12213\\user_projects\\domains\\myDomain')
cd('/')
create('myJDBC', 'JDBCSystemResource')
cd('/JDBCSystemResource/myJDBC')
set('Target','myApp')
cd('/JDBCSystemResource/myJDBC/JdbcResource/myJDBC')
cmo.setName('myJDBC')

create('myJDBC','JDBCDataSourceParams')
cd('JDBCDataSourceParams/myJDBC')
set('JNDIName', java.lang.String('jdbc.myJDBC'))
set('GlobalTransactionsProtocol', java.lang.String('OnePhaseCommit'))

cd('/JDBCSystemResource/myJDBC/JdbcResource/myJDBC')
create('myJDBC','JDBCDriverParams')
cd('JDBCDriverParams/myJDBC')
set('DriverName','weblogic.jdbc.sqlserver.SQLServerDriver')
set('URL','jdbc:weblogic:sqlserver://localhost:1433;allowPortWithNamedInstance=true')
set('PasswordEncrypted', 'myPassword')
set('UseXADataSourceInterface', 'false')

create('my_Prop','Properties')
cd('Properties/myJDBC')
create('user','Property')
cd('Property/user')
set('Value', 'myUser')

cd('/JDBCSystemResource/myJDBC/JdbcResource/myJDBC')
create('myJDBC','JDBCConnectionPoolParams')
cd('JDBCConnectionPoolParams/myJDBC')
set('TestTableName','SQL SELECT 1')
updateDomain()
closeDomain()
exit()

出现此错误:

com.oracle.cie.domain.script.jython.WLSTException: Could not create generic operation:Properties
@com.oracle.cie.domain.operation.OperationBuilder.createConfigOperation(OperationBuilder.java:342)
at com.oracle.cie.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:69)
at com.oracle.cie.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:2983)

请问有人有想法吗?

0 个答案:

没有答案