[jsword-devel] Newbie JSword Developer wishes to help

DM Smith jsword-devel@crosswire.org
Sun, 22 Feb 2004 17:48:48 -0500


I hope I can help this effort. I have read the last several months of this 
mailing list. So I am a bit familiar with some of what is happening now.

I am trying to get JSword to work at all and I am running into all kinds of 
start up problems. A couple I have figured out.

Pertinent info: I am running WinXP Pro, Java 1.4.x, Eclipse 3 M7.
I never install to Program Files but to a separate partition (Drive 
D:\Bible\JSword, D:\Java\j2sdk..., etc)
My Documents and Settings directory is on Drive E.

I do not have Sword or any Sword Modules installed.

1) I tried the "Web-Demo" servlet interface on the web 
(http://www.crosswire.org/jsword/demo.jsp) and it did not work.
I got back a page from Tomcat server stating that the root cause was:
	at org.crosswire.jsword.view.web.DemoServlet.init(DemoServlet.java:61)

It appears that the call to getBookMetaData can and did return null. The 
call getBook() is chained to that call, which causes the NPE.

2) I then tried the Web-Start interface from the web 
I clicked on the download button which downloaded 

Since I have j2sdk1.4.2_03 installed, it opened automatically but failed 
with the following message:
    An error occurred while launching/running the application.

    Title: J-Sword Demo Application
    Vendor: The J-Sword project
    Category: Download Error

    Unable to load resource: http://www.crosswire.org/jsword/jsword.jnlp

I have seen this problem before where the path in the jnlp file does not 
match the path used to download the file.
I think that changing
<jnlp spec="1.0+" codebase="http://@HOSTNAME@/@WEBAPP@/" href="jsword.jnlp">
<jnlp spec="1.0+" codebase="http://@HOSTNAME@/@WEBAPP@/" 
will get past that problem.

3) I tried the various installers for the Java app. I tried the Win 
Installer and it had the dreaded can't find config.xml. I thought that it 
might be a problem with the installer so I tried the generic jar file and it 
had the same problem. Which made sense since it used the same installer.

4) I then tried the bat file and since it had "C:\Program Files" hard coded, 
it did not work. I think that it should have a "pause" with a "Hit any key 
to continue" when it can't find the program.

5) So I tried to modify the bat file to point to the installed location. The 
application came up but declared a NPE on line 58. It appears that this is 
due to the fact that I have not installed modules. I think that the 
application should come up with out error when Sword modules have not been 
downloaded. From looking at the code a bit it seems that it looks for books 
in the resources directory tree of the JSword install. A bit of a "Catch 

6) So I loaded .9.6 into Eclipse and finally figured out how to get past the 
error that I have to build to fix errors and that I had to tell ant where 
tools.jar was. I then tried to run the application and did not have much 
success. So at the prompting of the mailing list, I deleted the project and 
connected to CVS.

7) I ran the current code and I encountered a significant problem. I get an 
error dialog before the main windo comes up, but the dialog is modal and it 
is covered by the main window. The problem is that the main window is 
unresponsive to the mouse and it looks like the program froze. The only give 
away that it has not froze is that it repaints. I then had to "Alt-Tab" to 
get to the dialog window to dismiss it.

I have seen this problem before. My solution was to collect up 
initialization errors and put them into the status bar of the main window. I 
changed the status bar to be a combo-list so the last 10 errors could be 

I have not worked in a CVS environment before (I used RCS, Sablime and 
ClearCase) so I am not sure what the workflow model is or how the owners of 
JSword wish me to participate.

Just let me know and I will try to help.

Say “good-bye” to spam, viruses and pop-ups with MSN Premium -- free trial 
offer! http://click.atdmt.com/AVE/go/onm00200359ave/direct/01/