jhindexer: Positions File Not Found

Hi Guys

New to JavaHelp but I've been hacking at the API for a couple of days now. If this is obvious then apologies in advance but I'd love to know the reason anyway.

Environ: jdk 1.3.0, Win2000

When I run

d:\jh1.1\javahelp\bin\jhindexer .\topics -verbose -logfile log.txt

I get the following output to the log:

File: 'topics\booking\Booking.html'

URL: 'topics/booking/Booking.html'

File: 'topics\options\StartUp.html'

URL: 'topics/options/StartUp.html'

File: 'topics\Overview.html'

URL: 'topics/Overview.html'

File: 'topics\searching\Searching.html'

URL: 'topics/searching/Searching.html'

Parse time: 1.633 s

java.io.FileNotFoundException: JavaHelpSearch\POSITIONS (The system cannot find the file specified)

at java.io.FileInputStream.open(Native Method)

at java.io.FileInputStream.<init>(FileInputStream.java:64)

at java.io.FileInputStream.<init>(FileInputStream.java:95)

at com.sun.java.help.search.DocumentLists.<init>(DocumentLists.java:161)

at com.sun.java.help.search.DocumentLists.invert(DocumentLists.java:243)

at com.sun.java.help.search.DefaultIndexBuilder.close(DefaultIndexBuilder.java:103)

at com.sun.java.help.search.Indexer.compile(Indexer.java:228)

at com.sun.java.help.search.Indexer.main(Indexer.java:76)

at java.lang.reflect.Method.invoke(Native Method)

at com.zerog.lax.LAX.a([DashoPro-V1.2-120198])

at com.zerog.lax.LAX.<init>([DashoPro-V1.2-120198])

at com.zerog.lax.LAX.main([DashoPro-V1.2-120198])

The POSITIONS file that it is looking for is actually being created at the dir above JavaHelpSearch(i.e. where I'm running the command from), and as the failure has occurred during the index generation moving it to the correct directory still causes a runtime InvocationTargetException.

Any ideas why the POSITIONS file is being created in what I guess is the wrong place? Any ideas as to how to fix this?

Really puzzling over this now...

[2101 byte] By [johnmillington] at [2007-9-26 13:07:24]
# 1
try jhindexer -db pathtodb
albel at 2007-7-2 13:05:13 > top of Java-index,Desktop,Developing for the Desktop...
# 2

Hi,

Sorry I cant help with your query, but maybe you can help me :)

I am trying to build my search database, but get an exception when I run jhindexer.

http://forum.java.sun.com/thread.jsp?forum=42&thread=201719

Any ideas what could be wrong and how to set it right?

Thanks,

Dewang

dewangs at 2007-7-2 13:05:13 > top of Java-index,Desktop,Developing for the Desktop...
# 3

> try jhindexer -db pathtodb

This actually worked real well for me. Instead of creating the files in the JavaHelpSearch directory I just specified the path to create the files in the same directory as the POSITIONS file and they created fine. I then copied over the files to the JavaHelpSearch directory. Thanks.

fnawaz at 2007-7-2 13:05:13 > top of Java-index,Desktop,Developing for the Desktop...
# 4

I had the same problem and found out, that on my NT-System the output files from jhindexer were placed in my root directory.

So I told jhindexer to use c:\ as the Database Path and it worked. I just had to copy the index files back to my Help-Directory.

I don't know wether I have missed some environment variable, but at least it worked.

HGOnline at 2007-7-2 13:05:13 > top of Java-index,Desktop,Developing for the Desktop...
# 5
Yep, I got this many times, and basically it was fised by downloading a brand new up-to-date version of JavaHelp, and using the jhall.jar that has size of around 393kb in size. And older one that was 380 something kb in size caused this error, where as the newer one didn't.Alan
alanjonesbath at 2007-7-2 13:05:13 > top of Java-index,Desktop,Developing for the Desktop...
# 6
Alan - just wanted to say thank you so much for posting!!! I've been struggling with this for days trying to figure out if I was insane because I was sure (but not certain) that it used to work fine...Updating jhall fixed it completely.Naomi
naomi_deborah at 2007-7-2 13:05:13 > top of Java-index,Desktop,Developing for the Desktop...