You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Aaron Mulder <am...@alumni.princeton.edu> on 2008/12/04 20:35:00 UTC

JAX-WS services in WebLogic 10

So I have a Spring-and-CXF app that works fine in Jetty.  The Web
Services in the app are done using a <jaxws:endpoint> element in the
Spring config file.

When I deploy this in WebLogic 10, it blows up.  Apparently WebLogic
finds the beans with the JAX-WS annotations, and tries to deploy them
as Web Services itself -- before CXF is ever involved.  This blows up
because it uses the Sun RI that expects some generated code that CXF
does not require.

Has anyone seen this before?  Any ideas for how I can convince
WebLogic to ignore the JAX-WS services so that CXF will be the only
thing that handles them?

Thanks,
      Aaron

Re: JAX-WS services in WebLogic 10

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
Outstanding!  That did it!

Thanks much,
     Aaron

On Thu, Dec 4, 2008 at 4:49 PM, Johnbosco, Lawrence
<la...@eds.com> wrote:
> Aaron,
>
> I think, you need to add the following entries in your weblogic startup script..
>
> -Djavax.xml.soap.MessageFactory=com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl -Djavax.xml.soap.SOAPConnectionFactory=weblogic.wsee.saaj.SOAPConnectionFactoryImpl
>
> ________________________________
>
> From: ammulder@gmail.com on behalf of Aaron Mulder
> Sent: Thu 12/4/2008 3:57 PM
> To: users@cxf.apache.org
> Subject: Re: JAX-WS services in WebLogic 10
>
>
>
> Well, what I've done is basically what that page outlines, as far as
> setting up the paths where it should prefer the app versions instead
> of the server versions of various libraries.  The problem I'm having
> seems to be slightly different -- as far as I can tell it's getting
> the right version of the javax.xml.soap API, but the wrong default
> implementation.  I'm not sure how to correct that -- the settings on
> the page you mentioned apply to XML parsers, but not SOAP factories.
> If someone knows what META-INF file to whack or something I could try
> that.
>
> Caused by: javax.xml.soap.SOAPException: Unable to create message
> factory for SOAP: weblogic.webservice.core.soap.MessageFactoryImpl
>       at javax.xml.soap.MessageFactory.newInstance(Unknown Source)
>
> Thanks,
>      Aaron
>
> On Thu, Dec 4, 2008 at 3:30 PM, Nepali, Sonam (GE Healthcare,
> consultant) <So...@ge.com> wrote:
>> If you are trying to do CXF with JMS transport in weblogic, then there
>> is a documentation on
>> http://cwiki.apache.org/CXF20DOC/appserverguide.html that gives you a
>> better clue.  How does your code look like?
>>
>> Thanks
>>
>> Sonam Nepali
>>
>>
>> -----Original Message-----
>> From: ammulder@gmail.com [mailto:ammulder@gmail.com] On Behalf Of Aaron
>> Mulder
>> Sent: Thursday, December 04, 2008 1:21 PM
>> To: Nepali, Sonam (GE Healthcare, consultant)
>> Cc: users@cxf.apache.org
>> Subject: Re: JAX-WS services in WebLogic 10
>>
>> OK, so I found a blog post about wrapping the WAR with an EAR and
>> putting various excludes in the Weblogic DD.  That got my app deploying.
>> However, when I try to invoke a service at runtime, I get
>> this:
>>
>> ...
>> Caused by: javax.xml.soap.SOAPException: Unable to create message
>> factory for SOAP: weblogic.webservice.core.soap.MessageFactoryImpl
>>        at javax.xml.soap.MessageFactory.newInstance(Unknown Source)
>>        at
>> org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor.handleMessage(SAAJOu
>> tInterceptor.java:80)
>>        ... 29 more
>>
>> It looks like even if I force the app to use the latest spec JARs and
>> things, the WebLogic SOAP implementation is being used as default
>> instead of whatever CXF would prefer.  Any idea how I can avoid this?
>> Putting in a prefer package line for javax.xml.soap.* wasn't enough.
>>
>> Thanks,
>>       Aaron
>>
>> On Thu, Dec 4, 2008 at 2:42 PM, Nepali, Sonam (GE Healthcare,
>> consultant) <So...@ge.com> wrote:
>>> In Weblogic you may need to add the information about packages that
>>> need to be used from your project versus out of the weblogic library
>> jars.
>>> It is done by adding the info in the application deplyoment descriptor
>>
>>> file.  I think weblogic jars are perhaps being used instead of your
>>> cxf jars.
>>>
>>> thanks
>>>
>>> Sonam Nepali
>>>
>>>
>>> -----Original Message-----
>>> From: ammulder@gmail.com [mailto:ammulder@gmail.com] On Behalf Of
>>> Aaron Mulder
>>> Sent: Thursday, December 04, 2008 12:35 PM
>>> To: users@cxf.apache.org
>>> Subject: JAX-WS services in WebLogic 10
>>>
>>> So I have a Spring-and-CXF app that works fine in Jetty.  The Web
>>> Services in the app are done using a <jaxws:endpoint> element in the
>>> Spring config file.
>>>
>>> When I deploy this in WebLogic 10, it blows up.  Apparently WebLogic
>>> finds the beans with the JAX-WS annotations, and tries to deploy them
>>> as Web Services itself -- before CXF is ever involved.  This blows up
>>> because it uses the Sun RI that expects some generated code that CXF
>>> does not require.
>>>
>>> Has anyone seen this before?  Any ideas for how I can convince
>>> WebLogic to ignore the JAX-WS services so that CXF will be the only
>>> thing that handles them?
>>>
>>> Thanks,
>>>      Aaron
>>>
>>
>
>
>

