mvpgomes / cloud4things

Repository of the Cloud4Things Master Thesis dissertation.
MIT License
1 stars 1 forks source link

Capturing Application: cvc-elt.1: Cannot find the declaration of element 'change-set'. #186

Closed dvcorreia closed 4 years ago

dvcorreia commented 4 years ago

I'm trying to use the Capturing Application and there's an error that I couldn't fix.

I'm getting this log:

(null: 3, 230): cvc-elt.1: Cannot find the declaration of element 'change-set'.

My capture.properties looks like this:

# specifies how many event sinks (capture applications) are present in the configuration file.
n=1
# configuration for capturing app 0
# unique port where the capturing app is listening for ECReports
cap.0.port=9999
# unique name for the capturing app.
cap.0.name=warehouse1
# capture application endpoint
cap.0.epcis=http://epcis:8080/epcis-repository-0.5.0/capture
# specifies the changeset file for this capturing app (in essence the rules...)
cap.0.changeset=changeset.xml

The changeset.xml like this:

<?xml version="1.0" encoding="utf-8" ?>
<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.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd' >
  <add>
    <resource source='classpath:drools/SimpleEPCISDocument.drl' type='DRL' />
  </add>
</change-set>

The capturing application initialises correctly. The error pops up when the middleware sends reports to the capturing application.

capture             | 2352 [localhost-startStop-1] INFO  org.fosstrak.capturingapp.CaptureAppPortTypeImpl  - initialize capture applications

capture             | 2363 [localhost-startStop-1] INFO  org.fosstrak.capturingapp.CaptureAppPortTypeImpl  - create new capture app: (warehouse1,9999,http://epcis:8080/epcis-repository-0.5.0/capture)

capture             | 2368 [localhost-startStop-1] INFO  org.fosstrak.capturingapp.CaptureAppPortTypeImpl  - Using handler class: org.fosstrak.capturingapp.DefaultECReportHandler

capture             | 2626 [localhost-startStop-1] INFO  org.fosstrak.capturingapp.CaptureAppPortTypeImpl  - starting capture app: (warehouse1,9999,http://epcis:8080/epcis-repository-0.5.0/capture)

Any clues? I'm really not very experienced with Java.

dvcorreia commented 4 years ago

The solutions is to change

xs:schemaLocation='http://drools.org/drools-5.0/change-set.xsd [...]'

to

xs:schemaLocation='http://drools.org/drools-5.0/change-set [...]'