[midPoint] Issue while uploading resource xml

Nitin G. Prabhu Nitin.Prabhu at mastek.com
Wed Apr 9 16:20:31 CEST 2014


Hi,
I am trying to import attached resource xml file into midpoint but I am getting below error.I am unable to understand why I am getting the error is that I have missed any configuration.I am using midpoint version 2.2


 *   Validation error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'resource'. One of '{"http://midpoint.evolveum.com/xml/ns/public/common/common-2a":object}' is expected.: Validation error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'resource'. One of '{"http://midpoint.evolveum.com/xml/ns/public/common/common-2a":object}' is expected.


    *   Save resource (Gui)
    *   Collapse all Expand all Export to XML
    *   Schema validation
       *   Validation error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'resource'. One of '{"http://midpoint.evolveum.com/xml/ns/public/common/common-2a":object}' is expected.
       *   Cause:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'resource'. One of '{"http://midpoint.evolveum.com/xml/ns/public/common/common-2a":object}' is expected.

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<c:operationResult xmlns:icfs='http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-2' xmlns:icfc='http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-2' xmlns:t='http://prism.evolveum.com/xml/ns/public/types-2' xmlns:c='http://midpoint.evolveum.com/xml/ns/public/common/common-2a' xmlns:cap='http://midpoint.evolveum.com/xml/ns/public/resource/capabilities-2' xmlns:q='http://prism.evolveum.com/xml/ns/public/query-2' xmlns:apti='http://midpoint.evolveum.com/xml/ns/public/common/api-types-2' xmlns:m='http://midpoint.evolveum.com/xml/ns/public/model/model-context-2' xmlns:wfcf='http://midpoint.evolveum.com/xml/ns/model/workflow/common-forms-2' xmlns:ds='http://www.w3.org/2000/09/xmldsig#' xmlns:enc='http://www.w3.org/2001/04/xmlenc#'>
    <c:operation>com.evolveum.midpoint.web.page.admin.resources.PageResourceEdit.saveResource</c:operation>
    <c:status>fatal_error</c:status>
    <c:token>1000000000000000470</c:token>
    <c:message>Validation error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'resource'. One of '{'http://midpoint.evolveum.com/xml/ns/public/common/common-2a':object}' is expected.: Validation error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'resource'. One of '{'http://midpoint.evolveum.com/xml/ns/public/common/common-2a':object}' is expected.</c:message>
    <c:partialResults>
        <c:operation>com.evolveum.midpoint.common.validator.Validator.validateSchema</c:operation>
        <c:status>fatal_error</c:status>
        <c:token>1000000000000000471</c:token>
        <c:message>Validation error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'resource'. One of '{'http://midpoint.evolveum.com/xml/ns/public/common/common-2a':object}' is expected.</c:message>
        <c:details>org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'resource'. One of '{'http://midpoint.evolveum.com/xml/ns/public/common/common-2a':object}' is expected.
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.beginNode(Unknown Source)
com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)
com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)
com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(Unknown Source)
com.evolveum.midpoint.common.validator.Validator.validateSchema(Validator.java:446)
com.evolveum.midpoint.common.validator.Validator.validateObjectInternal(Validator.java:348)
com.evolveum.midpoint.common.validator.Validator.validateObject(Validator.java:336)
com.evolveum.midpoint.web.page.PageBase.validateObject(PageBase.java:490)
com.evolveum.midpoint.web.page.admin.resources.PageResourceEdit.savePerformed(PageResourceEdit.java:205)
com.evolveum.midpoint.web.page.admin.resources.PageResourceEdit.access$5(PageResourceEdit.java:193)
com.evolveum.midpoint.web.page.admin.resources.PageResourceEdit$6.onSubmit(PageResourceEdit.java:157)
org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubmitLink.java:116)
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior$1.onSubmit(AjaxFormSubmitBehavior.java:179)
org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1235)
org.apache.wicket.markup.html.form.Form.process(Form.java:921)
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:767)
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:156)
org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:131)
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:603)
sun.reflect.GeneratedMethodAccessor529.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:247)
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:226)
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:840)
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254)
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211)
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282)
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:244)
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:267)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:125)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
com.evolveum.midpoint.web.util.MidPointProfilingServletFilter.doFilter_aroundBody0(MidPointProfilingServletFilter.java:69)
com.evolveum.midpoint.web.util.MidPointProfilingServletFilter$AjcClosure1.run(MidPointProfilingServletFilter.java:1)
org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
com.evolveum.midpoint.util.aspect.MidpointAspect.wrapSubsystem(MidpointAspect.java:169)
com.evolveum.midpoint.util.aspect.MidpointAspect.ajc$inlineAccessMethod$com_evolveum_midpoint_util_aspect_MidpointAspect$com_evolveum_midpoint_util_aspect_MidpointAspect$wrapSubsystem(MidpointAspect.java:1)
com.evolveum.midpoint.util.aspect.MidpointAspect.processWebNdc(MidpointAspect.java:84)
com.evolveum.midpoint.web.util.MidPointProfilingServletFilter.doFilter(MidPointProfilingServletFilter.java:65)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
</c:details>
    </c:partialResults>
</c:operationResult>





Regards,
Nitin

From: midpoint-bounces at lists.evolveum.com [mailto:midpoint-bounces at lists.evolveum.com] On Behalf Of Radovan Semancik
Sent: 09 April 2014 08:14
To: midpoint at lists.evolveum.com
Subject: Re: [midPoint] Issue while uploading resource xml

Hi,

On 04/08/2014 09:24 PM, Nitin G. Prabhu wrote:
Thanks a lot  Radovan for your reply .Just had a query how does midpoint synchronizes database table I guess it's the change log column which does the work? but wanted to know how it works how midpoint identifies whether value in the row has changed or whether it is a new row .

It is actually the timestamp column. The DatabaseTable connector expects that there will be a column with the timestamp of last change in the row. MidPoint remembers the time of last synchronization and queries all rows that has been changed after that.


 Also do we have connectors for Postgres DB instead of Data table.

DatabaseTable is quite universal. It can connect to any database for which you have JDBC driver. Therefore it also works for PostgreSQL (we are using this a lot).

The special connectors for MySQL, Oracle, DB2 and so on are actually designed to manage database *administrator* accounts. And we do not have connector for PostreSQL for this purpose because as far as I know the easiest way to manage PostreSQL dabase is to use users from operating system or other identity repository. And we have connectors for Windows (Active Directory), Solaris and Linux.


 If I have say 5 tables to synchronize then will I need to configure 5 different xml files if I use datatable connector or can I specify it in only one resource xml file

You can actually use ScriptedSQL connector for that. This connector is using pieces of JavaScript code to construct actual SQL queries. Therefore this one should work for your case. But a word of warning here: this connector is not yet very well tested and also the documentation is a bit thin at the moment.

However it should be quite easy for you to write your own custom connector in Java. It is also perhaps the most professional way and this connector is definitely much more reliable from the maintenance point of view. Writing your own connector actually means implementing a couple of Java methods.



--



                                           Radovan Semancik

                                          Software Architect

                                             evolveum.com
MASTEK LTD.
In the US, we're called MAJESCOMASTEK

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20140409/b6b30073/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ldap-resource.xml
Type: text/xml
Size: 9425 bytes
Desc: ldap-resource.xml
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20140409/b6b30073/attachment.xml>


More information about the midPoint mailing list