RE: JAX-WS services in WebLogic 10

Posted by "Johnbosco, Lawrence" <la...@eds.com>.
Aaron,
 
I think, you need to add the following entries in your weblogic startup script..
 
-Djavax.xml.soap.MessageFactory=com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl -Djavax.xml.soap.SOAPConnectionFactory=weblogic.wsee.saaj.SOAPConnectionFactoryImpl

________________________________

From: ammulder@gmail.com on behalf of Aaron Mulder
Sent: Thu 12/4/2008 3:57 PM
To: users@cxf.apache.org
Subject: Re: JAX-WS services in WebLogic 10



Well, what I've done is basically what that page outlines, as far as
setting up the paths where it should prefer the app versions instead
of the server versions of various libraries.  The problem I'm having
seems to be slightly different -- as far as I can tell it's getting
the right version of the javax.xml.soap API, but the wrong default
implementation.  I'm not sure how to correct that -- the settings on
the page you mentioned apply to XML parsers, but not SOAP factories.
If someone knows what META-INF file to whack or something I could try
that.

Caused by: javax.xml.soap.SOAPException: Unable to create message
factory for SOAP: weblogic.webservice.core.soap.MessageFactoryImpl
       at javax.xml.soap.MessageFactory.newInstance(Unknown Source)

Thanks,
      Aaron

