Chemistry
  1. Chemistry
  2. CMIS-492

Failed to trigger "CmisTckAntTask" for ws tests due to conflict of jaxws in the JDK and opencmis lib

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Won't Fix
    • Affects Version/s: OpenCMIS 0.6.0
    • Fix Version/s: None
    • Component/s: opencmis-tck
    • Labels:
      None

      Description

      Currently opencmis lib use Jaxws 2.1.7 while JDK 6 only contains Jaxws 2.0.
      When the ant task "CmisTckAntTask" is triggered, it will automatically load Jaxws in JDK firstly which cause following error msg to execute WS TCK tests

      C:\OpenCMIS\chemistry-opencmis-test\chemistry-opencmis-test-tck\target\classes\build.xml:34: OpenCMIS TCK run failed!
      	at org.apache.chemistry.opencmis.tck.runner.CmisTckAntTask.execute(CmisTckAntTask.java:125)
      	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      	at org.apache.tools.ant.Task.perform(Task.java:348)
      	at org.apache.tools.ant.Target.execute(Target.java:390)
      	at org.apache.tools.ant.Target.performTasks(Target.java:411)
      	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
      	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
      	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      	at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
      	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
      	at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424)
      	at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)
      Caused by: org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Cannot initalize Web Services port object: $Proxy40 cannot be cast to com.sun.xml.ws.developer.WSBindingProvider
      	at org.apache.chemistry.opencmis.client.bindings.spi.webservices.PortProvider.createPortObject(PortProvider.java:131)
      	at org.apache.chemistry.opencmis.client.bindings.spi.webservices.AbstractPortProvider.getPortObject(AbstractPortProvider.java:210)
      	at org.apache.chemistry.opencmis.client.bindings.spi.webservices.AbstractPortProvider.getRepositoryServicePort(AbstractPortProvider.java:109)
      	at org.apache.chemistry.opencmis.client.bindings.spi.webservices.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:57)
      	at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:85)
      	at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:109)
      	at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:96)
      	at org.apache.chemistry.opencmis.tck.impl.AbstractSessionTest.run(AbstractSessionTest.java:142)
      	at org.apache.chemistry.opencmis.tck.impl.AbstractCmisTestGroup.run(AbstractCmisTestGroup.java:109)
      	at org.apache.chemistry.opencmis.tck.runner.AbstractRunner.run(AbstractRunner.java:250)
      	at org.apache.chemistry.opencmis.tck.runner.CmisTckAntTask.execute(CmisTckAntTask.java:120)
      	... 16 more
      Caused by: java.lang.ClassCastException: $Proxy40 cannot be cast to com.sun.xml.ws.developer.WSBindingProvider
      	at org.apache.chemistry.opencmis.client.bindings.spi.webservices.PortProvider.createPortObject(PortProvider.java:108)
      	... 26 more
      

        Activity

        Kunpeng Yang created issue -
        Hide
        Florian Müller added a comment -

        Please make sure that the TCK classpath contains the OpenCMIS jars AND all decencies (including the JAX-WS jars).

        Show
        Florian Müller added a comment - Please make sure that the TCK classpath contains the OpenCMIS jars AND all decencies (including the JAX-WS jars).
        Hide
        Kunpeng Yang added a comment -

        Yeah, the classpath of ant script has everything while the ant script load the JDK before any other class

        Show
        Kunpeng Yang added a comment - Yeah, the classpath of ant script has everything while the ant script load the JDK before any other class
        Hide
        Florian Müller added a comment -

        Copy the JAX-WS jars to your Java endorsed directory, or set or add to the environment variable ANT_OPTS "-Djava.endorsed.dirs=/path/to/opencmis", or run it in an environment that supports a parent-last classloader.
        It should also work without any changes with Java 5 and Java 7. (It's a Java 6 problem only.)

        Alternatively, you can start the TCK ConsoleRunner from Ant.

        Show
        Florian Müller added a comment - Copy the JAX-WS jars to your Java endorsed directory, or set or add to the environment variable ANT_OPTS "-Djava.endorsed.dirs=/path/to/opencmis", or run it in an environment that supports a parent-last classloader. It should also work without any changes with Java 5 and Java 7. (It's a Java 6 problem only.) Alternatively, you can start the TCK ConsoleRunner from Ant.
        Florian Müller made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Florian Müller [ fmui ]
        Resolution Won't Fix [ 2 ]

          People

          • Assignee:
            Florian Müller
            Reporter:
            Kunpeng Yang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development