{"action":"created","issue":{"url":"https://api.github.com/repos/Cornutum/tcases/issues/9","repository_url":"https://api.github.com/repos/Cornutum/tcases","labels_url":"https://api.github.com/repos/Cornutum/tcases/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/Cornutum/tcases/issues/9/comments","events_url":"https://api.github.com/repos/Cornutum/tcases/issues/9/events","html_url":"https://github.com/Cornutum/tcases/issues/9","id":134633504,"number":9,"title":"Tcases get java.lang.RuntimeException on non-Oracle jvm","user":{"login":"terryZuoty","id":11065364,"avatar_url":"https://avatars.githubusercontent.com/u/11065364?v=3","gravatar_id":"","url":"https://api.github.com/users/terryZuoty","html_url":"https://github.com/terryZuoty","followers_url":"https://api.github.com/users/terryZuoty/followers","following_url":"https://api.github.com/users/terryZuoty/following{/other_user}","gists_url":"https://api.github.com/users/terryZuoty/gists{/gist_id}","starred_url":"https://api.github.com/users/terryZuoty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terryZuoty/subscriptions","organizations_url":"https://api.github.com/users/terryZuoty/orgs","repos_url":"https://api.github.com/users/terryZuoty/repos","events_url":"https://api.github.com/users/terryZuoty/events{/privacy}","received_events_url":"https://api.github.com/users/terryZuoty/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-18T16:49:11Z","updated_at":"2016-04-17T10:50:01Z","closed_at":"2016-02-19T01:40:58Z","body":"Hi,\r\n\r\n\r\nWhen I am using tcases with another JVM (non-Oracle), it will throw runtime exception and stop working. This issue will happen on all version of tcases with all 1.7 and higher version of this non-Oracle jvm. The Exception is like this:\r\n\r\n---------------------------------------------------------------------------------------------------------------------------------------------\r\n11:06:15.792 [main] INFO  org.cornutum.tcases.Tcases - Tcases 1.5.3.1 (2016-01-30)\r\n11:06:15.808 [main] INFO  org.cornutum.tcases.Tcases - Reading system input definition=C:\\Users\\T\\Tcases153src\\examples\\find-Input.xml\r\njava.lang.RuntimeException: Can't read input definition file=C:\\Users\\T\\Tcases153src\\examples\\find-Input.xml\r\n    at org.cornutum.tcases.Tcases.run(Tcases.java:958)\r\n    at org.cornutum.tcases.Tcases.main(Tcases.java:896)\r\nCaused by: java.lang.RuntimeException: Error in document at line=1\r\n    at org.cornutum.tcases.io.SystemInputDocReader.getSystemInputDef(SystemInputDocReader.java:1251)\r\n    at org.cornutum.tcases.Tcases.run(Tcases.java:954)\r\n    ... 1 more\r\nCaused by: org.xml.sax.SAXParseException: Attribute= is not allowed for System elements\r\n    at org.cornutum.tcases.io.SystemInputDocReader$ElementHandler.validateAttributes(SystemInputDocReader.java:132)\r\n    at org.cornutum.tcases.io.SystemInputDocReader.startElement(SystemInputDocReader.java:1336)\r\n    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)\r\n    at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)\r\n    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)\r\n    at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)\r\n    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)\r\n    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)\r\n    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)\r\n    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)\r\n    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)\r\n    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)\r\n    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)\r\n    at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)\r\n    at javax.xml.parsers.SAXParser.parse(Unknown Source)\r\n    at org.cornutum.tcases.io.SystemInputDocReader.getSystemInputDef(SystemInputDocReader.java:1246)\r\n    ... 2 more\r\n\r\n-----------------------------------------------------------------------------------------------------------------------------------------------------\r\n\r\nThis issue is not caused by incorrect path as it can work well on Oracle JVM without changing any args or command lines.\r\nI did a brief investigation into this problem, found that this problem is caused by function Attributes.getLocalName(int index) of org.xml.sax.Attributes.\r\nIn my non-Oracle jvm, this function cannot return a valid name, but the Oracle jvm can return a valid name (string). When I change it to Attributes.getQName(int index), tcases can pass this part can continue working.\r\nAccording to the documentation[2], getLocalName() is supposed to returns \"The local name, or the empty string if Namespace processing is not being performed, or null if the index is out of range.\" and Namespace processing is off by default [1]. It needs to be enabled (SAXParserFactory.setNamespaceAware(true)).\r\n\r\nCould tcases change the function Attributes.getLocalName(int index) to Attributes.getQName(int index)? or enable SAXParserFactory.setNamespaceAware(true)?\r\n\r\nBest regards\r\n\r\n[1] http://w3.hursley.ibm.com/java/docs/java7/api/org/xml/sax/Attributes.html#getLocalName%28int%29\r\n[2] http://w3.hursley.ibm.com/java/docs/java7/api/javax/xml/parsers/SAXParserFactory.html#setNamespaceAware%28boolean%29"},"comment":{"url":"https://api.github.com/repos/Cornutum/tcases/issues/comments/210998903","html_url":"https://github.com/Cornutum/tcases/issues/9#issuecomment-210998903","issue_url":"https://api.github.com/repos/Cornutum/tcases/issues/9","id":210998903,"user":{"login":"kerrykimbrough","id":6577913,"avatar_url":"https://avatars.githubusercontent.com/u/6577913?v=3","gravatar_id":"","url":"https://api.github.com/users/kerrykimbrough","html_url":"https://github.com/kerrykimbrough","followers_url":"https://api.github.com/users/kerrykimbrough/followers","following_url":"https://api.github.com/users/kerrykimbrough/following{/other_user}","gists_url":"https://api.github.com/users/kerrykimbrough/gists{/gist_id}","starred_url":"https://api.github.com/users/kerrykimbrough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kerrykimbrough/subscriptions","organizations_url":"https://api.github.com/users/kerrykimbrough/orgs","repos_url":"https://api.github.com/users/kerrykimbrough/repos","events_url":"https://api.github.com/users/kerrykimbrough/events{/privacy}","received_events_url":"https://api.github.com/users/kerrykimbrough/received_events","type":"User","site_admin":false},"created_at":"2016-04-17T10:50:01Z","updated_at":"2016-04-17T10:50:01Z","body":"Hi, salcy\r\n\r\nReading through the cause of the exception I see there is a syntax error at line 12. Should be easy to fix."}}