+++ This bug was initially created as a clone of Bug #665855 +++ Created attachment 470848 [details] screenshot Description of problem: Apache (EWS-1.0.1) > Operation failed with exception - java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1768) at org.rhq.plugins.apache.ApacheServerComponent.getControlScriptPath(ApacheServerComponent.java:663) at org.rhq.plugins.apache.ApacheServerOperationsDelegate.invokeOperation(ApacheServerOperationsDelegate.java:78) at org.rhq.plugins.apache.ApacheServerComponent.invokeOperation(ApacheServerComponent.java:299) 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:592) at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676) at java.lang.Thread.run(Thread.java:595) Version-Release number of selected component (if applicable): JON-2.4.1 build number: 10975:3cea406 How reproducible: Always Environment details: OS: Win-2003 32bit Java: Oracle JDK 1.5 Database: Postgres 8.4 EWS-1.0.1 Browser: IE-7 and FF-3.6.3 Steps to Reproduce: 1. Installed JON-2.4.1 and discover Apace (EWS-1.0.1) 2. Goto operations of Apache (EWS-1.0.1) 3. Perform operations like start, stop, restart, Restart Gracefully, etc. 4. Observe operation status Actual results: Apache (EWS-1.0.1) > Operation shows failed with exception - java.lang.StringIndexOutOfBoundsException: String index out of range: -1 Expected results: Apache (EWS-1.0.1) > Operation should completed without any error or failure. Additional info: Please refer attached screenshot. --- Additional comment from rtimaniy on 2010-12-27 08:32:09 EST --- The bug will be tested on Apache-2.0. --- Additional comment from skondkar on 2010-12-28 03:22:10 EST --- Tested on JON-2.4.1 build number: 10975:3cea406 with standalone instance of apache 2.2 after installation of jon241 apache libs onto a Windows platform. Environment details: OS: Win-2003 32bit Java: Oracle JDK 1.5 Database: Postgres 8.3.8 Standalone Apache 2.2 Browser: IE-7 1. Installed JON-2.4.1 on windows platform and discovered standalone instance of Apache 2.2. 2. Navigated to operations tab of Apache. 3. Performed operations like start, stop, restart, Restart Gracefully, etc. 4. Observed the same exception as below: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1768) at org.rhq.plugins.apache.ApacheServerComponent.getControlScriptPath(ApacheServerComponent.java:663) at org.rhq.plugins.apache.ApacheServerOperationsDelegate.invokeOperation(ApacheServerOperationsDelegate.java:78) at org.rhq.plugins.apache.ApacheServerComponent.invokeOperation(ApacheServerComponent.java:299) 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:592) at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676) at java.lang.Thread.run(Thread.java:595) --- Additional comment from skondkar on 2010-12-28 04:56:28 EST --- Also tested on standalone instance of apache 2.0.64 with the rt-filter and snmp libs for Apache 2.0 Observed the same exception as below while performing operations like start, stop, restart etc java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1768) at org.rhq.plugins.apache.ApacheServerComponent.getControlScriptPath(ApacheServerComponent.java:663) at org.rhq.plugins.apache.ApacheServerOperationsDelegate.invokeOperation(ApacheServerOperationsDelegate.java:78) at org.rhq.plugins.apache.ApacheServerComponent.invokeOperation(ApacheServerComponent.java:299) 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:592) at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676) at java.lang.Thread.run(Thread.java:595)
commit ff23902b5eba7b2fed45c2ec90861c53e73cc329 Author: Lukas Krejci <lkrejci> Date: Mon Jan 3 12:55:16 2011 +0100 BZ 665855 - try to find the control script file only on the OSes that actually have a chance of having it. Be more careful about FS layout assumptions...
verified as follows: RHQ 4.0 community release. successfully scheduled and performed a variety of operations on Apache server. reviewed server log for errors that may have occurred silently, and there were none.
Bookkeeping - closing bug - fixed in recent release.