On Thu, Dec 4, 2008 at 3:30 PM, Nepali, Sonam (GE Healthcare,
consultant) <So...@ge.com> wrote:
> If you are trying to do CXF with JMS transport in weblogic, then there
> is a documentation on
> http://cwiki.apache.org/CXF20DOC/appserverguide.html that gives you a
> better clue.  How does your code look like?
>
> Thanks
>
> Sonam Nepali
>
>
> -----Original Message-----
> From: ammulder@gmail.com [mailto:ammulder@gmail.com] On Behalf Of Aaron
> Mulder
> Sent: Thursday, December 04, 2008 1:21 PM
> To: Nepali, Sonam (GE Healthcare, consultant)
> Cc: users@cxf.apache.org
> Subject: Re: JAX-WS services in WebLogic 10
>
> OK, so I found a blog post about wrapping the WAR with an EAR and
> putting various excludes in the Weblogic DD.  That got my app deploying.
> However, when I try to invoke a service at runtime, I get
> this:
>
> ...
> Caused by: javax.xml.soap.SOAPException: Unable to create message
> factory for SOAP: weblogic.webservice.core.soap.MessageFactoryImpl
>        at javax.xml.soap.MessageFactory.newInstance(Unknown Source)
>        at
> org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor.handleMessage(SAAJOu
> tInterceptor.java:80)
>        ... 29 more
>
> It looks like even if I force the app to use the latest spec JARs and
> things, the WebLogic SOAP implementation is being used as default
> instead of whatever CXF would prefer.  Any idea how I can avoid this?
> Putting in a prefer package line for javax.xml.soap.* wasn't enough.
>
> Thanks,
>       Aaron
>
> On Thu, Dec 4, 2008 at 2:42 PM, Nepali, Sonam (GE Healthcare,
> consultant) <So...@ge.com> wrote:
>> In Weblogic you may need to add the information about packages that
>> need to be used from your project versus out of the weblogic library
> jars.
>> It is done by adding the info in the application deplyoment descriptor
>
>> file.  I think weblogic jars are perhaps being used instead of your
>> cxf jars.
>>
>> thanks
>>
>> Sonam Nepali
>>
>>
>> -----Original Message-----
>> From: ammulder@gmail.com [mailto:ammulder@gmail.com] On Behalf Of
>> Aaron Mulder
>> Sent: Thursday, December 04, 2008 12:35 PM
>> To: users@cxf.apache.org
>> Subject: JAX-WS services in WebLogic 10
>>
>> So I have a Spring-and-CXF app that works fine in Jetty.  The Web
>> Services in the app are done using a <jaxws:endpoint> element in the
>> Spring config file.
>>
>> When I deploy this in WebLogic 10, it blows up.  Apparently WebLogic
>> finds the beans with the JAX-WS annotations, and tries to deploy them
>> as Web Services itself -- before CXF is ever involved.  This blows up
>> because it uses the Sun RI that expects some generated code that CXF
>> does not require.
>>
>> Has anyone seen this before?  Any ideas for how I can convince
>> WebLogic to ignore the JAX-WS services so that CXF will be the only
>> thing that handles them?
>>
>> Thanks,
>>      Aaron
>>
>



Re: JAX-WS services in WebLogic 10

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
Well, what I've done is basically what that page outlines, as far as
setting up the paths where it should prefer the app versions instead
of the server versions of various libraries.  The problem I'm having
seems to be slightly different -- as far as I can tell it's getting
the right version of the javax.xml.soap API, but the wrong default
implementation.  I'm not sure how to correct that -- the settings on
the page you mentioned apply to XML parsers, but not SOAP factories.
If someone knows what META-INF file to whack or something I could try
that.

Caused by: javax.xml.soap.SOAPException: Unable to create message
factory for SOAP: weblogic.webservice.core.soap.MessageFactoryImpl
       at javax.xml.soap.MessageFactory.newInstance(Unknown Source)

Thanks,
      Aaron

