Hi
On 06/12/11 17:33, sdoca sdoca wrote:
Just an FYI for future reference...
We ended up refactoring our code and pulled the CXF client out of the ear and
created a Jersey REST service which in turn makes the calls to the CXF client
library. We then created a Jersey REST client that is bundled in our ear which
makes calls to the REST service.
The ear is deployed in one Glassfish domain and the REST service war in
another. The war file contains a glassfish-web.xml file as detailed below to
load the CXF classes. We don't have to copy any jars to the domain's lib/ext
directory and there are no classloading issues.
It's a bit of a pain to have to wrap the CXF clients in a Jersey service, but
it works and I can carry on.
Looks a bit complex :-) but I'm not sure what we can do as there's not
enough info; any chance you can provide some basic Maven test showing
this issue ?
May be we should spend a bit of time and see how friendly Glassfish is
toward CXF :-) but having some more info from users who are actually
working with Glassfish can help :-)
Cheers, Sergey
----- Original Message -----
From: sdoca sdoca<[email protected]>
Date: Friday, December 2, 2011 11:26 am
Subject: Re: Deploy CXF ejb-jar/ear in Glassfish
To: [email protected]
Cc: [email protected]
Hi,
Sorry for the late reply. I've implemented your suggestion, but
then I had to deal with some JMS config issues. This deployment
has been very challenging to say the least.
It appears I need to copy all of the jars in my ear's lib
directory to my domain/lib/ext directory, not just the CXF
ones. But, I am getting this error:
"javax.xml.bind.JAXBException: ClassCastException: attempting to
cast bundle://3.0:1/javax/xml/bind/JAXBContext.class to
jar:file:/opt/glassfishv3/glassfish/modules/endorsed/jaxb-api-
osgi.jar!/javax/xml/bind/JAXBContext.class. Please make sure
that you are specifying the proper ClassLoader."
I removed these jars from the domain/lib/ext directory:
jaxb-api-2.2.3.jar
jaxb-impl-2.2.4-1.jar
hoping that would solve the issue, but no luck. I have to admit
I'm a novice when it comes to class loading issues.
Can anyone help me with this issue?
----- Original Message -----
From: Bernhard Thalmayr<[email protected]>
Date: Monday, November 28, 2011 10:38 am
Subject: Re: Deploy CXF ejb-jar/ear in Glassfish
To: [email protected]
There's no chance to get similar behaviour for an enteprise
archive as the
classloader will always detelaget
Have to tried to place the CXF-jars into<domain-dir>lib/ext?
-Bernhard
On Mon, Nov 28, 2011 at 5:48 PM, sdoca sdoca
<[email protected]> wrote:
Hi,
I need to deploy an ear which contains an ejb-jar into
Glassfish 3.1 that
uses CXF. I know that if I was deploying a war file I
would need to
include a glassfish-web.xml file which includes the following:
<!-- Need this to tell Glassfish
not to load the JAX-WS RI classes so
it will
use the CXF
ones instead -->
<sun-web-app>
<class-
loader delegate="false" />
</sun-web-app>
I am guessing I need to do something similar for an ear, but
am not sure
what file to add the class-loader info. I was hoping
someone on this list
has done this and can provide guidance.
Thanks!
--
IT-Consulting Bernhard Thalmayr
- Painstaking Minds -
83620 Vagen (Munich area)
Germany
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com