1 Reply Latest reply on Sep 11, 2019 8:11 AM by Tomaž Cerar

    Wildfly startup very slow during CDI Scanner

    Mahesh Reddy Newbie

      Dear sir,

       

      When i start the wildfly-10.1.0.Final , it takes lot of time between two log statements prefixed with '****'

       

      Not sure what is happening between these 2 log statements.

      It just eats up the CPU and struck there for 1 to 3 minutes.

       

      I thought i can disable CDI scanning by adding below beans.xml, Since i dont want it,

      But still same issue.

       

      Can someone please help.

      During development whole team is suffering due to this.

       

      2019-09-10 07:44:42,703 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0059: Class Path entry commons-csv-1.0.jar in /content/xyz-module-1.0.2-SNAPSHOT.ear/xyz-integration-1.0.3-SNAPSHOT.jar  does not point to a valid jar for a Class-Path reference.

      2019-09-10 07:44:42,715 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0207: Starting subdeployment (runtime-name: "xyz-webservices-1.0.3-SNAPSHOT.war")

      2019-09-10 07:44:42,716 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0207: Starting subdeployment (runtime-name: "xyz-dsc-web-1.0.2-SNAPSHOT.war")

      ****2019-09-10 07:44:42,716 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0207: Starting subdeployment (runtime-name: "xyz-web-1.0.2-SNAPSHOT.war")

      ****2019-09-10 07:45:38,216 WARN  [org.jboss.weld.deployer] (MSC service thread 1-1) WFLYWELD0013: Deployment deployment "xyz-module-1.0.2-SNAPSHOT.ear" contains CDI annotations but no bean archive was not found. (No beans.xml nor class with bean defining annotations)

       

      My beans.xml to disable CDI scanning

      I had placed it in xyz.ear/META-INF folder and also in WEB-INF folder of all wars in this ear.

       

      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
        http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
         version="1.1" bean-discovery-mode="none">

      </beans>

       

      Regards,

      Mahesh

        • 1. Re: Wildfly startup very slow during CDI Scanner
          Tomaž Cerar Master

          During deployment, application server does scanning of the whole archive, CDI is just one small part of of that whole process.

           

          If process takes long time it is usually because of the big deployment,

          server tries to index all code in your deployment (war,jar, lib jars,...) so it can discover all annotations it need for different things.

          so if it is taking lots of time, maybe problem is either your whole deployment is really big, or you maybe running antivirus software that is blocking/slowing the scanning process.

           

          if your deployment is big, you can maybe post list of jars you have in your lib folders and maybe we can help you trim some fat.

          if it is antivirus, disable it for .class/.jar files or add excludes for wildfly folder