On Thu, Dec 4, 2008 at 3:30 PM, Nepali, Sonam (GE Healthcare,
consultant) <So...@ge.com> wrote:
> If you are trying to do CXF with JMS transport in weblogic, then there
> is a documentation on
> http://cwiki.apache.org/CXF20DOC/appserverguide.html that gives you a
> better clue.  How does your code look like?
>
> Thanks
>
> Sonam Nepali
>
>
> -----Original Message-----
> From: ammulder@gmail.com [mailto:ammulder@gmail.com] On Behalf Of Aaron
> Mulder
> Sent: Thursday, December 04, 2008 1:21 PM
> To: Nepali, Sonam (GE Healthcare, consultant)
> Cc: users@cxf.apache.org
> Subject: Re: JAX-WS services in WebLogic 10
>
> OK, so I found a blog post about wrapping the WAR with an EAR and
> putting various excludes in the Weblogic DD.  That got my app deploying.
> However, when I try to invoke a service at runtime, I get
> this:
>
> ...
> Caused by: javax.xml.soap.SOAPException: Unable to create message
> factory for SOAP: weblogic.webservice.core.soap.MessageFactoryImpl
>        at javax.xml.soap.MessageFactory.newInstance(Unknown Source)
>        at
> org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor.handleMessage(SAAJOu
> tInterceptor.java:80)
>        ... 29 more
>
> It looks like even if I force the app to use the latest spec JARs and
> things, the WebLogic SOAP implementation is being used as default
> instead of whatever CXF would prefer.  Any idea how I can avoid this?
> Putting in a prefer package line for javax.xml.soap.* wasn't enough.
>
> Thanks,
>       Aaron
>
> On Thu, Dec 4, 2008 at 2:42 PM, Nepali, Sonam (GE Healthcare,
> consultant) <So...@ge.com> wrote:
>> In Weblogic you may need to add the information about packages that
>> need to be used from your project versus out of the weblogic library
> jars.
>> It is done by adding the info in the application deplyoment descriptor
>
>> file.  I think weblogic jars are perhaps being used instead of your
>> cxf jars.
>>
>> thanks
>>
>> Sonam Nepali
>>
>>
>> -----Original Message-----
>> From: ammulder@gmail.com [mailto:ammulder@gmail.com] On Behalf Of
>> Aaron Mulder
>> Sent: Thursday, December 04, 2008 12:35 PM
>> To: users@cxf.apache.org
>> Subject: JAX-WS services in WebLogic 10
>>
>> So I have a Spring-and-CXF app that works fine in Jetty.  The Web
>> Services in the app are done using a <jaxws:endpoint> element in the
>> Spring config file.
>>
>> When I deploy this in WebLogic 10, it blows up.  Apparently WebLogic
>> finds the beans with the JAX-WS annotations, and tries to deploy them
>> as Web Services itself -- before CXF is ever involved.  This blows up
>> because it uses the Sun RI that expects some generated code that CXF
>> does not require.
>>
>> Has anyone seen this before?  Any ideas for how I can convince
>> WebLogic to ignore the JAX-WS services so that CXF will be the only
>> thing that handles them?
>>
>> Thanks,
>>      Aaron
>>
>

RE: JAX-WS services in WebLogic 10

Posted by "Nepali, Sonam (GE Healthcare, consultant)" <So...@ge.com>.
If you are trying to do CXF with JMS transport in weblogic, then there
is a documentation on
http://cwiki.apache.org/CXF20DOC/appserverguide.html that gives you a
better clue.  How does your code look like?

Thanks

Sonam Nepali
 

-----Original Message-----
From: ammulder@gmail.com [mailto:ammulder@gmail.com] On Behalf Of Aaron
Mulder
Sent: Thursday, December 04, 2008 1:21 PM
To: Nepali, Sonam (GE Healthcare, consultant)
Cc: users@cxf.apache.org
Subject: Re: JAX-WS services in WebLogic 10

OK, so I found a blog post about wrapping the WAR with an EAR and
putting various excludes in the Weblogic DD.  That got my app deploying.
However, when I try to invoke a service at runtime, I get
this:

...
Caused by: javax.xml.soap.SOAPException: Unable to create message
factory for SOAP: weblogic.webservice.core.soap.MessageFactoryImpl
        at javax.xml.soap.MessageFactory.newInstance(Unknown Source)
        at
org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor.handleMessage(SAAJOu
tInterceptor.java:80)
        ... 29 more

It looks like even if I force the app to use the latest spec JARs and
things, the WebLogic SOAP implementation is being used as default
instead of whatever CXF would prefer.  Any idea how I can avoid this?
Putting in a prefer package line for javax.xml.soap.* wasn't enough.

Thanks,
       Aaron

On Thu, Dec 4, 2008 at 2:42 PM, Nepali, Sonam (GE Healthcare,
consultant) <So...@ge.com> wrote:
> In Weblogic you may need to add the information about packages that 
> need to be used from your project versus out of the weblogic library
jars.
> It is done by adding the info in the application deplyoment descriptor

> file.  I think weblogic jars are perhaps being used instead of your 
> cxf jars.
>
> thanks
>
> Sonam Nepali
>
>
> -----Original Message-----
> From: ammulder@gmail.com [mailto:ammulder@gmail.com] On Behalf Of 
> Aaron Mulder
> Sent: Thursday, December 04, 2008 12:35 PM
> To: users@cxf.apache.org
> Subject: JAX-WS services in WebLogic 10
>
> So I have a Spring-and-CXF app that works fine in Jetty.  The Web 
> Services in the app are done using a <jaxws:endpoint> element in the 
> Spring config file.
>
> When I deploy this in WebLogic 10, it blows up.  Apparently WebLogic 
> finds the beans with the JAX-WS annotations, and tries to deploy them 
> as Web Services itself -- before CXF is ever involved.  This blows up 
> because it uses the Sun RI that expects some generated code that CXF 
> does not require.
>
> Has anyone seen this before?  Any ideas for how I can convince 
> WebLogic to ignore the JAX-WS services so that CXF will be the only 
> thing that handles them?
>
> Thanks,
>      Aaron
>

Re: JAX-WS services in WebLogic 10

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
OK, so I found a blog post about wrapping the WAR with an EAR and
putting various excludes in the Weblogic DD.  That got my app
deploying.  However, when I try to invoke a service at runtime, I get
this:

...
Caused by: javax.xml.soap.SOAPException: Unable to create message
factory for SOAP: weblogic.webservice.core.soap.MessageFactoryImpl
        at javax.xml.soap.MessageFactory.newInstance(Unknown Source)
        at org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor.handleMessage(SAAJOutInterceptor.java:80)
        ... 29 more

It looks like even if I force the app to use the latest spec JARs and
things, the WebLogic SOAP implementation is being used as default
instead of whatever CXF would prefer.  Any idea how I can avoid this?
Putting in a prefer package line for javax.xml.soap.* wasn't enough.

Thanks,
       Aaron

On Thu, Dec 4, 2008 at 2:42 PM, Nepali, Sonam (GE Healthcare,
consultant) <So...@ge.com> wrote:
> In Weblogic you may need to add the information about packages that need
> to be used from your project versus out of the weblogic library jars.
> It is done by adding the info in the application deplyoment descriptor
> file.  I think weblogic jars are perhaps being used instead of your cxf
> jars.
>
> thanks
>
> Sonam Nepali
>
>
> -----Original Message-----
> From: ammulder@gmail.com [mailto:ammulder@gmail.com] On Behalf Of Aaron
> Mulder
> Sent: Thursday, December 04, 2008 12:35 PM
> To: users@cxf.apache.org
> Subject: JAX-WS services in WebLogic 10
>
> So I have a Spring-and-CXF app that works fine in Jetty.  The Web
> Services in the app are done using a <jaxws:endpoint> element in the
> Spring config file.
>
> When I deploy this in WebLogic 10, it blows up.  Apparently WebLogic
> finds the beans with the JAX-WS annotations, and tries to deploy them as
> Web Services itself -- before CXF is ever involved.  This blows up
> because it uses the Sun RI that expects some generated code that CXF
> does not require.
>
> Has anyone seen this before?  Any ideas for how I can convince WebLogic
> to ignore the JAX-WS services so that CXF will be the only thing that
> handles them?
>
> Thanks,
>      Aaron
>

RE: JAX-WS services in WebLogic 10

Posted by "Nepali, Sonam (GE Healthcare, consultant)" <So...@ge.com>.
In Weblogic you may need to add the information about packages that need
to be used from your project versus out of the weblogic library jars.
It is done by adding the info in the application deplyoment descriptor
file.  I think weblogic jars are perhaps being used instead of your cxf
jars.

thanks

Sonam Nepali
 

-----Original Message-----
From: ammulder@gmail.com [mailto:ammulder@gmail.com] On Behalf Of Aaron
Mulder
Sent: Thursday, December 04, 2008 12:35 PM
To: users@cxf.apache.org
Subject: JAX-WS services in WebLogic 10

So I have a Spring-and-CXF app that works fine in Jetty.  The Web
Services in the app are done using a <jaxws:endpoint> element in the
Spring config file.

When I deploy this in WebLogic 10, it blows up.  Apparently WebLogic
finds the beans with the JAX-WS annotations, and tries to deploy them as
Web Services itself -- before CXF is ever involved.  This blows up
because it uses the Sun RI that expects some generated code that CXF
does not require.

Has anyone seen this before?  Any ideas for how I can convince WebLogic
to ignore the JAX-WS services so that CXF will be the only thing that
handles them?

Thanks,
      Aaron