Skip to main content

"Invalid Index format"

6 replies [Last post]
Anonymous

I'm a newbie to JavaHelp and I'm using the new 2.0.01 release. So far, I think this is a GREAT product but I'm having some problems getting it to work 100%.

My immediate problem is that JavaHelp doesn't like my glossary. Everything was going fine and I had created several editions of my Help system successfully when I added a glossary, carefully following the description and examples in the Java Help System User's Guide. When I try to look at my Help system now, with the 'java -jar' command, I get this exception:

---
Parsing failed for jar:file:/D:/eclipse/workspace/SDAC/help/sdachelp.jar!/SdacGlossary.xml
Warning: Invalid Index format
java.lang.reflect.InvocationTargetException
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:324)
at sunw.demo.jhdemo.Runner.main(Runner.java:99)
Caused by: java.lang.NullPointerException
at javax.help.MergeHelpUtilities.mergeNodeChildren(MergeHelpUtilities.java:81)
at javax.help.plaf.basic.BasicGlossaryNavigatorUI.loadData(BasicGlossaryNavigatorUI.java:211)
at javax.help.plaf.basic.BasicGlossaryNavigatorUI.reloadData(BasicGlossaryNavigatorUI.java:192)
at javax.help.plaf.basic.BasicGlossaryNavigatorUI.installUI(BasicGlossaryNavigatorUI.java:140)
at javax.swing.JComponent.setUI(JComponent.java:449)
at javax.help.JHelpNavigator.setUI(JHelpNavigator.java:249)
at javax.help.JHelpNavigator.updateUI(JHelpNavigator.java:268)
at javax.help.JHelpNavigator.(JHelpNavigator.java:97)
at javax.help.JHelpGlossaryNavigator.(JHelpGlossaryNavigator.java:55)
at javax.help.GlossaryView.createNavigator(GlossaryView.java:74)
at javax.help.JHelp.setupNavigators(JHelp.java:140)
at javax.help.JHelp.(JHelp.java:118)
at javax.help.JHelp.(JHelp.java:68)
at sunw.demo.jhdemo.JHLauncher.initialize(JHLauncher.java:119)
at sunw.demo.jhdemo.JHLauncher.initialize(JHLauncher.java:102)
at sunw.demo.jhdemo.JHLauncher.setup(JHLauncher.java:725)
at sunw.demo.jhdemo.JHLauncher.main(JHLauncher.java:591)
... 5 more
---

It obviously doesn't like something about my glossary. Here is the glossary section of the helpset:

---

glossary
Glossary
javax.help.GlossaryView
SdacGlossary.xml

---

Here is the glossary itself, 'SdacGlossary.xml':
---
<?xml version='1.0' encoding='ISO-8859-1' ?>

---

I can't tell from the error message whether the glossary section of the helpset has the problem or the glossary file itself. I've checked the glossary file in XMLSpy and it checks out as well-formed and validates cleanly.

I've also eyeballed both the glossary file and the glossary portion of the helpset and it looks like I've done everything exactly as prescribed by the User Guide.

Can anyone help me figure out what is wrong?

'Henry'

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Roger Brinkley

> Can anyone help me figure out what is wrong?

Humm, of it's a bug. Try more than one entry and see if that helps.

Binky

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

Anonymous

> > Can anyone help me figure out what is wrong?
>
> Humm, of it's a bug. Try more than one entry and see
> if that helps.
>
I've tried adding two more entries and got the same result.

I also recreated the glossary.xml from scratch with XMLSpy. Here it is:
---

JavaHelp Index Version 2.0//EN"
"http://java.sun.com/products/javahelp/index_2_0.dtd">





---

I've also tried invoking the help from my program instead of via 'java -jar'. The program fails when it invokes help, before I ever see the main help screen, but the exception is different:

