简体   繁体   中英

"ClassNotFoundException: org.objectweb.asm.ClassVisitor" on WebLogic Version 12.2.1.1 and Later (Doc ID 2526226.1)

I am trying to deploy my legacy application in web-logic 12c but problem is every time its showing exception like > "ClassNotFoundException: org.objectweb.asm.ClassVisitor ,Basically this issue comes if application not have asm.jar but in my application asm.jar is there and moreover my application successfully deployed in web-logic 11

After lot of research i found below document in that they are saying WebLogic 12.2.1 infra to WebLogic 12.2.1.3 infra, the class org.objectweb.asm.ClassVisitorbelow can NOT be found when starting the server with customer's application deployed. Please some one guide me how can i resolve this issue

Document

https://support.oracle.com/knowledge/Middleware/2526226_1.html#FIX

Deployment issue

<Dec 6, 2019 5:58:46,064 AM GMT> <Error> <HTTP> <WL-101216> <Servlet: "JerseyRESTService" failed to preload on startup in Web application: "CDMWeb.war".
A MultiException has 1 exceptions.  They are:
1. java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor

    at org.jvnet.hk2.internal.Utilities.justCreate(Utilities.java:1085)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.create(ServiceLocatorImpl.java:978)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:1082)
    at org.jvnet.hk2.internal.ServiceLocatorImpl.createAndInitialize(ServiceLocatorImpl.java:1074)
    at org.glassfish.jersey.server.ApplicationHandler.createApplication(ApplicationHandler.java:385)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
    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.<init>(PackagesResourceConfig.java:78)
    at com.verizon.application.Application.<init>(Application.java:12)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException: org.objectweb.asm.ClassVisitor
    at com.oracle.classloader.PolicyClassLoader.findClass(PolicyClassLoader.java:398)
    at com.oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:371)
    at com.oracle.classloader.weblogic.LaunchClassLoader.loadClass(LaunchClassLoader.java:55)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:79)
    Truncated. see log file for complete stacktrace
> 

You can try adding the asm.jar to your Applications's WEB-INF/lib directory. From the error it's clear that JVM not able to locate the class, hence java.lang.ClassNotFoundException

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM