CXF
  1. CXF
  2. CXF-2907

Allow DynamicClientFactory to use any JAXB version 2.1 or greater

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.9
    • Fix Version/s: 2.2.10
    • Component/s: JAXB Databinding
    • Labels:
      None

      Description

      I want to use JAXB 2.2.1 to benefit from a JAXB bug fix but I am having problems getting CXF to recognize it is there.

      All is well when we use JAXB 2.1.13.

      I followed the instructions here to use JAXB on top of Java 6: https://jaxb.dev.java.net/guide/Migrating_JAXB_2_0_applications_to_JavaSE_6.html

      I think the problem is the way CXF detects the JAXB version in DynamicClientFactory#isJaxb21(SchemaCompiler).

      The implementation fails to see JAXB 2.2.1 because the build id is not in the expected format: hudson-jaxb-ri-2.2-7

      Has anyone else run into this issue? I am using a CXF 2.2.10 snapshot build to work around CXF 2.2.9 bug CXF-2900.

      My details:

      Apache Maven 2.2.1 (r801777; 2009-08-06 12:16:01-0700)
      Java version: 1.6.0_20
      Java home: C:\Program Files\Java\jdk1.6.0_20\jre
      Default locale: en_US, platform encoding: Cp1252
      OS name: "windows vista" version: "6.0" arch: "amd64" Family: "windows"

      1. CXF-2907.diff
        2 kB
        ggregory@seagullsw.com
      2. cxf-systests-databinding-pom.diff
        19 kB
        ggregory@seagullsw.com
      3. DynamicClientFactoryTest.diff
        5 kB
        ggregory@seagullsw.com

        Activity

        Hide
        ggregory@seagullsw.com added a comment -

        I am still testing this patch ATM. I am working around out-of-memory issues during the build. I wanted to post the patch in the hope that someone else would be able to test as well.

        Show
        ggregory@seagullsw.com added a comment - I am still testing this patch ATM. I am working around out-of-memory issues during the build. I wanted to post the patch in the hope that someone else would be able to test as well.
        Hide
        ggregory@seagullsw.com added a comment -

        I do not think the isJaxb21 method ever worked as planned.

        When I run against a stock Sun JDK 6 in the debugger I get a build ID of "hudson-jaxb-ri-2.1-2" for which the method returns false.

        If my version of the method is used, true is returned and the test AegisClientServerTest fails in Maven but passes in Eclipse. Confusing.

        It also looks like the method wants a more plain version format like "2.1.2"

        Any help is appreciated here.

        Show
        ggregory@seagullsw.com added a comment - I do not think the isJaxb21 method ever worked as planned. When I run against a stock Sun JDK 6 in the debugger I get a build ID of "hudson-jaxb-ri-2.1-2" for which the method returns false. If my version of the method is used, true is returned and the test AegisClientServerTest fails in Maven but passes in Eclipse. Confusing. It also looks like the method wants a more plain version format like "2.1.2" Any help is appreciated here.
        Hide
        Daniel Kulp added a comment -



        Honestly, I think we should just entirely remove this check. We no longer support JAXB 2.0 anywhere (and neither does Sun/Oracle) so the the user should already have 2.1 or newer available.

        Show
        Daniel Kulp added a comment - Honestly, I think we should just entirely remove this check. We no longer support JAXB 2.0 anywhere (and neither does Sun/Oracle) so the the user should already have 2.1 or newer available.
        Hide
        ggregory@seagullsw.com added a comment -

        I like that idea better, I'll try a different patch and see what happens...

        Show
        ggregory@seagullsw.com added a comment - I like that idea better, I'll try a different patch and see what happens...
        Hide
        ggregory@seagullsw.com added a comment -

        Removes the JAXB 2.1 check and assumes 2.1 is there.

        Show
        ggregory@seagullsw.com added a comment - Removes the JAXB 2.1 check and assumes 2.1 is there.
        Hide
        Daniel Kulp added a comment -

        Patch applied. Thanks!

        Show
        Daniel Kulp added a comment - Patch applied. Thanks!
        Hide
        ggregory@seagullsw.com added a comment - - edited

        Arg, when I test AegisClientServerTest.testDynamicClient from Eclipse, all is well.

        When I test from Maven, I get this hot mess:

        -------------------------------------------------------
         T E S T S
        -------------------------------------------------------
        Running org.apache.cxf.systest.aegis.AegisClientServerTest
        Tests run: 5, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.808 sec <<< FAILURE!
        testDynamicClient(org.apache.cxf.systest.aegis.AegisClientServerTest)  Time elapsed: 0.116 sec  <<< ERROR!
        java.lang.reflect.UndeclaredThrowableException
                at $Proxy42.parseSchema(Unknown Source)
                at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.addSchemas(DynamicClientFactory.java:429)
                at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:268)
                at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:195)
                at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:188)
                at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:143)
                at org.apache.cxf.systest.aegis.AegisClientServerTest.testDynamicClient(AegisClientServerTest.java:162)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
                at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
                at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
                at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
                at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
                at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
                at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
                at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
                at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
                at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
                at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
                at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
                at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
                at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115)
                at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:140)
                at org.apache.maven.surefire.Surefire.run(Surefire.java:109)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
                at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1017)
        Caused by: java.lang.reflect.InvocationTargetException
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
                ... 33 more
        Caused by: java.lang.reflect.UndeclaredThrowableException
                at $Proxy44.error(Unknown Source)
                at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerImpl.java:286)
                at com.sun.tools.xjc.reader.internalizer.VersionChecker.startElement(VersionChecker.java:112)
                at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
                at com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl.startElement(AbstractReferenceFinderImpl.java:84)
                at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
                at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
                at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:626)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3103)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:922)
                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:511)
                at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
                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:119)
                at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
                at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
                at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:393)
                at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:273)
                at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.parseSchema(SchemaCompilerImpl.java:148)
                ... 38 more
        Caused by: java.lang.reflect.InvocationTargetException
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
                ... 59 more
        Caused by: java.lang.RuntimeException: Error compiling schema from WSDL at {http://localhost:58112/jaxwsAndAegisSports?wsdl}: Both jaxb:version and version are present
                at org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListener.error(DynamicClientFactory.java:574)
                ... 64 more
        Caused by: org.xml.sax.SAXParseException: Both jaxb:version and version are present
                at com.sun.tools.xjc.reader.internalizer.VersionChecker.startElement(VersionChecker.java:110)
                ... 56 more
        
        
        Results :
        
        Tests in error:
          testDynamicClient(org.apache.cxf.systest.aegis.AegisClientServerTest)
        
        Tests run: 14, Failures: 0, Errors: 1, Skipped: 0
        

        What do you see?

        This error:

        Caused by: org.xml.sax.SAXParseException: Both jaxb:version and version are present
                at com.sun.tools.xjc.reader.internalizer.VersionChecker.startElement(VersionChecker.java:110)
                ... 56 more
        

        Does make sense since the source XML is (on disk at least):

        <?xml version="1.0" encoding="UTF-8"?>
        <!--
          Licensed to the Apache Software Foundation (ASF) under one
          or more contributor license agreements. See the NOTICE file
          distributed with this work for additional information
          regarding copyright ownership. The ASF licenses this file
          to you under the Apache License, Version 2.0 (the
          "License"); you may not use this file except in compliance
          with the License. You may obtain a copy of the License at
         
          http://www.apache.org/licenses/LICENSE-2.0
         
          Unless required by applicable law or agreed to in writing,
          software distributed under the License is distributed on an
          "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
          KIND, either express or implied. See the License for the
          specific language governing permissions and limitations
          under the License.
        -->
        <!--
          This enables the simple binding mode in JAXB.
          See http://weblogs.java.net/blog/kohsuke/archive/2006/03/simple_and_bett.html
        -->
        <jaxb:bindings
          xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0"
          xmlns:xjc= "http://java.sun.com/xml/ns/jaxb/xjc" jaxb:extensionBindingPrefixes="xjc">
          
          <jaxb:globalBindings generateElementProperty="false">
            <xjc:simple />
          </jaxb:globalBindings>
        </jaxb:bindings>
        

        I see a version attribute on the XML PI and on the JAXB bindings element.

        Weird. Can anyone make sense of that?

        Show
        ggregory@seagullsw.com added a comment - - edited Arg, when I test AegisClientServerTest.testDynamicClient from Eclipse, all is well. When I test from Maven, I get this hot mess: ------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.apache.cxf.systest.aegis.AegisClientServerTest Tests run: 5, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.808 sec <<< FAILURE! testDynamicClient(org.apache.cxf.systest.aegis.AegisClientServerTest) Time elapsed: 0.116 sec <<< ERROR! java.lang.reflect.UndeclaredThrowableException at $Proxy42.parseSchema(Unknown Source) at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.addSchemas(DynamicClientFactory.java:429) at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:268) at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:195) at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:188) at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:143) at org.apache.cxf.systest.aegis.AegisClientServerTest.testDynamicClient(AegisClientServerTest.java:162) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59) at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98) at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79) at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87) at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77) at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42) at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.Surefire.run(Surefire.java:109) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1017) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52) ... 33 more Caused by: java.lang.reflect.UndeclaredThrowableException at $Proxy44.error(Unknown Source) at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.error(SchemaCompilerImpl.java:286) at com.sun.tools.xjc.reader.internalizer.VersionChecker.startElement(VersionChecker.java:112) at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527) at com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl.startElement(AbstractReferenceFinderImpl.java:84) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:626) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3103) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:922) 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:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) 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:119) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:393) at com.sun.tools.xjc.reader.internalizer.DOMForest.parse(DOMForest.java:273) at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.parseSchema(SchemaCompilerImpl.java:148) ... 38 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52) ... 59 more Caused by: java.lang.RuntimeException: Error compiling schema from WSDL at {http://localhost:58112/jaxwsAndAegisSports?wsdl}: Both jaxb:version and version are present at org.apache.cxf.endpoint.dynamic.DynamicClientFactory$InnerErrorListener.error(DynamicClientFactory.java:574) ... 64 more Caused by: org.xml.sax.SAXParseException: Both jaxb:version and version are present at com.sun.tools.xjc.reader.internalizer.VersionChecker.startElement(VersionChecker.java:110) ... 56 more Results : Tests in error: testDynamicClient(org.apache.cxf.systest.aegis.AegisClientServerTest) Tests run: 14, Failures: 0, Errors: 1, Skipped: 0 What do you see? This error: Caused by: org.xml.sax.SAXParseException: Both jaxb:version and version are present at com.sun.tools.xjc.reader.internalizer.VersionChecker.startElement(VersionChecker.java:110) ... 56 more Does make sense since the source XML is (on disk at least): <?xml version= "1.0" encoding= "UTF-8" ?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License" ); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <!-- This enables the simple binding mode in JAXB. See http://weblogs.java.net/blog/kohsuke/archive/2006/03/simple_and_bett.html --> <jaxb:bindings xmlns:jaxb = "http://java.sun.com/xml/ns/jaxb" jaxb:version= "2.0" xmlns:xjc = "http://java.sun.com/xml/ns/jaxb/xjc" jaxb:extensionBindingPrefixes= "xjc" > <jaxb:globalBindings generateElementProperty= "false" > <xjc:simple /> </jaxb:globalBindings> </jaxb:bindings> I see a version attribute on the XML PI and on the JAXB bindings element. Weird. Can anyone make sense of that?
        Hide
        ggregory@seagullsw.com added a comment -

        The debug hack I use to debug Ant builds does not work for me here with Maven:

        MAVEN_OPTS=-Xmx512M -XX:MaxPermSize=256M -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9998

        The JVM listens:

        Listening for transport dt_socket at address: 9998
        [INFO] Scanning for projects...

        But does not stop on breakpoints.

        Ideas?

        Show
        ggregory@seagullsw.com added a comment - The debug hack I use to debug Ant builds does not work for me here with Maven: MAVEN_OPTS=-Xmx512M -XX:MaxPermSize=256M -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9998 The JVM listens: Listening for transport dt_socket at address: 9998 [INFO] Scanning for projects... But does not stop on breakpoints. Ideas?
        Hide
        Benson Margulies added a comment -

        -Dmaven.surefire.debug=true

        Show
        Benson Margulies added a comment - -Dmaven.surefire.debug=true
        Hide
        ggregory@seagullsw.com added a comment - - edited

        Ah! Thank you, "maven.surefire.debug" is working.

        Show
        ggregory@seagullsw.com added a comment - - edited Ah! Thank you, "maven.surefire.debug" is working.
        Hide
        ggregory@seagullsw.com added a comment - - edited

        The problem is that the Maven build runs the test with the JRE version of Xerces, which is very old.

        The tests I run from Eclipse are set up with Xerces 2.9.1, presumably as configured by the Maven Eclipse plugin.

        When I add Xerces 2.9.1 to the cxf-systests-databinding POM (2.10.0 is not in the M2 repo yet), the project cxf-systests-databinding passes all tests.

        Now, the real issue is that Xerces is not shipped with CXF eventhough Xalan is. I am sure there is a reason for that but shipping the current version of Xalan (2.7.1) and not the version of Xerces (2.9.0) that Xalan ships with seems like asking for trouble.

        So this ticket should add Xerces 2.9.1 (and then 2.10.0 when it is in the M2 repo) to this POM.

        Another ticket should add Xerces to the distro IMO.

        Thoughts?

        Show
        ggregory@seagullsw.com added a comment - - edited The problem is that the Maven build runs the test with the JRE version of Xerces, which is very old. The tests I run from Eclipse are set up with Xerces 2.9.1, presumably as configured by the Maven Eclipse plugin. When I add Xerces 2.9.1 to the cxf-systests-databinding POM (2.10.0 is not in the M2 repo yet), the project cxf-systests-databinding passes all tests. Now, the real issue is that Xerces is not shipped with CXF eventhough Xalan is. I am sure there is a reason for that but shipping the current version of Xalan (2.7.1) and not the version of Xerces (2.9.0) that Xalan ships with seems like asking for trouble. So this ticket should add Xerces 2.9.1 (and then 2.10.0 when it is in the M2 repo) to this POM. Another ticket should add Xerces to the distro IMO. Thoughts?
        Hide
        ggregory@seagullsw.com added a comment -

        Adds Xerces 2.9.1 to the POM for cxf-systests-databinding.

        Show
        ggregory@seagullsw.com added a comment - Adds Xerces 2.9.1 to the POM for cxf-systests-databinding.
        Hide
        Daniel Kulp added a comment -



        Resolved it by using our staxutils to parse it wrather than rely on any issues with whatever parser is picked up.

        Show
        Daniel Kulp added a comment - Resolved it by using our staxutils to parse it wrather than rely on any issues with whatever parser is picked up.
        Hide
        ggregory@seagullsw.com added a comment -

        Thanks Dan.

        I will pick up the next snapshot build.

        In the meantime, I have been updating from SVN and building locally as it seems Hudson is really backed up with jobs. I do not even see a CXF build scheduled.

        Show
        ggregory@seagullsw.com added a comment - Thanks Dan. I will pick up the next snapshot build. In the meantime, I have been updating from SVN and building locally as it seems Hudson is really backed up with jobs. I do not even see a CXF build scheduled.

          People

          • Assignee:
            Daniel Kulp
            Reporter:
            Gary Gregory
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development