SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'axon:annotation-config'.

Hi there,

I just downloaded the AxonFramework v1 and am playing around the
addresssbook sample application, I got following error message when I
was trying to run the ContactIntegrationTest

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The
matching wildcard is strict, but no declaration can be found for
element 'axon:annotation-config'.
  at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:
195)
  at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:
131)
  at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:
384)
  at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:
318)
  at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator
$XSIErrorReporter.reportError(XMLSchemaValidator.java:410)
  at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:
3165)
  at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:
1898)
  at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:
705)
  at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:
377)
  at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl
$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
  at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:
648)
  at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:
140)
  at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:
510)
  at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:
807)
  at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:
737)
  at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:
107)
  at
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:
225)
  at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:
283)
  at
org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:
75)
  at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:
388)
  ... 34 more

It seems like the axon xml namespace can not be found.

Any ideas?

Any help will be greatly appreciated!

Thanks!

Mervin

Hi Mervin,

that’s weird. I tried it against the tagged 1.0 version locally, and everything here works fine.

Can you open this file? http://www.axonframework.org/schema/axon-core-1.0.xsd
Maybe something went wrong while your IDE was trying to fetch the URL.

Let me know if the problem persists.

Cheers,

Allard

Thank you for your help. Yes, I can open the
http://www.axonframework.org/schema/axon-core-1.0.xsd file, but still
got same error even I add the axon-core-1.0.xsd to my eclipse ->
windows -> preferences -> XML -> XML Catalog -> User Specified
Entries, no clue what happened.

My dev machine is behind firewall and the internet proxy requires
authentication. Is it possible that proxy cause the problem? If so how
come there is no issue with spring's xsd files.

Thanks again!

Mervin

Hi Mervin,

Axon uses Spring’s mechanism for dealing with XSD files. Therefore, I don’t understand why it doesn’t work. If I run the tests locally, everything is fine, and so is our build server. Even if I drop the internet connection, the test starts.

Have you tried running “mvn clean verify” on the entire project? Does the test fail then as well?

Cheers,

Allard

Hi Allard,

Thanks again for your help. I was using apache ivy instead of apache
maven on my dev machine. I will set up a clean dev environment and
install maven eclipse plugin and give it a try again.

Cheers

Mervin

Hi Mervin,

I accidentally managed to reproduce the problem. If you update to the latest revision in the trunk, does the problem disappear?

Cheers,

Allard

Hi Allard,

I synchronized my workspace to the latest revision but I got different error when I was trying to execute “mvn clean install”, the error message:

Failed to execute goal on project axon-core: Could not resolve dependencies for project org.axonframework:axon-core:jar:1.1-SNAPSHOT: Failure to find org.hibernate:hibernate-validator:jar:4.1.0.Final in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project axon-core: Could not resolve dependencies for project org.axonframework:axon-core:jar:1.1-SNAPSHOT: Failure to find org.hibernate:hibernate-validator:jar:4.1.0.Final in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced

I googled it found that one answer on stackoverflow saying that I need add “-cpu” option but I am not sure how to do it in eclipse since I am fairly new to Maven and M2Eclipse. Still struggling on it… :frowning:

Any help would be greatly appreciated.

Thanks!

Mervin

I just synchronized my workspace again couple minutes ago and found
that another two new updates.

Now the problem is gone and it works fine. Thanks!

Mervin