Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Locked CATS Designer XML does not parse when CATS is started - Gets Error that on statement 2 DOCUMENT is not found.
?I found on <DOCUMENT ... on line 2 of the XML file. Some place early in the learning curve, I got CATS to display some of my work. But I have a pilot test coming up and started to create something I would really like to use. Just to be sure it is not me, I created a nil dispatcher's panel. That is, I created a new panel and saved it under a test name but did not do anything to panel. The XML file from that exercise fails to parse.
I have loaded the XML file into Notepad++ and Xcode on my Mac and it seems to parse ok as far as the syntax highlighters are concerned, DOCUMENT is the first actual ?XML tag after the initial XML line. Its companion is at the end of the file. JMRI 4.14 and CATS download appropriate for that release 0 was current in the early spring. Running CATS and JMRI on Windows 10. Anybody out there with an idea about how to proceed? Thanks, Perry Sugerman Downers Grove, IL |
¿ªÔÆÌåÓýI managed to get a console log with the error reported. The log is attached. Am I missing the style sheet? ? Perry Sugerman Downers Grove, IL ? ? |
Perry, There is no style sheet, so you are not missing anything. I received the sample XML file that you created.? It loaded fine for me in both designer and CATS (JMRI versions 4.12 and 4.15, which span your 4.14 - I will upgrade to JMRI 4.17.4 and try that).? I think I need to see your error logs.? This forum does not accept attachments so try to save the JMRI system console and paste it here or copy the output of the system console or check if you have a session.log in your JMRI folder with anything of value in it and paste into a post to this group. Rodney |
OK Here is the console log2019-09-11 22:07:33,600 util.FileUtilSupport ? ? ? ? ? ? ? ? ?INFO ?- File path scripts: is M:\Program Files (x86)\JMRI\jython\ [main]
2019-09-11 22:07:34,383 apps.Crandic ? ? ? ? ? ? ? ? ? ? ? ? ?INFO ?- main initialization done [main]
size=java.awt.Rectangle[x=0,y=0,width=650,height=456]
2019-09-11 22:09:13,202 configurexml.ErrorHandler ? ? ? ? ? ? ERROR - Parse error while parsing file /M:/Program%20Files%20(x86)/JMRI/resources/MissabePilotCats204.xml Exception: org.jdom2.input.JDOMParseException: Error on line 2: cvc-elt.1.a: Cannot find the declaration of element 'DOCUMENT'.
See http://jmri.org/help/en/package/jmri/configurexml/ErrorHandler.shtml for possibly more information. [AWT-EventQueue-0]
org.jdom2.input.JDOMParseException: Error on line 2: cvc-elt.1.a: Cannot find the declaration of element 'DOCUMENT'.
at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:232)
at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:253)
at org.jdom2.input.SAXBuilder.build(SAXBuilder.java:1091)
at jmri.jmrit.XmlFile.getRoot(XmlFile.java:197)
at jmri.jmrit.XmlFile.rootFromURL(XmlFile.java:182)
at jmri.configurexml.ConfigXmlManager.loadOnSwingThread(ConfigXmlManager.java:634)
at jmri.configurexml.ConfigXmlManager.lambda$1(ConfigXmlManager.java:596)
at jmri.util.ThreadingUtil.runOnGUIwithReturn(ThreadingUtil.java:144)
at jmri.configurexml.ConfigXmlManager.load(ConfigXmlManager.java:594)
at jmri.implementation.JmriConfigurationManager.load(JmriConfigurationManager.java:292)
at jmri.implementation.JmriConfigurationManager.load(JmriConfigurationManager.java:181)
at jmri.implementation.JmriConfigurationManager.load(JmriConfigurationManager.java:171)
at jmri.configurexml.LoadXmlConfigAction.loadFile(LoadXmlConfigAction.java:52)
at jmri.configurexml.LoadXmlUserAction.actionPerformed(LoadXmlUserAction.java:44)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 65; cvc-elt.1.a: Cannot find the declaration of element 'DOCUMENT'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.jdom2.input.sax.SAXBuilderEngine.build(SAXBuilderEngine.java:217)
... 51 more |
Perry, Thanks for the error log.? It looks like some of the initial messages were truncated, but that is fine.? I could pick up from the first line in your listing. I can duplicate the error log, but before explaining how, let me ask, "how are you loading your CATS panel?"? What mouse button pushes do you go through? Here is what I could determine.? CATS launched fine, as indicated by the lines in the log about initialization done and the rectangle - just before the error messages.? The way that I duplicated what followed is that I went to the main JMRI screen, Panels->Open Panels.? That is fine if you are trying to load a panel or tables (XML file) created by JMRI, but not fine if you are trying to load an XML file created by designer.? JMRI doesn't know anything about CATS XML files and will get very upset trying to read one.? As explained in section 3 ("Getting Started") of the CATS manual, the way to load a CATS file (XML file created by designer) is to focus on the blank CATS window and use the File->Open menu from that window's menu bar.? If you were using the CATS File->Open steps, then something else is going on. Rodney |
I understand. The JMRI form that says cTc on it is still only a JMRI form. One must specify the panel to be started in the Dispatcher panel window. Nothing like a band new user to run the monkey test.
OK I tried again and I have been trying to load the table from the JMRI menu that says cTc on it instead of the dispatch panel menu. The Dispatcher panel menu comes up fine. While we are talking, How do I get Town names to appear on the Dispatcher Panel? ? ? ?? |
Perry, I think you have it correct, now.? CATS is an add-on to JMRI.? The turnout and sensor tables can be created in PanelPro (JMRI).? CATS is used to as an alternative to Layout Editor or Panel Editor or Dispatcher Pro or etc. for creating the dispatcher GUI and the logic for controlling signals.? In most instances, CATS can create the sensor, turnout, and signalhead tables (and entries) and there is no need to do so directly in JMRI.? If that is the case, then there is no need to create a JMRI panel and no need to store and load it.? However, if you do create sensors, turnouts, etc. in JMRI, then do so from PanelPro, as JMRI does not understand the type of sensors, turnouts, and signalheads that CATS creates.? In other words, do not manually create a sensor, turnout, or signalhead while CATS is running, then store the panel.? JMRI will not be able to handle that panel when you load it. The way to add a town name is Details->Name in designer. Rodney |
Thank you very much for the help. I feel a little silly about using the wrong parser :)
When I used the name, I got a real small text not in the place I wanted. I have starter to create text boxes in Visio and save them as jpegs and install them on the panel as pictures. That way the DW&P JCT can be large capitalized and centerer over the track diagram that represents the junction. I thought I was probably missing something when I asked but if I am I do not know what. Thanks again, I would still be scratching my head without your help.? |
to navigate to use esc to dismiss