You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Tchang, Jeffrey (Genworth)" <Je...@genworth.com> on 2007/08/15 20:41:46 UTC

Deploying CXF to Weblogic 10.0

So I've been trying to get CXF to deploy to a BEA Weblogic 10.0 application 
server. However, I am running into a number of issues. Most of them have to do 
with the numerous JARs that come with CXF and conflicts with BEA (surprise 
surprise). I've opened up support tickets with BEA anyway to see if they can 
help.

The most successful I have been with deploying CXF is using the following 
options in weblogic-application.xml:

<prefer-application-packages>
  <package-name>javax.jws.*</package-name>
  <package-name>javax.xml.ws.*</package-name>
  <package-name>javax.net.ssl.*</package-name>
</prefer-application-packages>

However, these settings throw a

java.lang.NoClassDefFoundError: javax/net/ssl/HostnameVerifier at
org.apache.cxf.transport.http.AbstractHTTPTransportFactory.getConnectionFactory(AbstractHTTPTransportFactory.java:244).



I've tried these settings as well:

<prefer-application-packages>
  <package-name>javax.jws.*</package-name>
  <package-name>javax.xml.ws.*</package-name>
</prefer-application-packages>

but seem to get:

javax.xml.ws.soap.SOAPFaultException: weblogic.net.http.SOAPHttpsURLConnection
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:168)
	at $Proxy90.process(Unknown Source)
Caused by: java.lang.ClassCastException: 
weblogic.net.http.SOAPHttpsURLConnection at 
org.apache.cxf.transport.https.HttpsURLConnectionFactory.createConnection(HttpsURLConnectionFactory.java:120)

On BEA's community support site there is this tidbit:
http://forums.bea.com/bea/thread.jspa?messageID=600039577&tstart=0

"Hi, I am working with HTTPS SSL Connections and is facing the problem of 
having the url.openConnection() returning type 
weblogic.net.http.SOAPHttpsURLConnection rather than the normal 
HTTPSURLConnection. I have done quite a lot of research to reach this 
conclusion, and found out there is a work around for this:

URL url = new URL(null, "https://www.etrade.com", new 
com.sun.net.ssl.internal.www.protocol.https.Handler());
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();

I simulated it and it is returning: 
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl
I am not sure to how long I can depend on this work around. If anyone has an 
idea, please do tell me.

Looking at the CXF source code:

import javax.net.ssl.HttpsURLConnection;
public final class HttpsURLConnectionFactory

        HttpsURLConnection connection =
            (HttpsURLConnection) (proxy != null
                                   ? url.openConnection(proxy)
                                   : url.openConnection());

Do you guys think the way this is written is incorrect for cross 
compatibility? Also, I am a bit perplexed as to why when I decide to prefer 
javax.net.ssl.* I get of all things a NoClassDefFoundError. Any help kindly 
accepted. Thank you.


-Jeff 

[U] RE: RE: Deploying CXF to Weblogic 10.0

Posted by "Ridgway, Jamie Mr CONT USAAC" <JA...@USAAC.ARMY.MIL>.
UNCLASSIFIED////


No, just HTTP at this point. 

-----Original Message-----
From: Tchang, Jeffrey (Genworth) [mailto:Jeffrey.Tchang@genworth.com]
Sent: Thursday, August 16, 2007 10:00 AM
To: cxf-user@incubator.apache.org
Subject: RE: [U] RE: Deploying CXF to Weblogic 10.0

> I have 2.0-incubator working fine in Weblogic 9.2 using a JAX-WS 
> frontend.

Are you using HTTPS?

UNCLASSIFIED////

RE: [U] RE: Deploying CXF to Weblogic 10.0

Posted by "Tchang, Jeffrey (Genworth)" <Je...@genworth.com>.
> I have 2.0-incubator working fine in Weblogic 9.2 using a 
> JAX-WS frontend.

Are you using HTTPS?

[U] RE: Deploying CXF to Weblogic 10.0

Posted by "Ridgway, Jamie Mr CONT USAAC" <JA...@USAAC.ARMY.MIL>.
UNCLASSIFIED////


