-1
我在我的代碼中出現語法錯誤。任何人都可以說在語法上有什麼問題嗎?我對這種語言很陌生,沒有太多想法。語法錯誤Jython
錯誤消息
WASX7017E: Exception received while running file "JDBCoracle.py"; exception information: com.ibm.bsf.BSFException: exception from Jython: Traceback (innermost last): (no code object) at line 0 File "", line 8 name ="Oracle JDBC Driver"^SyntaxError: invalid syntax
我的代碼:
import sys
## **JDBCProvider** ##
def OracleJDBC(cellName,serverName,):
name ="Oracle JDBC Driver"
print " Name of JDBC Provider which will be created ---> " + name
print "
----------------------------------------------------------------------------------------- "
# Gets the name of cell
cell = AdminControl.getCell() print cell
cellid = AdminConfig.getid('/Cell:'+ cell +'/')
print cellid print "
----------------------------------------------------------------------------------------- "
## Creating New JDBC Provider ##
print " Creating New JDBC Provider :"+ name
n1 = ["name" , "Oracle JDBC Driver" ]
desc = ["description" , "Oracle JDBC Driver"]
impn = ["implementationClassName" ,
"oracle.jdbc.pool.OracleConnectionPoolDataSource"]
classpath = ["classpath" , ${ORACLE_JDBC_DRIVER_PATH}/ojdbc6.jar ]
attrs1 = [n1 , impn , desc , classpath]
Serverid = AdminConfig.getid("/Cell:"+ cellName +"/ServerName:"+
serverName +"/")
jdbc = AdminConfig.create('JDBCProvider' , Serverid , attrs1)
print " New JDBC Provider created :"+ name
AdminConfig.save()
print " Saving Configuraion "
print "
----------------------------------------------------------------------------------------- "
####################################################################################################################
####################################################################################################################
#main program starts here
OracleJDBC(cellName,serverName)
可有一個人幫我看看我做錯了嗎?我是這個語言的新手。
和壓痕是錯誤的 –
這是一個額外的錯誤,不是由OP :) – hd1
報道我都甚至在那之後我得到同樣的錯誤 –