Syntax error Jython
<p>I am getting a syntax error in my code. Can anyone say what's wrong in the syntax? I am new to this language, don't have much of an idea.</p>

<p>Error message</p>

<blockquote>
  <p>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</p>
</blockquote>

<p>My code :</p>

<pre><code>import sys

   ## **JDBCProvider** ##

   def OracleJDBC(cellName,serverName,):


   name ="Oracle JDBC Driver"

   print " Name of JDBC Provider which will be created ---&gt; " + 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)
</code></pre>

<p>Can some one help me see what I'm doing wrong? I'm new to this language.</p>

<p>Your error is the comma in <code>def OracleJDBC(cellName,serverName,):</code>; eliminate it and things will work. </p>

<pre><code>import sys

## **JDBCProvider** ##

def OracleJDBC(cellName,serverName):
    name ="Oracle JDBC Driver"
    print " Name of JDBC Provider which will be created ---&gt; " + 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" , '/path/to/ojdbc6.jar' ]
    attrs1 = [n1 , impn , desc , classpath]

    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
if __name__ == '__main__':
    OracleJDBC(cellName,serverName)
</code></pre>

python jython