Share

Heritrix: Internet Archive Web Crawler

Tracker: Bugs

5 Exception in Modules Tab - ID: 1113470
Last Update: Comment added ( karl-ia )

I just did a 'cvs update' and now get the following exception when I
create a new profile and click to edit the modules it uses:

java.lang.StringIndexOutOfBoundsException: String index out of
range: -1

java.lang.StringIndexOutOfBoundsException: String index out of
range: -1
at java.lang.String.substring(String.java:1444)
at
org.archive.crawler.jspc.admin.jobs.modules_jsp.buildModuleMap(U
nknown Source)
at
org.archive.crawler.jspc.admin.jobs.modules_jsp._jspService(Unkn
own Source)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:
137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
853)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
358)
at
org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(We
bApplicationHandler.java:342)
at
org.archive.crawler.admin.ui.RootFilter.doFilter(RootFilter.java:67)
at
org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(We
bApplicationHandler.java:334)
at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebAppli
cationHandler.java:286)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.jav
a:567)
at org.mortbay.http.HttpContext.handle(HttpContext.java:
1807)
at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplic
ationContext.java:525)
at org.mortbay.http.HttpContext.handle(HttpContext.java:
1757)
at org.mortbay.http.HttpServer.service(HttpServer.java:879)
at
org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:
960)
at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
at
org.mortbay.http.SocketListener.handleConnection(SocketListener.ja
va:218)
at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:300)
at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)

I've tried it several different ways, and get the same bug
regardless.

Thanks,
Xavid Pretzer


Nobody/Anonymous ( nobody ) - 2005-01-31 21:28

5

Closed

Fixed

Nobody/Anonymous

General

None

Public


Comments ( 6 )

Date: 2007-03-14 00:20
Sender: karl-ia


This issue is now discussed in the new JIRA tracker at
http://webteam.archive.org/jira/browse/HER-347 -- please add further
comments at that location.


Date: 2005-02-03 22:09
Sender: stack-sfProject Admin

Logged In: YES
user_id=924942

Marking fixed though all I did was add better error reporting.


Date: 2005-02-03 21:57
Sender: stack-sfProject Admin

Logged In: YES
user_id=924942

Ok Xavid.

I added reporting of a better error should this happen again.

Closing.

Index: src/webapps/admin/jobs/modules.jsp
===================================================================
RCS file:
/cvsroot/archive-crawler/ArchiveOpenCrawler/src/webapps/admin/jobs/modules.jsp,v
retrieving revision 1.22
diff -u -r1.22 modules.jsp
--- src/webapps/admin/jobs/modules.jsp 2 Feb 2005 01:24:48
-0000 1.22
+++ src/webapps/admin/jobs/modules.jsp 3 Feb 2005 21:55:15
-0000
@@ -130,7 +130,14 @@
ret.append("<select name='cboAdd" + name + "'>");
for(int i=0 ; i<unusedOptions.size() ; i++){
String curr = (String)unusedOptions.get(i);
- ret.append("<option
value='"+curr+"'>"+curr.substring(0,curr.indexOf("|"))+"</option>");
+ int index = curr.indexOf("|");
+ if (index < 0) {
+ throw new RuntimeException("Failed to
find '|' required" ++ " divider in :
" + curr + ". Repair modules file.");
+
+ }
+ ret.append("<option value='" + curr + "'>" +
+ curr.substring(0, index) + "</option>");
}
ret.append("</select>");
ret.append("</td><td>");



Date: 2005-02-03 20:56
Sender: nobody

Logged In: NO

Apparently, this is what happens if you accidentally have a line in
'processors.options' that doesn't contain a vertical bar. I'm not sure if

this behavior changed in the new version or if I just messed up my file at

the same time I updated.

Xavid


Date: 2005-02-02 16:25
Sender: nobody

Logged In: NO

It must be an incompatibility between something I did and the new code;
when I did a 'cvs update -C' the error still happened, but when I got a
clean version from cvs, the error stopped happening. I'll have to look at

what files I modified.

Thanks,
Xavid


Date: 2005-01-31 21:41
Sender: stack-sfProject Admin

Logged In: YES
user_id=924942

I just went to profiles and created a new one based on an
old one and then went to modules without issue. You must be
doing something different. Try describing what you're doing
with more detail. Thanks.


Attached File

No Files Currently Attached

Changes ( 3 )

Field Old Value Date By
status_id Open 2005-02-03 22:09 stack-sf
resolution_id None 2005-02-03 22:09 stack-sf
close_date - 2005-02-03 22:09 stack-sf