Skip to main content

Upgrading JAX-WS to version 2.2.7 in Glassfish 3.1.2.2

2 replies [Last post]
ariod
Offline
Joined: 2011-05-23
Points: 0

Hi,

We're experiencing a classloader leak when using web services in Glassfish 3.1.2.2 and would like to upgrade JAX-WS to a 2.2.7 that fixes this issue. Can you recommend a way to do this? We've tried putting jaxws-rt.jar to ${AS_HOME}/lib/endorsed folder but then we are getting the following exception on deployment:

org.apache.catalina.LifecycleException: java.util.ServiceConfigurationError: javax.servlet.ServletContainerInitializer: Provider com.sun.xml.ws.transport.http.servlet.WSServletContainerInitializer could not be instantiated: java.lang.NoClassDefFoundError: javax/servlet/ServletContainerInitializer
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5389)
at com.sun.enterprise.web.WebModule.start(WebModule.java:498)

I'm pressuming the problem is that this class is loaded by a different classloader.

How to work around this?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
snajper
Offline
Joined: 2004-10-01
Points: 0

Hi,
jaxws gets integrated into GF through metro, so you need to updated
metro libraries. JAX-WS 2.2.7 is included in latest Metro 2.2.1 release
[1]. The link also contains instructions on how to install it,
MartiNG

[1] http://metro.java.net/2.2.1/

On 10/8/12 7:17 PM, forums@java.net wrote:
> Hi, We're experiencing a classloader leak [1] when using web services in
> Glassfish 3.1.2.2 and would like to upgrade JAX-WS to a 2.2.7 that
> fixes this
> issue. Can you recommend a way to do this? We've tried putting
> jaxws-rt.jar
> to ${AS_HOME}/lib/endorsed folder but then we are getting the following
> exception on deployment: org.apache.catalina.LifecycleException:
> java.util.ServiceConfigurationError:
> javax.servlet.ServletContainerInitializer: Provider
> com.sun.xml.ws.transport.http.servlet.WSServletContainerInitializer
> could not
> be instantiated: java.lang.NoClassDefFoundError:
> javax/servlet/ServletContainerInitializer at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:5389)
> at
> com.sun.enterprise.web.WebModule.start(WebModule.java:498) I'm
> pressuming the
> problem is that this class is loaded by a different classloader. How
> to work
> around this?
>
> [1] http://java.net/jira/browse/GLASSFISH-18787
>

ariod
Offline
Joined: 2011-05-23
Points: 0

That worked flawlessly, thanks!