Announcement Announcement Module
Collapse
No announcement yet.
Simple WS client integration test fails to load context Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Simple WS client integration test fails to load context

    I'm trying to run a simple WS client integration test, and it fails even to load a context. My current guess is that there are some issues with various XML frameworks compatibility, Java 6 built in XML support, ...
    Following is part of the stack trace I receive after running this test:

    Code:
    ...
    FAILED CONFIGURATION: @BeforeClass springTestContextPrepareTestInstance
    java.lang.IllegalStateException: Failed to load ApplicationContext
    	at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:203)
    	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
    	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
    	at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:255)
    	at org.springframework.test.context.testng.AbstractTestNGSpringContextTests.springTestContextPrepareTestInstance(AbstractTestNGSpringContextTests.java:117)
    Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Parser configuration exception parsing XML from class path resource [com/ws/client/clientTestCtx.xml]; nested exception is javax.xml.parsers.ParserConfigurationException: Unable to validate using XSD: Your JAXP provider [org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@146c1d4] does not support XML Schema. Are you running on Java 1.4 with Apache Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support.
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)
    	...
    	at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:199)
    	... 26 more
    Caused by: javax.xml.parsers.ParserConfigurationException: Unable to validate using XSD: Your JAXP provider [org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@146c1d4] does not support XML Schema. Are you running on Java 1.4 with Apache Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support.
    	at org.springframework.beans.factory.xml.DefaultDocumentLoader.createDocumentBuilderFactory(DefaultDocumentLoader.java:102)
    	at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:70)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
    	... 36 more
    Caused by: java.lang.IllegalArgumentException: No attributes are implemented
    	at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.setAttribute(DocumentBuilderFactoryImpl.java:93)
    	at org.springframework.beans.factory.xml.DefaultDocumentLoader.createDocumentBuilderFactory(DefaultDocumentLoader.java:99)
    	... 38 more
    ... Removed 22 stack frames
    SKIPPED CONFIGURATION: @BeforeMethod springTestContextBeforeTestMethod
    SKIPPED CONFIGURATION: @BeforeMethod springTestContextBeforeTestMethod

  • #2
    In another test I run following environment check:

    Code:
    Assert.assertTrue((new EnvironmentCheck()).checkEnvironment(new PrintWriter(System.err)));
    and everything seems to be OK as can be seen in its output:

    Code:
    #---- BEGIN writeEnvironmentReport($Revision: 1.29 $): Useful stuff found: ----
    version.DOM.draftlevel=2.0fd
    java.class.path=/C:/eclipse/plugins/org.testng.eclipse_5.7.0.1/eclipse-testng.jar;/C:/eclipse/plugins/org.testng.eclipse_5.7.0.1/lib/testng-jdk15.jar;C:\eclipse\workspace\project\bin;C:\repository\org\testng\testng\5.7\testng-5.7-jdk15.jar;C:\repository\junit\junit\3.8.1\junit-3.8.1.jar;C:\repository\org\springframework\spring-test\2.5.3\spring-test-2.5.3.jar;C:\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\repository\org\easymock\easymock\2.3\easymock-2.3.jar;C:\repository\org\springframework\spring-core\2.5.3\spring-core-2.5.3.jar;C:\repository\org\springframework\spring-context\2.5.3\spring-context-2.5.3.jar;C:\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\repository\org\springframework\spring-beans\2.5.3\spring-beans-2.5.3.jar;C:\repository\org\springframework\spring-webmvc\2.5.3\spring-webmvc-2.5.3.jar;C:\repository\org\springframework\spring-context-support\2.5.3\spring-context-support-2.5.3.jar;C:\repository\org\springframework\spring-web\2.5.3\spring-web-2.5.3.jar;C:\repository\org\springframework\security\spring-security-core\2.0.0\spring-security-core-2.0.0.jar;C:\repository\commons-codec\commons-codec\1.3\commons-codec-1.3.jar;C:\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\repository\org\springframework\ws\spring-ws-core\1.5.0\spring-ws-core-1.5.0.jar;C:\repository\org\springframework\ws\spring-xml\1.5.0\spring-xml-1.5.0.jar;C:\repository\org\apache\ws\commons\schema\XmlSchema\1.3.2\XmlSchema-1.3.2.jar;C:\repository\org\springframework\ws\spring-oxm\1.5.0\spring-oxm-1.5.0.jar;C:\repository\org\springframework\spring-aop\2.5.2\spring-aop-2.5.2.jar;C:\repository\wsdl4j\wsdl4j\1.6.1\wsdl4j-1.6.1.jar;C:\repository\org\springframework\ws\spring-ws-core-tiger\1.5.0\spring-ws-core-tiger-1.5.0.jar;C:\repository\org\springframework\ws\spring-oxm-tiger\1.5.0\spring-oxm-tiger-1.5.0.jar;C:\repository\org\codehaus\castor\castor\1.1.2.1\castor-1.1.2.1.jar;C:\repository\log4j\log4j\1.2.14\log4j-1.2.14.jar;C:\repository\xerces\xerces\1.4.0\xerces-1.4.0.jar;C:\repository\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar;C:\repository\org\apache\tiles\tiles-core\2.0.5\tiles-core-2.0.5.jar;C:\repository\org\apache\tiles\tiles-api\2.0.5\tiles-api-2.0.5.jar;C:\repository\commons-logging\commons-logging-api\1.1\commons-logging-api-1.1.jar;C:\repository\commons-digester\commons-digester\1.8\commons-digester-1.8.jar;C:\repository\commons-beanutils\commons-beanutils\1.7.0\commons-beanutils-1.7.0.jar;C:\repository\org\apache\tiles\tiles-jsp\2.0.5\tiles-jsp-2.0.5.jar;C:\repository\javax\servlet\jstl\1.2\jstl-1.2.jar;C:\repository\org\apache\struts\struts-tiles\1.3.9\struts-tiles-1.3.9.jar;C:\repository\org\apache\struts\struts-core\1.3.9\struts-core-1.3.9.jar;C:\repository\antlr\antlr\2.7.2\antlr-2.7.2.jar;C:\repository\commons-chain\commons-chain\1.1\commons-chain-1.1.jar;C:\repository\commons-validator\commons-validator\1.3.1\commons-validator-1.3.1.jar;C:\repository\oro\oro\2.0.8\oro-2.0.8.jar;C:\repository\org\slf4j\slf4j-log4j12\1.4.0\slf4j-log4j12-1.4.0.jar;C:\repository\org\slf4j\slf4j-api\1.4.0\slf4j-api-1.4.0.jar;C:\repository\slide\slide-webdavlib\2.1\slide-webdavlib-2.1.jar;C:\repository\commons-httpclient\commons-httpclient\2.0.2\commons-httpclient-2.0.2.jar;C:\repository\jdom\jdom\1.0\jdom-1.0.jar;C:\repository\de\zeigermann\xml\xml-im-exporter\1.1\xml-im-exporter-1.1.jar;C:\repository\xmlpull\xmlpull\1.1.3.4a\xmlpull-1.1.3.4a.jar;C:\repository\xpp3\xpp3\1.1.3.3\xpp3-1.1.3.3.jar;C:\repository\org\jibx\jibx-bind\1.1.5\jibx-bind-1.1.5.jar;C:\repository\org\jibx\jibx-run\1.1.5\jibx-run-1.1.5.jar;C:\repository\org\codehaus\woodstox\wstx-asl\3.2.1\wstx-asl-3.2.1.jar;C:\repository\stax\stax-api\1.0\stax-api-1.0.jar;C:\repository\hippo\hippo-repository-adapter-api\2.09.00\hippo-repository-adapter-api-2.09.00.jar;C:\repository\hippo\hippo-repository-webdav-client\2.09.00\hippo-repository-webdav-client-2.09.00.jar;C:\repository\hippo\hippo-repository-cachemanager\2.09.00\hippo-repository-cachemanager-2.09.00.jar;C:\repository\hippo\hippo-repository-update-notifier\2.09.00\hippo-repository-update-notifier-2.09.00.jar;C:\repository\xalan\xalan\2.7.0\xalan-2.7.0.jar;C:\repository\xml-apis\xml-apis\1.3.04\xml-apis-1.3.04.jar;C:\repository\xerces\xercesImpl\2.4.0\xercesImpl-2.4.0.jar;C:\repository\org\apache\jcs\jcs\1.3\jcs-1.3.jar;C:\repository\concurrent\concurrent\1.3.4\concurrent-1.3.4.jar;C:\repository\openjms\openjms\0.7.6\openjms-0.7.6.jar;C:\repository\openjms\openjms-client\0.7.6\openjms-client-0.7.6.jar;C:\repository\javax\jms\jms\1.1\jms-1.1.jar;C:\repository\exolabcore\exolabcore\0.3.7\exolabcore-0.3.7.jar;C:\repository\commons-betwixt\commons-betwixt\0.8\commons-betwixt-0.8.jar;C:\repository\commons-beanutils\commons-beanutils-core\1.7.0\commons-beanutils-core-1.7.0.jar;C:\repository\org\springframework\spring-context\2.5.2\spring-context-2.5.2.jar;C:\repository\org\springframework\spring-beans\2.5.2\spring-beans-2.5.2.jar;C:\repository\org\springframework\spring-core\2.5.2\spring-core-2.5.2.jar;C:\repository\commons-lang\commons-lang\2.3\commons-lang-2.3.jar;C:\repository\commons-collections\commons-collections\3.2\commons-collections-3.2.jar;C:\repository\commons-pool\commons-pool\1.4\commons-pool-1.4.jar;C:\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar;C:\repository\openjms\openjms\0.7.6.1\openjms-0.7.6.1.jar;C:\repository\openjms\openjms-client\0.7.6.1\openjms-client-0.7.6.1.jar;C:\repository\excalibur-slide\excalibur-slide-common\1.2.10.2\excalibur-slide-common-1.2.10.2.jar;C:\repository\commons-lang\commons-lang\2.4\commons-lang-2.4.jar;C:\repository\commons-fileupload\commons-fileupload\1.2.1\commons-fileupload-1.2.1.jar;C:\repository\commons-io\commons-io\1.4\commons-io-1.4.jar
    version.JAXP=1.1 or higher
    java.ext.dirs=C:\Program Files (x86)\Java\jdk\jdk1.6.0_05\jre\lib\ext;C:\Windows\Sun\Java\lib\ext
    version.xerces2=Xerces-J 2.4.0
    version.xerces1=Xerces 1.4.0
    version.xalan2_2=Xalan Java 2.7.0
    version.xalan1=not-present
    version.ant=not-present
    java.version=1.6.0_05
    version.DOM=2.0
    version.crimson=not-present
    sun.boot.class.path=C:\Program Files (x86)\Java\jdk\jdk1.6.0_05\jre\lib\resources.jar;C:\Program Files (x86)\Java\jdk\jdk1.6.0_05\jre\lib\rt.jar;C:\Program Files (x86)\Java\jdk\jdk1.6.0_05\jre\lib\sunrsasign.jar;C:\Program Files (x86)\Java\jdk\jdk1.6.0_05\jre\lib\jsse.jar;C:\Program Files (x86)\Java\jdk\jdk1.6.0_05\jre\lib\jce.jar;C:\Program Files (x86)\Java\jdk\jdk1.6.0_05\jre\lib\charsets.jar;C:\Program Files (x86)\Java\jdk\jdk1.6.0_05\jre\classes
    version.SAX=2.0
    version.xalan2x=Xalan Java 2.7.0
    #----- END writeEnvironmentReport: Useful properties found: -----
    # YAHOO! Your environment seems to be OK.
    I've read Spring WS FAQ ( http://static.springframework.org/sp.../site/faq.html ), downloaded xalan-j_2_7_1 distribution archive and copied serializer, xalan, xercesImpl, and xml-apis jars into the "C:\Program Files (x86)\Java\jdk\jdk1.6.0_05\lib\endorsed" folder, and it didn't help (btw, endorsed folder wasn't initially present and it had to be created).

    Any suggestions would be appreciated. Thanks in advance!

    Comment

    Working...
    X