I have 2.0-incubator working fine in Weblogic 9.2 using a JAX-WS
frontend.

It's probably overkill but I have even more in my
prefer-application-packages.

Here's my weblogic-application.xml contents :

<?xml version="1.0" encoding="UTF-8"?>
  <weblogic-application xmlns="http://www.bea.com/ns/weblogic/90">
    <application-param>
      <param-name>webapp.encoding.default</param-name>
      <param-value>UTF-8</param-value>
    </application-param>
    <prefer-application-packages>
      <package-name>javax.jws.*</package-name>
      <package-name>org.apache.xerces.*</package-name>
      <package-name>com.ctc.wstx.*</package-name>
      <package-name>org.springframework.*</package-name>
    </prefer-application-packages>
</weblogic-application> 


I would have guessed 10.0 would be easier with builtin JAX-WS support.

-- Jamie

 
-----Original Message-----
From: Tchang, Jeffrey (Genworth) [mailto:Jeffrey.Tchang@genworth.com]
Sent: Wednesday, August 15, 2007 5:24 PM
To: cxf-user@incubator.apache.org
Subject: RE: Deploying CXF to Weblogic 10.0

> > So I've been trying to get CXF to deploy to a BEA Weblogic 10.0 
> > application server. However, I am running into a number of issues.
> > Most of them have to do with the numerous JARs that come
> with CXF and
> > conflicts with BEA (surprise surprise). I've opened up
> support tickets
> > with BEA anyway to see if they can help.
> > 
> 
> Pardon the non-answer, but what you're trying to do, could you get it 
> working on Tomcat, or are you using EJB's?  I would say normally BEA 
> comes in when you can get it working on Tomcat but not on Weblogic.
> Whether or not you can get it to work on Tomcat helps to separate the 
> problem as being BEA-specific (if you can) or CXF-specific (if you 
> can't).

I have not tried in Tomcat yet but it works locally without an
application server. The more general question I had was if anyone had
managed to get CXF working out of the box in a BEA Weblogic environment.


> > The most successful I have been with deploying CXF is using the 
> > following options in weblogic-application.xml:
> > 
> > <prefer-application-packages>
> >   <package-name>javax.jws.*</package-name>
> >   <package-name>javax.xml.ws.*</package-name>
> >   <package-name>javax.net.ssl.*</package-name>
> > </prefer-application-packages>
> > 
> > However, these settings throw a
> > 
> > java.lang.NoClassDefFoundError: javax/net/ssl/HostnameVerifier at
> > 
> org.apache.cxf.transport.http.AbstractHTTPTransportFactory.get
> ConnectionFactory(AbstractHTTPTransportFactory.java:244).
> 
> 
> I would check to see if you can enable classloader logging somewhere 
> in BEA--Oracle App server at least has that option.
>  It may tell you if it can't find certain required JARs.  You may find

> out that you are missing a JAR file not containing the class above, 
> but which has a class that HostnameVerifier can't load without.

Sounds like a good idea. I will double check how to enable classloader
logging in BEA. Thanks.

-Jeff

UNCLASSIFIED////

Re: Deploying CXF to Weblogic 10.0

Posted by Randy Burgess <RB...@nuvox.com>.
> From: "Tchang, Jeffrey (Genworth)" <Je...@genworth.com>
> Reply-To: <cx...@incubator.apache.org>
> Date: Wed, 15 Aug 2007 17:24:02 -0400
> To: <cx...@incubator.apache.org>
> Conversation: Deploying CXF to Weblogic 10.0
> Subject: RE: Deploying CXF to Weblogic 10.0
> 
> 
> I have not tried in Tomcat yet but it works locally without an application
> server. The more general question I had was if anyone had managed to get CXF
> working out of the box in a BEA Weblogic environment.
> 

I've got a Spring based configuration working on 9.2 MP1.


Regards,
Randy Burgess
Web Applications Developer
Nuvox Communications 



This email and any attachments ("Message") may contain legally privileged and/or confidential information.  If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email.  Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

RE: Deploying CXF to Weblogic 10.0

Posted by "Tchang, Jeffrey (Genworth)" <Je...@genworth.com>.
> > So I've been trying to get CXF to deploy to a BEA Weblogic 10.0 
> > application server. However, I am running into a number of issues. 
> > Most of them have to do with the numerous JARs that come 
> with CXF and 
> > conflicts with BEA (surprise surprise). I've opened up 
> support tickets 
> > with BEA anyway to see if they can help.
> > 
> 
> Pardon the non-answer, but what you're trying to do, could 
> you get it working on Tomcat, or are you using EJB's?  I 
> would say normally BEA comes in when you can get it working 
> on Tomcat but not on Weblogic.
> Whether or not you can get it to work on Tomcat helps to 
> separate the problem as being BEA-specific (if you can) or 
> CXF-specific (if you can't).

I have not tried in Tomcat yet but it works locally without an application
server. The more general question I had was if anyone had managed to get CXF
working out of the box in a BEA Weblogic environment.


> > The most successful I have been with deploying CXF is using the 
> > following options in weblogic-application.xml:
> > 
> > <prefer-application-packages>
> >   <package-name>javax.jws.*</package-name>
> >   <package-name>javax.xml.ws.*</package-name>
> >   <package-name>javax.net.ssl.*</package-name>
> > </prefer-application-packages>
> > 
> > However, these settings throw a
> > 
> > java.lang.NoClassDefFoundError: javax/net/ssl/HostnameVerifier at 
> > 
> org.apache.cxf.transport.http.AbstractHTTPTransportFactory.get
> ConnectionFactory(AbstractHTTPTransportFactory.java:244).
> 
> 
> I would check to see if you can enable classloader logging 
> somewhere in BEA--Oracle App server at least has that option. 
>  It may tell you if it can't find certain required JARs.  You 
> may find out that you are missing a JAR file not containing 
> the class above, but which has a class that HostnameVerifier 
> can't load without.

Sounds like a good idea. I will double check how to enable classloader
logging in BEA. Thanks.

-Jeff

Re: Deploying CXF to Weblogic 10.0

Posted by Glen Mazza <gl...@verizon.net>.
Am Mittwoch, den 15.08.2007, 14:41 -0400 schrieb Tchang, Jeffrey
(Genworth):

> So I've been trying to get CXF to deploy to a BEA Weblogic 10.0 application 
> server. However, I am running into a number of issues. Most of them have to do 
> with the numerous JARs that come with CXF and conflicts with BEA (surprise 
> surprise). I've opened up support tickets with BEA anyway to see if they can 
> help.
> 

Pardon the non-answer, but what you're trying to do, could you get it
working on Tomcat, or are you using EJB's?  I would say normally BEA
comes in when you can get it working on Tomcat but not on Weblogic.
Whether or not you can get it to work on Tomcat helps to separate the
problem as being BEA-specific (if you can) or CXF-specific (if you
can't).


> The most successful I have been with deploying CXF is using the following 
> options in weblogic-application.xml:
> 
> <prefer-application-packages>
>   <package-name>javax.jws.*</package-name>
>   <package-name>javax.xml.ws.*</package-name>
>   <package-name>javax.net.ssl.*</package-name>
> </prefer-application-packages>
> 
> However, these settings throw a
> 
> java.lang.NoClassDefFoundError: javax/net/ssl/HostnameVerifier at
> org.apache.cxf.transport.http.AbstractHTTPTransportFactory.getConnectionFactory(AbstractHTTPTransportFactory.java:244).


I would check to see if you can enable classloader logging somewhere in
BEA--Oracle App server at least has that option.  It may tell you if it
can't find certain required JARs.  You may find out that you are missing
a JAR file not containing the class above, but which has a class that
HostnameVerifier can't load without.

I had a Spring MVC web application once that worked perfectly on Tomcat
but fell apart on OAS.  Apparently I had missed one library that Tomcat
had by default but OAS didn't--but only OAS classloader logging pointed
out the error to me.

HTH,
Glen