WebSphere Application Server / 8.0 / Servlet-thrown initialization exception exception

I am just trying to deploy a quiet web service example in 8.0 web page, but I get this:

Mistake

[12.02.2013 05: 13: 07: 728 VET] 00000c74 E UOW = source = com.ibm.ws.webcontainer.servlet class = com.ibm.ws.webcontainer.servlet.ServletWrapper method = init org = prod = component = thread = [WebContainer: 370] Uncaught.init.exception.thrown.by.servlet [12.02.2013 05: 13: 07: 728 VET] 00000c74 E UOW = source = com.ibm.ws.webcontainer.webapp class = com. ibm.ws.webcontainer.webapp.WebApp method = logServletError org = prod = component = thread = [WebContainer: 370] SRVE0293E: [Servlet error] - [jersey-serlvet]: java.lang.IncompatibleClassChangeError: org.objectweb. ClassVisitor at java.lang.ClassLoader.defineClassImpl (native method) at java.lang.ClassLoader.defineClass (ClassLoader.java:262) at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:69) at com.ibm.ws. classloader.CompoundClassLoader._defineClass (CompoundClassLoader.java:852) at com.ibm.ws.classloader.CompoundClassLoader.localFindClass (CompoundClassLoader.java:762) at com.ibm.ws.classloader.CompoundClassLoader.loadLava Classo (CompoundClassLoader.loadLavaClasso) .lang.ClassLoader.loadClass (ClassLoader.java:627) at java.lang.J9VMInternals.verifyImpl (native method) at java.lang.J9VMInternals.verify (J9VMInternals.java:85) at java.lang.J9VMInternals.verternals (J9VMInternals.verternals .java: 83) at java.lang.J9VMInternals.initialize (J9VMInternals.java:162) at com.sun.jersey.api.core.ScanningResourceConfig.init (ScanningResourceConfig.java:79) at com.sun.jersey.api. core.PackagesResourceConfig.init (PackagesResourceConfig.java:104) at com.sun.jersey.api.core.PackagesResourceConfig. (PackagesResourceConfig.java:78) at com.sun.jersey.api.core.PackagesResourceConfig. (PackagesResourceConfig.java:89) at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig (WebComponent.java:700) at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig (WebComponent.createResourceConfig (WebComponent : 678) at com.sun.jersey.spi.container.servlet.WebComponent.init (WebComponent.java:203) at com.sun.jersey.spi.container.servlet.ServletContainer.init (ServletContainer.java:373) at com.sun.jersey.spi.container.servlet.ServletContainer.init (ServletContainer.java:556) at javax.servlet.GenericServlet.init (GenericServlet.java:161) at com.ibm.ws.webcontainer.servlet.ServletWrapper init (ServletWrapper.java:336) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init (ServletWrapperImpl.java:168) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest (Servlet :Wrapper.ava629) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest (ServletWrapper.java:456) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest (ServletWrapperImpl.java:178) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest (ServletWrapperImpl.java:178) at com.ibm.ws. .webcontainer.filter.WebAppFilterManager.invokeFilters (WebAppFilterManager.java:1027) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest (CacheServlet.Wrapper.java:87) at com.ibm.ws. .java: 895) at com.ibm.ws.webcontainer.WSWebContainer.handleRequest (WSWebContainer.java:1662) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready (WCChannelLink.java:195) at com.ibm. ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination (HttpInboundLink.java:458) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handle.NewRequest (HttpInboundLink522) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest (HttpInboundLink.java:311) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready (HttpInbava :Link 282) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators (NewConnectionInitialReadCallback.java:214) at com.ibm.ws.tcp.channel.impl.NewConnectionReadInitialReadCallback .ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted (AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback (AbstractAsyncFuture.javaib:217) .fireCompletionActions (AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed (AsyncFuture.java:138) at com.ibm.io.async.ResultHandler.complete (ResultHandler.java:204) at com.ibm.io.async.ResultHandler.runEventProcessingLoop (ResultHandler.java:775) at com.ibm.io.async.ResultHandler $ 2.run (ResultHandler.java:905) at com. ibm.ws.util.ThreadPool $ Worker.run (ThreadPool.java:1783)

web.xml

<web-app id="WebApp_ID" version="2.4"
    xmlns="http://java.sun.com/xml/ns/j2ee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

    <display-name>Restful Web Application</display-name>

    <servlet>
        <servlet-name>jersey-serlvet</servlet-name>
        <servlet-class>
            com.sun.jersey.spi.container.servlet.ServletContainer
        </servlet-class>
        <init-param>
            <param-name>com.sun.jersey.config.property.packages</param-name>
            <param-value>com.mkyong.rest.JSONService</param-value>
        </init-param>
        <init-param>
            <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
            <param-value>true</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>jersey-serlvet</servlet-name>
        <url-pattern>/rest/*</url-pattern>
    </servlet-mapping>

</web-app>

      

+3


source to share


1 answer


This appears to be a product defect discussed in the IBM forums here for which a fix has been released as a result. Quoting from the linked links, the problem was:

The internal ASM libraries used by WebSphere Application Server were available to applications. If the application also deploys ASM libraries, conflicts may occur.



Some possible workarounds have been listed in the forums , which helps to resolve the conflict through class modifications. Since you are not 8.5 at the moment, but 8.0, I suggest you raise the PMR to check your problem, this is the same problem and get a fix for your version.

+5


source







All Articles