---
Parsing failed for file:/D:/eclipse/workspace/SDAC/help/SdacGlossary.xml
Warning: Invalid Index format
java.lang.NullPointerException
at javax.help.MergeHelpUtilities.mergeNodeChildren(MergeHelpUtilities.java:81)
at javax.help.plaf.basic.BasicGlossaryNavigatorUI.loadData(BasicGlossaryNavigatorUI.java:211)
at javax.help.plaf.basic.BasicGlossaryNavigatorUI.reloadData(BasicGlossaryNavigatorUI.java:192)
at javax.help.plaf.basic.BasicGlossaryNavigatorUI.installUI(BasicGlossaryNavigatorUI.java:140)
at javax.swing.JComponent.setUI(JComponent.java:449)
at javax.help.JHelpNavigator.setUI(JHelpNavigator.java:249)
at javax.help.JHelpNavigator.updateUI(JHelpNavigator.java:268)
at javax.help.JHelpNavigator.(JHelpNavigator.java:97)
at javax.help.JHelpGlossaryNavigator.(JHelpGlossaryNavigator.java:55)
at javax.help.GlossaryView.createNavigator(GlossaryView.java:74)
at javax.help.JHelp.setupNavigators(JHelp.java:140)
at javax.help.JHelp.(JHelp.java:118)
at javax.help.WindowPresentation.createJHelp(WindowPresentation.java:672)
at javax.help.WindowPresentation.createHelpWindow(WindowPresentation.java:705)
at javax.help.WindowPresentation.setDisplayed(WindowPresentation.java:336)
at javax.help.DefaultHelpBroker.setDisplayed(DefaultHelpBroker.java:178)
at javax.help.CSH.displayHelp(CSH.java:749)
at javax.help.CSH.access$200(CSH.java:80)
at javax.help.CSH$DisplayHelpFromSource.actionPerformed(CSH.java:1668)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
at javax.swing.AbstractButton.doClick(AbstractButton.java:289)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1113)
at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(BasicMenuItemUI.java:943)
at java.awt.Component.processMouseEvent(Component.java:5134)
at java.awt.Component.processEvent(Component.java:4931)
at java.awt.Container.processEvent(Container.java:1566)
at java.awt.Component.dispatchEventImpl(Component.java:3639)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Component.dispatchEvent(Component.java:3480)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
at java.awt.Container.dispatchEventImpl(Container.java:1609)
at java.awt.Window.dispatchEventImpl(Window.java:1590)
at java.awt.Component.dispatchEvent(Component.java:3480)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
---

It appears that JavaHelp doesn't like my glossary but I'm darned if I can see why. Any suggestions on what I can do to make my glossary work?

'Henry'

Roger Brinkley

> It appears that JavaHelp doesn't like my glossary but I'm darned if I can see why. Any suggestions on what I can do to make my glossary work?

Are you merging helpsets by chance? If so it could be a bug.

Binky

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.

Anonymous

> > It appears that JavaHelp doesn't like my glossary
> but I'm darned if I can see why. Any suggestions on
> what I can do to make my glossary work?
>
>
> Are you merging helpsets by chance? If so it could be
> a bug.
>
No, I'm not. Any other ideas?

boo
Offline
Joined: 2004-09-25
Points: 0

try 1.0

PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp Index Version 1.0//EN"
"http://java.sun.com/products/javahelp/index_1_0.dtd">

works for me

--- edit uuh over 1 yeahr is gone .. don't think this post was usefull xD

Message was edited by: boo

Roger Brinkley

> I've also eyeballed both the glossary file and the glossary portion
> of the helpset and it looks like I've done everything exactly as
> prescribed by the User Guide.

Looks like a corrupt or invalid glossary file.

binky

********************************************************************************

You may leave the list at any time by sending message with no subject and
"SIGNOFF JAVAHELP-INTEREST" in the body to LISTSERV@JAVA.SUN.COM. Archives
are available at http://archives.java.sun.com/archives/javahelp-interest.html.
Submit bug reports at http://java.sun.com/cgi-bin/bugreport.cgi.