Bug 778805 (SOA-1255) - Some WS-related quickstarts don't run on JDK6
Summary: Some WS-related quickstarts don't run on JDK6
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-1255
Product: JBoss Enterprise SOA Platform 4
Classification: JBoss
Component: Documentation, JBossESB, JBossWS, Examples
Version: 4.3 GA,4.3 CP01
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 4.3 CP02
Assignee: Julian Coleman
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-27 13:56 UTC by Lukáš Petrovický
Modified: 2009-09-04 13:20 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-04 13:20:01 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 778511 0 urgent CLOSED JBossWS Native on JDK 6 requires jaxrpc, jaxws, jaxb and saaj to be installed in jboss-as/lib/endorsed/ 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker SOA-1255 0 None None None Never

Internal Links: 778511

Description Lukáš Petrovický 2009-03-27 13:56:27 UTC
Affects: Documentation (Ref Guide, User Guide, etc.), Release Notes
Date of First Response: 2009-03-27 10:03:07
project_key: SOA

The webservice_wsaddressing QS has been shown to not work under Sun JDK 1.6. We missed this in SOA-P 4.3 GA and it still occurs on 4.3 CP01 CR5. "ant runtest" on the QS outputs:

...
runtest:
     [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:308)
     [java] 	at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:246)
     [java] 	at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:164)
     [java] 	at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
     [java] 	at $Proxy6.addItem(Unknown Source)
     [java] 	at org.jboss.soa.esb.samples.quickstart.webservicewsa.client.WSAClient.main(WSAClient.java:48)
     [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:68)
     [java] 	at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:161)
     [java] 	at org.jboss.ws.core.CommonSOAP11Binding.createMessage(CommonSOAP11Binding.java:59)
     [java] 	at org.jboss.ws.core.CommonSOAPBinding.bindRequestMessage(CommonSOAPBinding.java:156)
     [java] 	at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:289)
     [java] 	at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:234)
     [java] 	... 4 more
...

Please note that the JDK6 workaround with copying JARs as suggested in SOA-984 makes no difference in this case.

Affected quickstarts are at least:
- webservice_wsaddressing
- webservice_wssecurity

Comment 1 Lukáš Petrovický 2009-03-27 13:57:04 UTC
Link: Added: This issue is related to SOA-984


Comment 2 Len DiMaggio 2009-03-27 14:03:07 UTC
Added 4.3 CP01 to affects field
Reset fixed in field

Comment 3 Len DiMaggio 2009-03-30 13:33:12 UTC
The full set of failing quickstarts are:  

webservice_mtom
webservice_wsaddressing
webservice_wssecurity


Comment 4 Len DiMaggio 2009-03-31 01:36:39 UTC
Link: Added: This issue depends JBWS-1439


Comment 5 Len DiMaggio 2009-03-31 14:46:23 UTC
Seeing this with how JBoss and the 1.6 Sun JDK react to jar files in the JBoss lib/endorsed dir and the $JAVA_HOME/jre/lib/endorsed dir

The only way I was able to run the webservice_wsaddressing quickstart was by copying the contents of /opt/43_CP01_CR5/jboss-soa-p.4.3.0/jboss-as/lib/endorsed into $JAVA_HOME/jre/lib/endorsed

jboss-jaxrpc.jar
jboss-jaxws.jar
jboss-saaj.jar
serializer.jar
xalan.jar
xercesImpl.jar

the same result if I add these jars to the JBoss client dir - and remove them from $JAVA_HOME/jre/lib/endorsed - but - it still needs jboss-jaxrpc.jar  jboss-jaxws.jar  jboss-saaj.jar in $JAVA_HOME/jre/lib/endorsed




Comment 6 Len DiMaggio 2009-03-31 16:00:18 UTC
The WS unit test suite relies on this setting in the junit tag in the ant build.xml: <sysproperty key="java.endorsed.dirs" value="${endorsed.dirs}"/>

Making a similar change to the quickstarts' (webservice_mtom, webservice_wsaddressing, webservice_wssecurity) build.xml files resolves the problem of these (3) quickstarts failing - see modified build.xml from webservice_wsaddressing quickstart below:

-------------------------------------

<project name="Quickstart_webservice_wsa" default="deploy" basedir=".">

        <description> 
                ${ant.project.name}
                ${line.separator}
        </description>

        <!-- Import the base Ant build script... -->
        <import file="../conf/base-build.xml"/>

    <target name="quickstart-specific-checks" depends="assert-ws-available,assert-jbossremoting-version"/>

    <target name="quickstart-specific-dependencies">
        <path id="quickstart-dependencies-classpath">
            <fileset dir="${org.jboss.esb.server.home}/client" includes="jbossws-client.jar,jboss-remoting.jar" />
        </path>
    </target>

    <target name="quickstart-specific-assemblies">
        <!-- Overriden from the target of the same name in base-build.xml. -->
        <!-- Called by the "deploy" target.  Don't call directly!! -->

        <!-- Build the webservice... -->
        <war warfile="build/${ant.project.name}.war"
             webxml="${basedir}/war/resources/WEB-INF/web.xml">
            <fileset dir="${basedir}/war/view">
                <include name="**/*"/>
            </fileset>
        </war>
    </target>

    <target name="runtest" depends="compile" description="runs test JMS Sender">
        <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.webservicewsa.client.WSAClient" failonerror="true">
                <classpath refid="exec-classpath"/>
                <sysproperty key="java.endorsed.dirs" value="${org.jboss.esb.server.home}/lib/endorsed"/>  
        </java>

    </target>

</project>

-------------------------------------

Comment 7 Jehudi Castro Sierra 2009-03-31 19:05:55 UTC
same error for webservice_proxy

Comment 8 Jehudi Castro Sierra 2009-04-01 08:14:01 UTC
webservice_producer too!

Comment 9 Lukáš Petrovický 2009-04-01 09:11:36 UTC
It's now fixed in the QE test suoite with the sysproperty workaround test so the WS* quickstart tests now pass. 

Comment 10 Len DiMaggio 2009-04-01 12:40:38 UTC
This change needs to be noted in the release notes for CP01 - the quickstarts' build.xml files should be modified in the next CP.



Comment 11 Len DiMaggio 2009-04-01 12:41:21 UTC
Affects: Added: [Documentation (Ref Guide, User Guide, etc.), Release Notes]


Comment 12 Jehudi Castro Sierra 2009-04-01 14:48:09 UTC
webservice_bpel is showing the same issue, that's all I guess

Comment 13 Dana Mison 2009-04-15 04:19:34 UTC
Added as known issue to 4.3.CP01 release notes:

Some Quickstarts are not working with JDK 6</title>

The following Quickstarts do not currently run correctly with JDK 1.6
webservice_mtom
webservice_wsaddressing
webservice_wssecurity
webservice_bpel
            
Additional information: https://jira.jboss.org/jira/browse/SOA-1255

Comment 14 Lukáš Petrovický 2009-04-15 05:26:15 UTC
I would much more like it to see in release notes something along these lines:

"Some WS-related functionality does not work correctly, until the following workaround is applied." And then mention the system property that needs to be set. (java.endorsed.dirs to "${org.jboss.esb.server.home}/lib/endorsed").

Len, what do you think of the wording?

Comment 15 Dana Mison 2009-04-15 10:34:27 UTC
You're right.   Updated with:

This can be worked around by setting the java.endorsed.dirs property for the runtest target to 
${org.jboss.esb.server.home}/lib/endorsed. This is done in each Quickstart's build.xml 
file as demonstrated below:

<target name="runtest" depends="compile" 
    description="runs test JMS Sender"> 
  <java fork="yes" classname= 
      "org.jboss.soa.esb.samples.quickstart.webservicewsa.client.WSAClient" 
      failonerror="true"> 
      <classpath refid="exec-classpath"/> 
      <sysproperty key="java.endorsed.dirs" 
          value="${org.jboss.esb.server.home}/lib/endorsed"/> 
  </java> 
</target> 


Comment 16 Lukáš Petrovický 2009-04-15 10:38:39 UTC
It's fine with me now.

Comment 17 Dana Mison 2009-06-26 02:31:09 UTC
This was actually included in the 4.3.CP01 release notes at the time.

Comment 18 Dana Mison 2009-06-26 02:34:20 UTC
need to verify that this is a documentation only issue or if other work was being done in relation to it

Comment 19 nwallace 2009-07-15 08:30:14 UTC
Files have been added to match what esb have in their endorsed dir 

Comment 20 Dana Mison 2009-08-10 06:15:00 UTC
removed old known issue & added this as resolved to the 4.3.CP02 release notes:

SOA-1255 - Some of the webservice related quickstarts did not function correctly with JDK 1.6.  This has been resolved by the inclusion of the JARs jboss-jaxrpc.jar,jboss-jaxws.jar andjboss-saaj.jar in ${SOA_ROOT}/jboss-as/lib/endorsed/.

Comment 21 Lukáš Petrovický 2009-08-19 11:31:45 UTC
As Len noted above, the quickstarts won't run, unless the java.endorsed.dirs property is set, see below an excerpt from webservice_wsaddressing's build.xml:

<target name="runtest" depends="compile" description="runs test JMS Sender">
        <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.webservicewsa.client.WSAClient" failonerror="true">
                <classpath refid="exec-classpath"/>
                <sysproperty key="java.endorsed.dirs" value="${org.jboss.esb.server.home}/lib/endorsed"/>
                <!-- ^^^^^^^^ -->
        </java>

    </target> 

Comment 22 Julian Coleman 2009-08-21 12:40:56 UTC
Fixed with revision 29012 of:
  product/samples/quickstarts/webservice_consumer_wise2/build.xml
  product/samples/quickstarts/webservice_consumer_wise3/build.xml
  product/samples/quickstarts/webservice_consumer_wise4/build.xml
  product/samples/quickstarts/webservice_consumer1/build.xml
  product/samples/quickstarts/webservice_consumer2/build.xml
  product/samples/quickstarts/webservice_wsaddressing/build.xml
  product/samples/quickstarts/webservice_consumer_wise/build.xml
  product/samples/quickstarts/webservice_mtom/build.xml
  product/samples/quickstarts/webservice_wssecurity/build.xml
  product/samples/quickstarts/webservice_producer/build.xml

(ESB branches/JBESB_4_4_GA_CP),
and revision 3641 (4.3 branch) of:
  build-tools/resource/quickstarts/embedded/helloworld_ejb3_ws_wss/build.xml
  build-tools/resource/quickstarts/embedded/helloworld_ejb3_ws/build.xml

Commit message:
  SOA-1255
  Add a sysproperty, so that these will run with JDK6.


Comment 23 Boris Belovic 2009-09-04 13:20:01 UTC
Verified on 4.3CP02_CR3


Note You need to log in before you can comment on or make changes to this bug.