Quantcast
Channel: WebSphere Blog by Steve Robinson » WebSphere Jython Examples
Viewing all articles
Browse latest Browse all 10

TypeError: __add__ nor __radd__ defined for these operands

$
0
0

Jython Error: TypeError: __add__ nor __radd__ defined for these operands

heduler_jndi.myschedule,cell=LW621LX6026649Node01Cell,spec=1.0
WASX7017E: Exception received while running file "f:\script\jython\schedule_mbean.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
  File "<string>", line 121, in ?
TypeError: __add__ nor __radd__ defined for these operands

Reason:
Jython code was trying to concatenate an Object with a String

Offending Code:

schedMbeanO = AdminControl.makeObjectName(schedMbeanString)
print "schedMbeanO=" + schedMbeanO

Solution:

schedMbeanO = AdminControl.makeObjectName(schedMbeanString)
print "schedMbeanO="
print schedMbeanO


Viewing all articles
Browse latest Browse all 10

Trending Articles