Test 1 will not work because the xs:schemaLocation does not point to valid
location for the schema.
You can work around this by configuring an XML Catalog in your IDE so it
treats "drools-change-set-5.0.xsd" as an alias.
Checkout the widely available xs:schemaLocation documentation for details
of its syntax.
Test 2 *should* be OK. The referenced schema does exist and is valid.
guvnor-examples uses the exact same and works well (or at least for me!)
Can you provide a self-contained unit test to replicate the issue?
On 23 January 2012 20:43, domingo <sprabakkar(a)gmail.com> wrote:
I have some issues using changeset...
*Test - 1*
<change-set
xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set
drools-change-set-5.0.xsd'>
<add>
<resource source='classpath:dir1/dir2/filename.drl' type='DRL' />
</add>
</change-set>
when i use the above changeset (thanks to user forum)...the program works
fine no issues but i got the following warning messages...
(null: 1, 201): schema_reference.4: Failed to read schema document
'drools-change-set-5.0.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>.
(null: 1, 201): cvc-elt.1: Cannot find the declaration of element
'change-set'.
(null: 1, 207): schema_reference.4: Failed to read schema document
'drools-change-set-5.0.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>.
(null: 1, 285): schema_reference.4: Failed to read schema document
'drools-change-set-5.0.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>.
(null: 1, 374): schema_reference.4: Failed to read schema document
'drools-change-set-5.0.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>.
(null: 1, 446): schema_reference.4: Failed to read schema document
'drools-change-set-5.0.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>.
(null: 1, 534): schema_reference.4: Failed to read schema document
'drools-change-set-5.0.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>.
*Question: how to get rid of this? I completely google the web including
user forum no answer.If it is available in the forum, my apologies for
missing that info...some one could forward me to that info location.*
*Test - 2*
<change-set
xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/...
'
>
<add>
<resource source='classpath:dir1/dir2/filename.drl' type='DRL' />
</add>
</change-set>
when i use the above changeset (grepcode drools-compiler 5.2.1
Final)...after 1 minute it gives the following error message and the thread
is open for ever...nothing happen.
INFO: KnowledgeDefinitionBuilder::::: changeset == <change-set
xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/...
'
> <add> <resource source='classpath:dir1/dir2/filename.drl'
type='DRL' />
</add> </change-set>
(null: 1, 285): schema_reference.4:
Failed to read schema document
'
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/...
',
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>.
(null: 1, 285): cvc-elt.1: Cannot find the declaration of element
'change-set'.
*Question: I copied the schemaLocation from the src, why it is not working?
please advise me?*
-----
with kind regards,
--
View this message in context:
http://drools.46999.n3.nabble.com/changeset-schema-error-tp3682951p368295...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users