hi all,
this is the output:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C:\Documents and Settings\hamit ina>java edu.ncsu.tiaa.gui.GUI
File not found!
Processing the knowledge base: Put hyper-alert types into the database
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema
document 'newKnowledgeBase.xsd', because 1) could not find the
document; 2) the document could not be read; 3) the root element of the
document is not <xsd:schema>.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
at org.apache.xerces.util.ErrorHandlerWrapper.warning(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.traversers.XSDHandler.reportSchemaWarning(Unknown
Source)
at
org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown
Source)
at
org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown
Source)
at
org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(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.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.DOMParser.parse(Unknown Source)
at
edu.ncsu.tiaa.knowledgebase.KnowledgeBase.print(KnowledgeBase.java:313)
at
edu.ncsu.tiaa.knowledgebase.KnowledgeBase.<init>(KnowledgeBase.java:191)
at
edu.ncsu.tiaa.alert_collection.AlertCollection.<init>(AlertCollection.java:97)
at edu.ncsu.tiaa.gui.GUI.createNewProject(GUI.java:986)
at edu.ncsu.tiaa.gui.GUI.newButtonActionPerformed(GUI.java:1244)
at edu.ncsu.tiaa.gui.GUI.access$1400(GUI.java:33)
at edu.ncsu.tiaa.gui.GUI$15.actionPerformed(GUI.java:254)
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.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.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.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(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)
Warning: org.xml.sax.SAXParseException: schema_reference.4: Failed to
read schema document 'newKnowledgeBase.xsd', because 1) could not
find the document; 2) the document could not be read; 3) the root
element of the document is not <xsd:schema>.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I dont have the source of the application. now I wanna make sure that my
problem is "1) could not find the document" and is not other two choices
: 2) the document could not be read; 3) the root element of the document
is not <xsd:schema>. I have attached the xsd file. another point is that
the file is in linux format and i'm reading it in windows. i have also
converted it into windows format and i got the same error.
any help is appreciated.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="i...@ncsu"
targetNamespace="i...@ncsu"
elementFormDefault="qualified">
<!-- Big Picture of KnowledgeBase -->
<xsd:element name="KnowledgeBase">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Predicates"/>
<xsd:element ref="Implications"/>
<xsd:element ref="HyperAlertTypes"/>
</xsd:sequence>
</xsd:complexType>
<xsd:unique name="unique1">
<xsd:selector xpath="HyperAlertTypes/HyperAlertType"/>
<xsd:field xpath="@Name"/>
</xsd:unique>
<!-- set the name of the predicate as the key -->
<xsd:key name="PredicateNameKey">
<xsd:selector xpath="Predicates/Predicate"/>
<xsd:field xpath="@Name"/>
</xsd:key>
<xsd:keyref name="keyref1" refer="PredicateNameKey">
<xsd:selector xpath="Implications/Implication/Implying"/>
<xsd:field xpath="ImplyingName"/>
</xsd:keyref>
<xsd:keyref name="keyref2" refer="PredicateNameKey">
<xsd:selector xpath="Implications/Implication/Implied"/>
<xsd:field xpath="ImpliedName"/>
</xsd:keyref>
<xsd:keyref name="keyref3" refer="PredicateNameKey">
<xsd:selector xpath="HyperAlertTypes/HyperAlertType/Prerequisite/Predicate"/>
<xsd:field xpath="@Name"/>
</xsd:keyref>
<xsd:keyref name="keyref4" refer="PredicateNameKey">
<xsd:selector xpath="HyperAlertTypes/HyperAlertType/Consequence/Predicate"/>
<xsd:field xpath="@Name"/>
</xsd:keyref>
<!-- set the argument ID as the key -->
<xsd:unique name="ArgumentKey">
<xsd:selector xpath="Predicates/Predicate/Arg"/>
<xsd:field xpath="@id"/>
</xsd:unique>
<xsd:keyref name="keyref5" refer="ArgumentKey">
<xsd:selector xpath="Implications/Implication/ArgMap/ImplyingArg"/>
<xsd:field xpath="@id"/>
</xsd:keyref>
<xsd:keyref name="keyref6" refer="ArgumentKey">
<xsd:selector xpath="Implications/Implication/ArgMap/ImpliedArg"/>
<xsd:field xpath="@id"/>
</xsd:keyref>
<xsd:keyref name="keyref7" refer="ArgumentKey">
<xsd:selector xpath="HyperAlertTypes/HyperAlertType/Prerequisite/Predicate/Arg"/>
<xsd:field xpath="@id"/>
</xsd:keyref>
<xsd:keyref name="keyref8" refer="ArgumentKey">
<xsd:selector xpath="HyperAlertTypes/HyperAlertType/Consequence/Predicate/Arg"/>
<xsd:field xpath="@id"/>
</xsd:keyref>
</xsd:element>
<!-- ========================================= -->
<!-- Predicates schema -->
<xsd:element name="Predicates">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Predicate" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Arg" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:positiveInteger">
</xsd:attribute>
<xsd:attribute name="Pos" type="xsd:positiveInteger">
</xsd:attribute>
<xsd:attribute name="Attr">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="int"/>
<xsd:enumeration value="varchar(15)"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<!-- end of element Arg -->
</xsd:sequence>
<xsd:attribute name="Name" type="xsd:string" use="required">
</xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<!-- ========================================= -->
<!-- Implication schema -->
<xsd:element name="Implications">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Implication" minOccurs='0' maxOccurs='unbounded'/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Implication">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ImplyingName" type="xsd:string"/>
<xsd:element name="ImpliedName" type="xsd:string"/>
<xsd:element name="ArgMap" minOccurs='0' maxOccurs='unbounded'>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ImplyingArg">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:positiveInteger">
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="ImpliedArg">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:positiveInteger">
</xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="Phantom" default="No">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Yes"/>
<xsd:enumeration value="No"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<!-- ========================================= -->
<!-- HyperAlertTypes schema -->
<xsd:element name="HyperAlertTypes">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="HyperAlertType" minOccurs='1' maxOccurs='unbounded'/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="HyperAlertType">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Fact" minOccurs='1' maxOccurs='unbounded'/>
<xsd:element ref="Protocol" minOccurs='0' maxOccurs='unbounded'/>
<xsd:element ref="Prerequisite" minOccurs='0' maxOccurs='unbounded'/>
<xsd:element ref="Consequence" minOccurs='0' maxOccurs='unbounded'/>
</xsd:sequence>
<xsd:attribute name="Name" type="xsd:string" use="required">
</xsd:attribute>
</xsd:complexType>
<!-- set the Fact as the key for each hyper alert type -->
<xsd:key name="FactKey">
<xsd:selector xpath="Fact"/>
<xsd:field xpath="@FactName"/>
</xsd:key>
<xsd:keyref name="keyref9" refer="FactKey">
<xsd:selector xpath="Prerequisite/Predicate/Arg"/>
<xsd:field xpath="@ArgName"/>
</xsd:keyref>
<xsd:keyref name="keyref10" refer="FactKey">
<xsd:selector xpath="Consequence/Predicate/Arg"/>
<xsd:field xpath="@ArgName"/>
</xsd:keyref>
</xsd:element>
<xsd:element name="Fact">
<xsd:complexType>
<xsd:attribute name="FactName" type="xsd:string">
</xsd:attribute>
<xsd:attribute name="FactType">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="int"/>
<xsd:enumeration value="varchar(15)"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="Protocol">
<xsd:complexType>
<xsd:attribute name="ProtocolName" type="xsd:string">
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:element name="Prerequisite">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Predicate" minOccurs='0' maxOccurs='unbounded'/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Consequence">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Predicate" minOccurs='0' maxOccurs='unbounded'/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Predicate">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Arg" minOccurs='0' maxOccurs='unbounded'>
<xsd:complexType>
<xsd:attribute name="id" type="xsd:positiveInteger" use="required">
</xsd:attribute>
<xsd:attribute name="ArgName" type="xsd:string" use="required">
</xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="Name" type="xsd:string" use='required'>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:schema>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]