Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within BEA/Weblogic
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
BEA/Weblogic
WLST connect(username,pwd,url) throws StringIndexOutOfBoundsException: String index out of range: -2
vishwas gopala
Greenhorn
Posts: 3
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am new to wlst and python. The below code when run gives StringIndexOutOfBoundsException. With other error messages. Please help. Thanks in advance.
class DataSourceCheck(threading.Thread): object_lock = Lock() def __init__(self, username,password,serverlist,failedDS,domain): threading.Thread.__init__(self) self.serverlist = serverlist self.username = username self.password = password self.failedDS = failedDS self.domain = domain def run(self): for b in self.serverlist: host = b.getHost() port = b.getPort() servername = b.getName() url = "t3://"+host+":"+str(port) try: connect(str(self.username),str(self.password),url) serverRuntime() dsMBeans = cmo.getJDBCServiceRuntime().getJDBCDataSourceRuntimeMBeans() for ds in dsMBeans: s = str(ds.testPool()) print '****Debug***'+s if not 'None' in s: DataSourceCheck.object_lock.acquire() lt = [] if self.domain in self.failedDS: lt=self.failedDS[self.domain] lt.append(ds.getName()) else: lt=[ds.getName()] self.failedDS[self.domain] = lt DataSourceCheck.object_lock.release() disconnect() except: print "ServerStatus:"+servername+",SHUTDOWN"
Complete Stack trace of Exception.
java.lang.StringIndexOutOfBoundsException: String index out of range: -2[[ at java.lang.String.substring(String.java:1937) at weblogic.management.scripting.WLSTUtils.getListenAddress(WLSTUtils.java:148) at weblogic.management.scripting.WLSTHelper.lookupMBeanServerConnection(WLSTHelper.java:658) at weblogic.management.scripting.WLSTHelper.initDomainRuntimeServerConnection(WLSTHelper.java:434) at weblogic.management.scripting.WLSTHelper.initConnections(WLSTHelper.java:319) at weblogic.management.scripting.WLSTHelper.connect(WLSTHelper.java:203) at weblogic.management.scripting.WLScriptContext.connect(WLScriptContext.java:62) at weblogic.management.scripting.utils.WLSTUtil.initializeOnlineWLST(WLSTUtil.java:148) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.python.core.PyReflectedFunction.__call__(Unknown Source) at org.python.core.PyMethod.__call__(Unknown Source) at org.python.core.PyObject.__call__(Unknown Source) at org.python.core.PyObject.invoke(Unknown Source) at org.python.pycode._pyx4.connect$1(<iostream>:16) at org.python.pycode._pyx4.call_function(<iostream>) at org.python.core.PyTableCode.call(Unknown Source) at org.python.core.PyTableCode.call(Unknown Source) at org.python.core.PyTableCode.call(Unknown Source) at org.python.core.PyFunction.__call__(Unknown Source) at org.python.pycode._pyx47.run$8(/APPTOP/instance/fapatch/debug/healthchecker/wlstCommand5829503504103394409.py:43) at org.python.pycode._pyx47.call_function(/APPTOP/instance/fapatch/debug/healthchecker/wlstCommand5829503504103394409.py) at org.python.core.PyTableCode.call(Unknown Source) at org.python.core.PyTableCode.call(Unknown Source) at org.python.core.PyFunction.__call__(Unknown Source) at org.python.core.PyInstance.invoke(Unknown Source) at threading$py._Thread__bootstrap$49(C:\wlst\jython_2.2.1\Lib\threading.py:414)
Few other errors in logs.
The CompatabilityMBeanServer is not initialized properly. This might happen if the CompatabilityMBeanServer is disabled via the JMXMBean. WLST detected that the DomainRuntimeMBeanServer is not enabled or not initialized properly. This might happen if the DomainRuntimeMBeanServer is disabled via the JMXMBean. Please ensure that this MBeanServer is enabled. Online WLST cannot function without this MBeanServer.
Code to invoke
for x in domainServers.keys(): thread1 = DataSourceCheck(Username,''.join(Password),domainServers[x],failedDS,x) thread1.start() for thread in threading.enumerate(): try: if thread is not threading.currentThread(): thread.join() except: print 'exception occured'
And then the flying monkeys attacked. My only defense was this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
WLST- error when added log4j.jar in the classpath
unable to connect WLST to Node Manager
Target libraries to a new cluster using WLST
Target libraries to a new cluster using WLST
More...