Application Deployment Into WLS 12.1.2 Takes a Long Time Due to Annotation Scan Calls (Doc ID 2012238.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle WebLogic Server - Version 12.1.2.0.0 and later
Information in this document applies to any platform.

Symptoms

A J2EE application has a Web Module that contains a large number directories where JSP pages are stored.
Deploying this application  into 12.1.2 WLS Server takes a long time  as most of the time is spent in the
weblogic.application.utils.AnnotationDetector.scan() method.
Taking a thread dump of WLS server, this method is invoked with the following  thread stack :

java.lang.Thread.State: RUNNABLE
at java.io.WinNTFileSystem.list(Native Method)
at java.io.File.list(File.java:1048)
at java.io.File.listFiles(File.java:1133)
at weblogic.application.utils.AnnotationDetector.scan(AnnotationDetector.java:158)
at weblogic.application.utils.AnnotationDetector.scan(AnnotationDetector.java:164)
at weblogic.application.utils.AnnotationDetector.scan(AnnotationDetector.java:164)
at weblogic.application.utils.AnnotationDetector.scan(AnnotationDetector.java:164)
at weblogic.application.utils.AnnotationDetector.scan(AnnotationDetector.java:164)
at weblogic.application.utils.AnnotationDetector.scan(AnnotationDetector.java:164)
at weblogic.application.utils.AnnotationDetector.isAnnotated(AnnotationDetector.java:145)
at weblogic.connector.external.RarUtils$RARAnnotationDetector.foundInJar(RarUtils.java:50)
at weblogic.connector.external.RarUtils$RARAnnotationDetector.foundJCAAnnotation(RarUtils.java:44)
at weblogic.connector.external.RarUtils.detectAnnotation(RarUtils.java:30)
at weblogic.connector.external.RarUtils.isRar(RarUtils.java:22)
at weblogic.connector.deploy.ConnectorDeploymentFactory.findOrCreateComponentMBeans(ConnectorDeploymentFactory.java:43)
at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:43)
at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:112)
at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:71)
at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:89)


Note that this problem can occur even the Web module contains no JSP page in directories.


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms