Skip to main content
Software View

Main navigation

  • Home
  • Trainer Profile
  • Blog
  • Contact
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Blog

JAX-WS Web services in JBoss 5 do not work (JDK 1.6, Eclipse IDE)?

By Kamal Wickramanayake, 12 June, 2010

Environment: JDK 1.6, JBoss 5.1, Eclipse 3.5 (Galileo)

I came across the following JBoss error when a JAX-WS Web service was accessed:

11:15:18,008 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
    at javax.xml.soap.SOAPMessage.setProperty(SOAPMessage.java:441)
    at org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:87)

This happens when you start JBoss from Eclipse. If you start JBoss by running the run.sh (or run.bat in Windows), the error does not appear.

The root cause is a jar file conflict. When you start JBoss via run.sh, JVM uses the correct jar files provided with JBoss. But if you start JBoss via Eclipse, JVM does not use the JBoss bundled updated jars but uses the old ones available with JDK. As a developer, you may prefer to start JBoss via Eclipse during development. Here's how you do it:

  1. In Eclipse, access the "Servers" view.
  2. Double click on JBoss server ("JBoss v5.0 at localhost"). The settings editor opens.
  3. Double click on the "Open launch configuration" link found under "General Information". The launcher configuration editor opens.
  4. Go to the "Arguments" tab. Your VM arguments might look like the following:
    "-Dprogram.name=run.bat -Xms128m -Xmx512m  -XX:MaxPermSize=256m"
  5. Append the following to the above line after keeping a space (Note that you need to use the correct directory name where you have installed JBoss inside which you find the lib/endorsed directory):
    " -Djava.endorsed.dirs=/home/kamal/programs/jboss-5.1.0.GA/lib/endorsed"
  6. Save everything and start the JBoss server.

The VM argument -Djava.endorsed.dirs informs the JVM to use the "Endorsed Standards" or "Standalone Technologies" libraries from the specified directory instead of the ones bundled with JDK. "Endorsed Standards" libraries come from standards that are developed outside JCP (Java Community Process - the general Java evolution process). "Standalone Technologies" also evolve separately. Hence there is a chance that they release new versions of their libraries before a new version of the Java platform is released. The -Djava.endorsed.dirs allows you to use the newer versions of the libraries. Another approach is to copy the new libraries to jre/lib/endorsed directory (found inside Java installation directory). JVM then uses the new versions of  Endorsed Standards or Standalone Technologies libraries instead of the old versions. More on this is found in Java Endorsed Standards Override Mechanism. In the bottom of that page you see that some JAX-WS related jars come from Endorsed Standards.

Java
Web Services

Highlights

  • O'Reilly Book "97 Things Every Software Architect Should Know" Accepts A Write Up From Kamal
  • "Service Oriented Architecture - Making IT Infrastructure Speaks Business" - Presentation At The ISACA 4th Annual Conference
  • The Second Bacth Of ICTA Nanasala e-Society Members Receives Trainings On HTML/CSS and GIMP
  • GIMP Training For ICTA Nanasala Project
  • Agile Processes Training For PPSL (Pvt) Ltd
  • Computer Society of Sri Lanka (CSSL) - Talk on "Introduction to IT Governance and Enterprise Architecture"
  • Motorola Sends A Second Batch Through Software Patterns Training
  • Kamal To Act As The Marketing Director - ISACA Sri Lanka Chapter
  • ISACA Sri Lanka Chapter Invites Kamal To Join As A Board Member
  • Epic Lanka Technologies (Pvt) Ltd Receives Java SE And Java EE Trainings From Software View
  • Patterns Training For PPSL (Pvt) Ltd
  • ISACA Members Day Presentation On "Introduction To IT Governance And Enterprise Architecture"
  • Opening Lecture On Information Technology For SLIDA Master Of Public Management Course Delivered By Kamal
  • Customized Java Enterprise Edition Training For SLIDA
  • No One To Beat Software View - Epic Lanka Technologies (Pvt) Ltd
  • Motorola Receives Software Patterns Training From Software View
  • Custom Java Enterprise Edition Training for ICTA/SLIDA - Only from Software View!
  • Java EE 5, JavaServer Faces, Hibernate And Spring For PPSL (Pvt) Ltd
  • "Brain Trust" For Linux Journal Weekly Newsletter From Kamal
  • Java Platform, Enterprise Edition 5 Training At The CEIT, University Of Peradeniya
  • Another Group Of Around 100 Sri Lanka Telecom Engineers And Managers Were Service Oriented!
  • Java Platform, Enterprise Edition 5 Training Will Be Held At The CEIT, University Of Peradeniya
  • Service Oriented Architecture: Another Two Sessions Conducted at SLT
  • Photos of IET Monthly Forum at the Peradeniya University
RSS feed
Copyright © 2007 - 2023 Software View