3 Replies Latest reply on Jun 17, 2010 8:57 PM by Vinay Chilakamarri

    JBoss 5.1.0 + Java6 + ant = 'setProperty must be overridden' error

    aodhan hoffman Newbie

      I've read the recent discussions on this topic, but I have not been able to overcome the 'setProperty' error by adding the the JBossws native jars to the lib/endorsed directory and adding them to the client's classpath.

       

      Specifically, I use ant to manage my deployment states and run the client for testing. I can build and deploy the web service war file just fine, and the JBoss server deploys it handily. When I run the /client/ I get into trouble.

       

      I installed the JBoss 5.1.0 GA JDK6 version and am running it on WindowsXP.

       

      Here's my run-client ant target:


          <target name="run-client" >
              <java classname="com.nmt.nls.api.client.NlsApiClient" fork="true">
                  <classpath>
                      <pathelement location="C:/jboss-5.1.0.GA/lib/endorsed/jbossws-native-jaxrpc.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/lib/endorsed/jbossws-native-jaxws.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/lib/endorsed/jbossws-native-jaxws-ext.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/lib/endorsed/jbossws-native-saaj.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/lib/endorsed/resolver.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/lib/endorsed/serializer.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/lib/endorsed/stax-api.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/lib/endorsed/xalan.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/lib/endorsed/xercesImpl.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/lib/endorsed/activation.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/lib/endorsed/jaxb-api.jar"/>
                     
                      <pathelement location="C:/jboss-5.1.0.GA/client/jboss-logging-log4j.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/jboss-logging-spi.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/jboss-client.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/jboss-common-core.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/jboss-common-client.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/jbossws-spi.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/jbossws-native-core.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/jbossws-native-client.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/jaxb-impl.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/jboss-xml-binding.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/wstx.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/jboss-logging-jdk.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/jboss-logging-spi.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/jbossws-common.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/wsdl4j.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/mail.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/policy.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/commons-logging.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/javassist.jar"/>
                      <pathelement location="C:/jboss-5.1.0.GA/client/jboss-remoting.jar"/>
                      <pathelement location="${basedir}\bin"/>
                      <pathelement location="${basedir}\com.nmt.nls.api.client"/>
                      <pathelement location="${basedir}\bin\com\nlsClient.properties"/>
                  </classpath>
              </java>
          </target>

       

      And here is the stack trace when I run this target:

       

      >ant run-client
      Buildfile: build.xml

      run-client:
           [java] Getting associations for TestingAsset/NLS_Core_Team
           [java] Exception in thread "main" javax.xml.ws.WebServiceException: java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
           [java]     at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:396)
           [java]     at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:302)
           [java]     at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:170)
           [java]     at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
           [java]     at $Proxy15.assetAssociationGet(Unknown Source)
           [java]     at com.nmt.nls.api.client.NlsApiClient.getAssociations(NlsApiClient.java:69)
           [java]     at com.nmt.nls.api.client.NlsApiClient.main(NlsApiClient.java:58)
           [java] Caused by: java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
           [java]     at javax.xml.soap.SOAPMessage.setProperty(SOAPMessage.java:445)
           [java]     at org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:87)
           [java]     at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:169)
           [java]     at org.jboss.ws.core.CommonSOAP11Binding.createMessage(CommonSOAP11Binding.java:57)
           [java]     at org.jboss.ws.core.CommonSOAPBinding.bindRequestMessage(CommonSOAPBinding.java:157)
           [java]     at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:290)
           [java]     at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:290)
           [java]     ... 5 more
           [java] Java Result: 1

      BUILD SUCCESSFUL
      Total time: 1 second

       

      I assume I'm either not using ant correctly, or not including the correct jars. I'd appreciate some insight from someone who has some experience dealing with this incompatibility. Thanks!