eclipse-ee4j / jaxb-ri

Jaxb RI
https://eclipse-ee4j.github.io/jaxb-ri/
BSD 3-Clause "New" or "Revised" License
204 stars 111 forks source link

FileNotFoundException not caught in XJC #86

Closed Tomas-Kraus closed 19 years ago

Tomas-Kraus commented 19 years ago

XJC produces a large stack trace if a bindings file is specified but does not exist. For example if schema.xjb does not exist, running this: java -jar /project/dtv/wp4/pvr/jaxb_2_0/lib/jaxb-xjc.jar -extension -proxy www-cache:80 -b schema.xjb -d bind_output schema.xsd

produces the following, which might be better as a one line error message: Exception in thread "main" java.io.FileNotFoundException: /project/dtv/wp4/pvr/pcftranscoder/binding/jaxb_bug_reports/generateElements/schema.xjb (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:106) at java.io.FileInputStream.(FileInputStream.java:66) at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70) at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:973) at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:184) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:798) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:339) at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:225) at com.sun.tools.xjc.ModelLoader.buildDOMForest(ModelLoader.java:281) at com.sun.tools.xjc.ModelLoader.loadXMLSchema(ModelLoader.java:322) at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:130) at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:76) at com.sun.tools.xjc.Driver.run(Driver.java:240) at com.sun.tools.xjc.Driver.run(Driver.java:154) at com.sun.tools.xjc.Driver._main(Driver.java:79) at com.sun.tools.xjc.Driver.access$000(Driver.java:37) at com.sun.tools.xjc.Driver$1.run(Driver.java:59)

Stephen

Environment

Operating System: Solaris Platform: Sun

Affected Versions

[2.0 EA1]

Tomas-Kraus commented 6 years ago
Tomas-Kraus commented 19 years ago

@glassfishrobot Commented Reported by sdp198

Tomas-Kraus commented 19 years ago

@glassfishrobot Commented kohsuke said: Thanks for the bug report. It's fixed now.

Tomas-Kraus commented 19 years ago

@glassfishrobot Commented Was assigned to jaxb-issues

Tomas-Kraus commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA JAXB-86

Tomas-Kraus commented 19 years ago

@glassfishrobot Commented Marked as fixed on Monday, September 26th 2005, 8:22:31 am