This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 666848 - Apache (EWS-1.0.1) > Operation failed with exception - java.lang.StringIndexOutOfBoundsException: String index out of range: -1
Apache (EWS-1.0.1) > Operation failed with exception - java.lang.StringIndexO...
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Operations (Show other bugs)
4.0.0
Unspecified Unspecified
low Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Corey Welton
:
Depends On: 665855
Blocks: jon30-bugs
  Show dependency treegraph
 
Reported: 2011-01-03 07:25 EST by Lukas Krejci
Modified: 2011-05-23 21:13 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 665855
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Lukas Krejci 2011-01-03 07:25:28 EST
+++ 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@redhat.com on 2010-12-27 08:32:09 EST ---

The bug will be tested on Apache-2.0.

--- Additional comment from skondkar@redhat.com 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@redhat.com 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)
Comment 1 Lukas Krejci 2011-01-03 07:32:07 EST
commit ff23902b5eba7b2fed45c2ec90861c53e73cc329
Author: Lukas Krejci <lkrejci@redhat.com>
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...
Comment 2 Mike Foley 2011-05-04 08:22:00 EDT
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.
Comment 3 Corey Welton 2011-05-23 21:13:57 EDT
Bookkeeping - closing bug - fixed in recent release.
Comment 4 Corey Welton 2011-05-23 21:13:57 EDT
Bookkeeping - closing bug - fixed in recent release.
Comment 5 Corey Welton 2011-05-23 21:13:58 EDT
Bookkeeping - closing bug - fixed in recent release.

Note You need to log in before you can comment on or make changes to this bug.