java - XML parsing exception org.xml.sax.SAXParseException cvc-elt.1 -


my xml contains

<?xml version="1.0" encoding="utf-8"?> <organization:organization xmlns:organization="http://www.bonitasoft.org/ns/organization/6.0.0-beta-016"> ...... </organization:organization> 

for complete xml file, please have @ : https://github.com/bonitasoft/bonita-examples/blob/master/rest-api-example/src/main/resources/acme.xml

i error on server side (java & tomcat) :

org.xml.sax.saxparseexception; linenumber: 2; columnnumber: 106; cvc-elt.1: cannot find declaration of element 'organization:organization'. (full stack trace below)

i changed 'organization' tag <organization> ... </organization>

still same error: cvc-elt.1: cannot find declaration of element 'organization'

edit


it works when change xmlns uri as

<organization:organization xmlns:organization="http://documentation.bonitasoft.com/organization-xml-schema/1.1"> 

can please explain.


i trying run rest api example mentioned in bonitasoft documentation : http://documentation.bonitasoft.com/create-your-first-project-web-rest-api-and-maven-0 (i guess pure xml parsing problem & has nothing bonitasoft code)

can 1 me resolve this.

thank time.

full stack trace :

2015-08-25 16:37:19.885 +0900 org.bonitasoft.web.toolkit.server.servlet.toolkithttpservlet org.bonitasoft.web.toolkit.server.servlet.toolkithttpservlet catchallexceptions  severe: can't import organization. please check file well-formed org.bonitasoft.web.toolkit.server.serviceexception: can't import organization. please check file well-formed     @ org.bonitasoft.console.server.service.organizationimportservice.run(organizationimportservice.java:62)     @ org.bonitasoft.web.toolkit.server.serviceservletcall.run(serviceservletcall.java:92)     @ org.bonitasoft.web.toolkit.server.serviceservletcall.dopost(serviceservletcall.java:72)     @ org.bonitasoft.web.toolkit.server.servlet.toolkithttpservlet.dopost(toolkithttpservlet.java:188)     @ javax.servlet.http.httpservlet.service(httpservlet.java:646)     @ org.bonitasoft.web.toolkit.server.servlet.toolkithttpservlet.service(toolkithttpservlet.java:75)     @ javax.servlet.http.httpservlet.service(httpservlet.java:727)     @ org.bonitasoft.web.toolkit.server.servlet.toolkithttpservlet.service(toolkithttpservlet.java:226)     @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:303)     @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:208)     @ org.apache.tomcat.websocket.server.wsfilter.dofilter(wsfilter.java:52)     @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:241)     @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:208)     @ org.tuckey.web.filters.urlrewrite.rulechain.handlerewrite(rulechain.java:176)     @ org.tuckey.web.filters.urlrewrite.rulechain.dorules(rulechain.java:145)     @ org.tuckey.web.filters.urlrewrite.urlrewriter.processrequest(urlrewriter.java:92)     @ org.tuckey.web.filters.urlrewrite.urlrewritefilter.dofilter(urlrewritefilter.java:394)     @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:241)     @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:208)     @ org.bonitasoft.console.common.server.login.filter.authenticationfilter.isauthorized(authenticationfilter.java:152)     @ org.bonitasoft.console.common.server.login.filter.authenticationfilter.doauthenticationfiltering(authenticationfilter.java:134)     @ org.bonitasoft.console.common.server.login.filter.authenticationfilter.dofilter(authenticationfilter.java:119)     @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:241)     @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:208)     @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:220)     @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:122)     @ org.apache.catalina.authenticator.authenticatorbase.invoke(authenticatorbase.java:501)     @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:171)     @ org.apache.catalina.valves.errorreportvalve.invoke(errorreportvalve.java:103)     @ org.bonitasoft.console.security.sessionfixationvalve.invoke(sessionfixationvalve.java:77)     @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:116)     @ org.apache.catalina.connector.coyoteadapter.service(coyoteadapter.java:408)     @ org.apache.coyote.http11.abstracthttp11processor.process(abstracthttp11processor.java:1070)     @ org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol.java:611)     @ org.apache.tomcat.util.net.jioendpoint$socketprocessor.run(jioendpoint.java:316)     @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615)     @ org.apache.tomcat.util.threads.taskthread$wrappingrunnable.run(taskthread.java:61)     @ java.lang.thread.run(thread.java:745) caused by: org.bonitasoft.engine.identity.organizationimportexception: username=install | org.bonitasoft.engine.xml.svalidationexception:  **org.xml.sax.saxparseexception; linenumber: 2; columnnumber: 106; cvc-elt.1: cannot find declaration of element 'organization:organization'.**     @ org.bonitasoft.engine.api.impl.identityapiimpl.importorganization(identityapiimpl.java:1427)     @ org.bonitasoft.engine.api.impl.identityapiimpl.importorganization(identityapiimpl.java:1414)     @ sun.reflect.generatedmethodaccessor58.invoke(unknown source)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)     @ java.lang.reflect.method.invoke(method.java:606)     @ org.bonitasoft.engine.api.impl.serverapiimpl.invokeapi(serverapiimpl.java:467)     @ org.bonitasoft.engine.api.impl.serverapiimpl$2.call(serverapiimpl.java:436)     @ org.bonitasoft.engine.transaction.jtatransactionserviceimpl.executeintransaction(jtatransactionserviceimpl.java:312)     @ org.bonitasoft.engine.api.impl.serverapiimpl.invokeapiintransaction(serverapiimpl.java:443)     @ org.bonitasoft.engine.api.impl.serverapiimpl.invokeapi(serverapiimpl.java:278)     @ org.bonitasoft.engine.api.impl.serverapiimpl.invokemethod(serverapiimpl.java:131)     @ org.bonitasoft.engine.api.impl.clientinterceptor.invoke(clientinterceptor.java:88)     @ com.sun.proxy.$proxy18.importorganization(unknown source)     @ org.bonitasoft.console.server.service.organizationimportservice.run(organizationimportservice.java:60)     ... 38 more  **caused by: org.bonitasoft.engine.xml.svalidationexception: org.xml.sax.saxparseexception; linenumber: 2; columnnumber: 106; cvc-elt.1: cannot find declaration of element 'organization:organization'.**     @ org.bonitasoft.engine.xml.saxvalidator.validate(saxvalidator.java:91)     @ org.bonitasoft.engine.xml.saxvalidator.validate(saxvalidator.java:80)     @ org.bonitasoft.engine.xml.parse.saxparser.validate(saxparser.java:138)     @ org.bonitasoft.engine.identity.xml.importorganization.execute(importorganization.java:131)     @ org.bonitasoft.engine.api.impl.identityapiimpl.importorganization(identityapiimpl.java:1425)     ... 51 more  **caused by: org.xml.sax.saxparseexception; linenumber: 2; columnnumber: 106; cvc-elt.1: cannot find declaration of element 'organization:organization'.**     @ com.sun.org.apache.xerces.internal.util.errorhandlerwrapper.createsaxparseexception(errorhandlerwrapper.java:198)     @ com.sun.org.apache.xerces.internal.util.errorhandlerwrapper.error(errorhandlerwrapper.java:134)     @ com.sun.org.apache.xerces.internal.impl.xmlerrorreporter.reporterror(xmlerrorreporter.java:437)     @ com.sun.org.apache.xerces.internal.impl.xmlerrorreporter.reporterror(xmlerrorreporter.java:368)     @ com.sun.org.apache.xerces.internal.impl.xmlerrorreporter.reporterror(xmlerrorreporter.java:325)     @ com.sun.org.apache.xerces.internal.impl.xs.xmlschemavalidator.handlestartelement(xmlschemavalidator.java:1906)     @ com.sun.org.apache.xerces.internal.impl.xs.xmlschemavalidator.startelement(xmlschemavalidator.java:746)     @ com.sun.org.apache.xerces.internal.impl.xmlnsdocumentscannerimpl.scanstartelement(xmlnsdocumentscannerimpl.java:379)     @ com.sun.org.apache.xerces.internal.impl.xmlnsdocumentscannerimpl$nscontentdriver.scanrootelementhook(xmlnsdocumentscannerimpl.java:605)     @ com.sun.org.apache.xerces.internal.impl.xmldocumentfragmentscannerimpl$fragmentcontentdriver.next(xmldocumentfragmentscannerimpl.java:3138)     @ com.sun.org.apache.xerces.internal.impl.xmldocumentscannerimpl$prologdriver.next(xmldocumentscannerimpl.java:880)     @ com.sun.org.apache.xerces.internal.impl.xmldocumentscannerimpl.next(xmldocumentscannerimpl.java:606)     @ com.sun.org.apache.xerces.internal.impl.xmlnsdocumentscannerimpl.next(xmlnsdocumentscannerimpl.java:117)     @ com.sun.org.apache.xerces.internal.impl.xmldocumentfragmentscannerimpl.scandocument(xmldocumentfragmentscannerimpl.java:510)     @ com.sun.org.apache.xerces.internal.parsers.xml11configuration.parse(xml11configuration.java:848)     @ com.sun.org.apache.xerces.internal.parsers.xml11configuration.parse(xml11configuration.java:777)     @ com.sun.org.apache.xerces.internal.jaxp.validation.streamvalidatorhelper.validate(streamvalidatorhelper.java:155)     @ com.sun.org.apache.xerces.internal.jaxp.validation.validatorimpl.validate(validatorimpl.java:116)     @ javax.xml.validation.validator.validate(validator.java:124)     @ org.bonitasoft.engine.xml.saxvalidator.validate(saxvalidator.java:89)     ... 55 more 

the error cannot find declaration of element 'organization:organization shows trying validate xml instance against schema. schema contain definitions of number of elements in namespace. fact works namespace http://documentation.bonitasoft.com/organization-xml-schema/1.1 suggests correct namespace required schema. if case, using different namespace of own invention cause error observed. it's purely question of whether using namespace defined in schema.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -