This commit is contained in:
Arjen Poutsma
2007-04-26 14:49:32 +00:00
parent 3462c23e0e
commit 58301d32a2

View File

@@ -80,9 +80,7 @@
</tr>
<tr>
<td>BEA WebLogic 9</td>
<td>1.1/1.2
<sup>*</sup>
</td>
<td>1.1/1.2 <sup>*</sup></td>
</tr>
<tr>
<td>IBM WebSphere 6</td>
@@ -94,30 +92,25 @@
</tr>
</tbody>
</table>
<p>* = See
<a href="#saaj-weblogic9">below</a>
.
</p>
<p>* = See <a href="#saaj-weblogic9">below</a>.</p>
<p>Additionally, Java SE 6 includes SAAJ 1.3.</p>
</answer>
</faq>
<faq id="saaj-nosuchmethod">
<question>I get an
<tt>NoSuchMethodError</tt>
when using SAAJ. What can I do about it?
<question>I get an <tt>NoSuchMethodError</tt> when using SAAJ. What can I do about it?
</question>
<answer>
<p>If you get the following stack trace:</p>
<pre>
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'org.springframework.ws.soap.saaj.SaajSoapMessageFactory'
defined in ServletContext resource [/WEB-INF/springws-servlet.xml]:
Invocation of init method failed;
nested exception is java.lang.NoSuchMethodError:
javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
Caused by:
java.lang.NoSuchMethodError:
javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'org.springframework.ws.soap.saaj.SaajSoapMessageFactory'
defined in ServletContext resource [/WEB-INF/springws-servlet.xml]:
Invocation of init method failed;
nested exception is java.lang.NoSuchMethodError:
javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
Caused by:
java.lang.NoSuchMethodError:
javax.xml.soap.MessageFactory.newInstance(Ljava/lang/String;)Ljavax/xml/soap/MessageFactory;
</pre>
<p>
Like most J2EE libraries, SAAJ consists of two parts: the API that consists of interfaces (
@@ -138,26 +131,16 @@
</faq>
<faq id="saaj-weblogic9">
<question>
I get a
<tt>UnsupportedOperationException</tt>
"This class does not support SAAJ 1.1" when I use SAAJ
I get a <tt>UnsupportedOperationException</tt> "This class does not support SAAJ 1.1" when I use SAAJ
under WebLogic 9. What can I do about it?
</question>
<answer>
<p>
Weblogic 9 has a known bug in the SAAJ 1.2 implementation: it implement all the 1.2 interfaces,
but throws
<tt>UnsupportedOperationExceptions</tt>
when you call them.
Confusingly, the exception message is
<tt>This class does not support SAAJ 1.1</tt>
, even though
supports SAAJ 1.1 just fine; it just doesn't support SAAJ
<strong>1.2</strong>
.
See also
<a href="http://forums.bea.com/bea/thread.jspa?threadID=600007964">this BEA forum post</a>
.
but throws <tt>UnsupportedOperationExceptions</tt> when you call them.
Confusingly, the exception message is <tt>This class does not support SAAJ 1.1</tt>, even though
supports SAAJ 1.1 just fine; it just doesn't support SAAJ <strong>1.2</strong>.
See also <a href="http://forums.bea.com/bea/thread.jspa?threadID=600007964">this BEA forum post</a>.
</p>
<p>
Spring-WS has a workaround for this, we basically use SAAJ 1.1 only when dealing with Weblogic 9.
@@ -168,11 +151,11 @@
The solution is to not use BEA's version of SAAJ, but to use another implementation, like the one
from Axis 1, or SUN. In you application context, use the following:
<pre>
&lt;bean id=&quot;messageFactory&quot; class=&quot;org.springframework.ws.soap.saaj.SaajSoapMessageFactory&quot;&gt;
&lt;property name=&quot;messageFactory&quot;&gt;
&lt;bean class=&quot;com.sun.xml.messaging.saaj.soap.MessageFactoryImpl&quot;/&gt;
&lt;/bean&gt;
</pre>
&lt;bean id=&quot;messageFactory&quot; class=&quot;org.springframework.ws.soap.saaj.SaajSoapMessageFactory&quot;&gt;
&lt;property name=&quot;messageFactory&quot;&gt;
&lt;bean class=&quot;com.sun.xml.messaging.saaj.soap.MessageFactoryImpl&quot;/&gt;
&lt;/bean&gt;
</pre>
</p>
</answer>
</faq>