14 Replies Latest reply on Sep 9, 2015 12:26 PM by joyousjavadev

    Eclipse Mars hangs with Invoking JBoss Knowledge Base Builder after adding glassfish-embedded-all:4.1 to pom.xml

    joyousjavadev Newbie

      Steps:

       

      1. Have a working Eclipse Mars workspace with Maven project with JBoss Tools 4.3.0.Beta2 installed.

      2.  Backup the workspace.

      3. Add the following glassfish-embedded-all:4.1 dependency to pom.xml

      <dependency>

          <groupId>org.glassfish.main.extras</groupId>

          <artifactId>glassfish-embedded-all</artifactId>

          <version>4.1</version>

      </dependency>

       

      4. Eclipse Mars hangs with Invoking JBoss Knowledge Base Builder

       

      Note: At one time the "Invoking JBoss Knowledge Base Builder" process appeared to be completed then on the next Eclipse restart, it started again.

       

      Thank you.

        • 3. Re: Eclipse Mars hangs with Invoking JBoss Knowledge Base Builder after adding glassfish-embedded-all:4.1 to pom.xml
          Alexey Kazakov Master

          I can't reproduce it

          Is it reproducible in any maven project (even small ones) with that dependency for you or in some specific project only

          If you go to Project Properties - > JBoss Tools Knowledge Base and disable it there does it work faster now?

          How long does it take to rebuild the project with JBoss Tools Knowledge Base support enabled?

          • 4. Re: Eclipse Mars hangs with Invoking JBoss Knowledge Base Builder after adding glassfish-embedded-all:4.1 to pom.xml
            joyousjavadev Newbie

            In another existing maven JavaEE7 Test project (<packaging>war</packaging>) with the org.glassfish.main.extras:4.1 dependency I was able to reproduce it if the JBoss Tools Knowledge Base Support is checked. I tried to uncheck it but the operation does not stop and blocks other operations and runs the CPU, CPU fan. I believe the project change save operation does not complete because upon Eclipse restart it is checked again.

             

            In my main project where this issue originally happened, I somehow manged to uncheck the JBoss Tools Knowledge Base Support and process completed quickly thereafter.

             

            In another brand new maven Java EE 7 project with nothing in it; when org.glassfish.main.extras:4.1 dependency is added the issue is also reproducible.

             

            Thank you.

            • 5. Re: Eclipse Mars hangs with Invoking JBoss Knowledge Base Builder after adding glassfish-embedded-all:4.1 to pom.xml
              Alexey Kazakov Master

              You can disable automatic Knowledge Base enablement in Preferences->JBoss Tools->Maven Integration. Uncheck CDI and JSF integration there.

              We are trying to reproduce the problem. Not success yet

              How long does it take to rebuild the project with JBoss Tools Knowledge Base support enabled?

              Can you print attache a stack trace using jstack command when JBoss Tools Knowledge Base build is in progress?

              • 6. Re: Eclipse Mars hangs with Invoking JBoss Knowledge Base Builder after adding glassfish-embedded-all:4.1 to pom.xml
                Denis Golovin Master

                Easy to replicate for me, but it seems just working really slowly. Here is two different jstack outputs:

                "Worker-2186" #3405 prio=5 os_prio=0 tid=0x000000000112f800 nid=0x4094 runnable [0x00007f60a8af0000]

                   java.lang.Thread.State: RUNNABLE

                  at java.util.zip.ZipFile.open(Native Method)

                  at java.util.zip.ZipFile.<init>(ZipFile.java:220)

                  at java.util.zip.ZipFile.<init>(ZipFile.java:150)

                  at java.util.zip.ZipFile.<init>(ZipFile.java:164)

                  at org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2678)

                  at org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2644)

                  at org.eclipse.jdt.internal.core.JarPackageFragmentRoot.getJar(JarPackageFragmentRoot.java:156)

                  at org.eclipse.jdt.internal.core.ClassFile.getJarBinaryTypeInfo(ClassFile.java:355)

                  at org.eclipse.jdt.internal.core.ClassFile.getBinaryTypeInfo(ClassFile.java:290)

                  at org.eclipse.jdt.internal.core.ClassFile.getBinaryTypeInfo(ClassFile.java:284)

                  at org.eclipse.jdt.internal.core.ClassFile.buildStructure(ClassFile.java:93)

                  at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:259)

                  at org.eclipse.jdt.internal.core.SourceRefElement.generateInfos(SourceRefElement.java:107)

                  at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:579)

                  at org.eclipse.jdt.internal.core.BinaryType.getElementInfo(BinaryType.java:287)

                  at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:302)

                  at org.eclipse.jdt.internal.core.BinaryType.getAnnotations(BinaryType.java:185)

                  at org.jboss.tools.batch.internal.core.impl.definition.AbstractMemberDefinition.init(AbstractMemberDefinition.java:85)

                  at org.jboss.tools.batch.internal.core.impl.definition.AbstractTypeDefinition.init(AbstractTypeDefinition.java:62)

                  at org.jboss.tools.batch.internal.core.impl.definition.TypeDefinition.init(TypeDefinition.java:44)

                  at org.jboss.tools.batch.internal.core.impl.definition.AbstractMemberDefinition.setAnnotatable(AbstractMemberDefinition.java:60)

                  at org.jboss.tools.batch.internal.core.impl.definition.AbstractTypeDefinition.setType(AbstractTypeDefinition.java:56)

                  at org.jboss.tools.batch.internal.core.impl.BatchBuilder.build(BatchBuilder.java:259)

                  at org.jboss.tools.batch.internal.core.impl.BatchBuilder.buildJars(BatchBuilder.java:225)

                  at org.jboss.tools.batch.internal.core.impl.BatchBuilder.build(BatchBuilder.java:139)

                  at org.jboss.tools.jst.web.kb.internal.KbBuilder.buildExtensionModels(KbBuilder.java:212)

                  at org.jboss.tools.jst.web.kb.internal.KbBuilder.build(KbBuilder.java:133)

                  at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)

                  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)

                  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:205)

                  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:245)

                  at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:300)

                  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)

                  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303)

                  at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:359)

                  at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:382)

                  at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)

                  at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)

                  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

                "Worker-2186" #3405 prio=5 os_prio=0 tid=0x000000000112f800 nid=0x4094 runnable [0x00007f60a8af0000]

                   java.lang.Thread.State: RUNNABLE

                  at java.util.zip.Inflater.inflateBytes(Native Method)

                  at java.util.zip.Inflater.inflate(Inflater.java:259)

                  - locked <0x00000000eff43c18> (a java.util.zip.ZStreamRef)

                  at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:152)

                  at java.io.BufferedInputStream.read1(BufferedInputStream.java:284)

                  at java.io.BufferedInputStream.read(BufferedInputStream.java:345)

                  - locked <0x00000000eff47490> (a java.io.BufferedInputStream)

                  at org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsByteArray(Util.java:525)

                  at org.eclipse.jdt.internal.compiler.util.Util.getZipEntryByteContent(Util.java:691)

                  at org.eclipse.jdt.internal.core.ClassFile.getJarBinaryTypeInfo(ClassFile.java:359)

                  at org.eclipse.jdt.internal.core.ClassFile.getBinaryTypeInfo(ClassFile.java:290)

                  at org.eclipse.jdt.internal.core.ClassFile.getBinaryTypeInfo(ClassFile.java:284)

                  at org.eclipse.jdt.internal.core.ClassFile.buildStructure(ClassFile.java:93)

                  at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:259)

                  at org.eclipse.jdt.internal.core.SourceRefElement.generateInfos(SourceRefElement.java:107)

                  at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:579)

                  at org.eclipse.jdt.internal.core.BinaryType.getElementInfo(BinaryType.java:287)

                  at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:302)

                  at org.eclipse.jdt.internal.core.BinaryType.getAnnotations(BinaryType.java:185)

                  at org.jboss.tools.batch.internal.core.impl.definition.AbstractMemberDefinition.init(AbstractMemberDefinition.java:85)

                  at org.jboss.tools.batch.internal.core.impl.definition.AbstractTypeDefinition.init(AbstractTypeDefinition.java:62)

                  at org.jboss.tools.batch.internal.core.impl.definition.TypeDefinition.init(TypeDefinition.java:44)

                  at org.jboss.tools.batch.internal.core.impl.definition.AbstractMemberDefinition.setAnnotatable(AbstractMemberDefinition.java:60)

                  at org.jboss.tools.batch.internal.core.impl.definition.AbstractTypeDefinition.setType(AbstractTypeDefinition.java:56)

                  at org.jboss.tools.batch.internal.core.impl.BatchBuilder.build(BatchBuilder.java:259)

                  at org.jboss.tools.batch.internal.core.impl.BatchBuilder.buildJars(BatchBuilder.java:225)

                  at org.jboss.tools.batch.internal.core.impl.BatchBuilder.build(BatchBuilder.java:139)

                  at org.jboss.tools.jst.web.kb.internal.KbBuilder.buildExtensionModels(KbBuilder.java:212)

                  at org.jboss.tools.jst.web.kb.internal.KbBuilder.build(KbBuilder.java:133)

                  at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)

                  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)

                  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:205)

                  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:245)

                  at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:300)

                  at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)

                  at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303)

                  at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:359)

                  at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:382)

                  at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)

                  at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)

                  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

                • 7. Re: Eclipse Mars hangs with Invoking JBoss Knowledge Base Builder after adding glassfish-embedded-all:4.1 to pom.xml
                  Viacheslav Kabanovich Newbie

                  glassfish-embedded-all-4.1.jar is determined by Batch builder as a Batch module. It is huge - 87Mb (202Mb inside). The longest time is spent for query to JDT IType.isInterface() - JDT at any first query to IType builds element info and caches everything that may be needed for next queries.

                  • 8. Re: Eclipse Mars hangs with Invoking JBoss Knowledge Base Builder after adding glassfish-embedded-all:4.1 to pom.xml
                    joyousjavadev Newbie

                    The process continued to run for about 10 minutes then I killed it. I restarted the workspace after couple of hours and capured the jstack below. It then completed! I saw that now the JBoss Tools Knowledge Base Support was not checked! I manually checked it again and restarted the workspace and the issue is reproducible again. It has been running for about 5 minutes now.

                     

                     

                    Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.51-b03 mixed mode):

                     

                    "[ThreadPool Manager] - Idle Thread" #70 daemon prio=5 os_prio=0 tid=0x000000002489e800 nid=0x4b8 in Object.wait() [0x000000003342f000]

                       java.lang.Thread.State: WAITING (on object monitor)

                            at java.lang.Object.wait(Native Method)

                            at java.lang.Object.wait(Unknown Source)

                            at org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor.run(Executor.java:106)

                            - locked <0x00000000fb88dff0> (a org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor)

                     

                    "334962450@qtp-625937761-2" #63 prio=5 os_prio=0 tid=0x000000000a95e800 nid=0x15d8 in Object.wait() [0x000000002fe8f000]

                       java.lang.Thread.State: TIMED_WAITING (on object monitor)

                            at java.lang.Object.wait(Native Method)

                            at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:626)

                            - locked <0x00000000fb88ac08> (a org.mortbay.thread.QueuedThreadPool$PoolThread)

                     

                    "614155526@qtp-625937761-0 - Acceptor0 SocketConnector@127.0.0.1:51235" #61 prio=5 os_prio=0 tid=0x000000000a95f000 nid=0x320 runnable [0x000000002e7cf000]

                       java.lang.Thread.State: RUNNABLE

                            at java.net.DualStackPlainSocketImpl.accept0(Native Method)

                            at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source)

                            at java.net.AbstractPlainSocketImpl.accept(Unknown Source)

                            at java.net.PlainSocketImpl.accept(Unknown Source)

                            - locked <0x00000000fb88b5c8> (a java.net.SocksSocketImpl)

                            at java.net.ServerSocket.implAccept(Unknown Source)

                            at java.net.ServerSocket.accept(Unknown Source)

                            at org.mortbay.jetty.bio.SocketConnector.accept(SocketConnector.java:99)

                            at org.mortbay.jetty.AbstractConnector$Acceptor.run(AbstractConnector.java:707)

                            at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

                     

                    "Provisioning Event Dispatcher" #56 daemon prio=5 os_prio=0 tid=0x000000000c3ba800 nid=0x200c in Object.wait() [0x000000002d7ef000]

                       java.lang.Thread.State: WAITING (on object monitor)

                            at java.lang.Object.wait(Native Method)

                            at java.lang.Object.wait(Unknown Source)

                            at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:400)

                            - locked <0x0000000085531ba0> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)

                            at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:336)

                     

                    "Thread-10" #53 prio=5 os_prio=0 tid=0x000000000c3b7000 nid=0x94 waiting on condition [0x000000002decf000]

                       java.lang.Thread.State: TIMED_WAITING (sleeping)

                            at java.lang.Thread.sleep(Native Method)

                            at org.eclipse.equinox.internal.p2.updatechecker.UpdateChecker$UpdateCheckThread.run(UpdateChecker.java:68)

                     

                    "Worker-17" #52 prio=5 os_prio=0 tid=0x00000000248a3000 nid=0xa4 in Object.wait() [0x000000002d6ef000]

                       java.lang.Thread.State: TIMED_WAITING (on object monitor)

                            at java.lang.Object.wait(Native Method)

                            at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:188)

                            - locked <0x00000000818149c8> (a org.eclipse.core.internal.jobs.WorkerPool)

                            at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:220)

                            at org.eclipse.core.internal.jobs.Worker.run(Worker.java:52)

                     

                    "Worker-16" #51 prio=5 os_prio=0 tid=0x000000002489f000 nid=0x1140 runnable [0x000000002d5ee000]

                       java.lang.Thread.State: RUNNABLE

                            at java.util.zip.ZipFile.open(Native Method)

                            at java.util.zip.ZipFile.<init>(Unknown Source)

                            at java.util.zip.ZipFile.<init>(Unknown Source)

                            at java.util.zip.ZipFile.<init>(Unknown Source)

                            at org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2678)

                            at org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2644)

                            at org.eclipse.jdt.internal.core.JarPackageFragmentRoot.getJar(JarPackageFragmentRoot.java:156)

                            at org.eclipse.jdt.internal.core.ClassFile.getJarBinaryTypeInfo(ClassFile.java:355)

                            at org.eclipse.jdt.internal.core.ClassFile.getBinaryTypeInfo(ClassFile.java:290)

                            at org.eclipse.jdt.internal.core.ClassFile.getBinaryTypeInfo(ClassFile.java:284)

                            at org.eclipse.jdt.internal.core.ClassFile.buildStructure(ClassFile.java:93)

                            at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:259)

                            at org.eclipse.jdt.internal.core.SourceRefElement.generateInfos(SourceRefElement.java:107)

                            at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:579)

                            at org.eclipse.jdt.internal.core.BinaryType.getElementInfo(BinaryType.java:287)

                            at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:302)

                            at org.eclipse.jdt.internal.core.BinaryType.isAnnotation(BinaryType.java:738)

                            at org.jboss.tools.batch.internal.core.scanner.FileSet.checkType(FileSet.java:81)

                            at org.jboss.tools.batch.internal.core.scanner.FileSet.add(FileSet.java:51)

                            at org.jboss.tools.batch.internal.core.impl.BatchBuilder.buildJars(BatchBuilder.java:220)

                            at org.jboss.tools.batch.internal.core.impl.BatchBuilder.build(BatchBuilder.java:139)

                            at org.jboss.tools.jst.web.kb.internal.KbBuilder.buildExtensionModels(KbBuilder.java:212)

                            at org.jboss.tools.jst.web.kb.internal.KbBuilder.build(KbBuilder.java:133)

                            at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)

                            at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)

                            at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:205)

                            at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:245)

                            at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:300)

                            at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)

                            at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303)

                            at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:359)

                            at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:382)

                            at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)

                            at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)

                            at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

                     

                    "Worker-13" #48 prio=5 os_prio=0 tid=0x000000002489a000 nid=0x2368 in Object.wait() [0x000000002d2ef000]

                       java.lang.Thread.State: TIMED_WAITING (on object monitor)

                            at java.lang.Object.wait(Native Method)

                            at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:188)

                            - locked <0x00000000818149c8> (a org.eclipse.core.internal.jobs.WorkerPool)

                            at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:220)

                            at org.eclipse.core.internal.jobs.Worker.run(Worker.java:52)

                     

                    "JavaScript indexing" #34 daemon prio=4 os_prio=-1 tid=0x000000000c3b8000 nid=0xff8 in Object.wait() [0x000000002648f000]

                       java.lang.Thread.State: WAITING (on object monitor)

                            at java.lang.Object.wait(Native Method)

                            at java.lang.Object.wait(Unknown Source)

                            at org.eclipse.wst.jsdt.internal.core.search.processing.JobManager.run(JobManager.java:370)

                            - locked <0x0000000086206648> (a org.eclipse.wst.jsdt.internal.core.search.indexing.IndexManager)

                            at java.lang.Thread.run(Unknown Source)

                     

                    "EventAdmin Async Event Dispatcher Thread" #31 daemon prio=6 os_prio=0 tid=0x000000000c3bd800 nid=0x304 in Object.wait() [0x000000002599f000]

                       java.lang.Thread.State: WAITING (on object monitor)

                            at java.lang.Object.wait(Native Method)

                            at java.lang.Object.wait(Unknown Source)

                            at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:400)

                            - locked <0x0000000084615218> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)

                            at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:336)

                     

                    "Java indexing" #27 daemon prio=4 os_prio=-1 tid=0x000000000c3b9800 nid=0x2230 in Object.wait() [0x000000000e2bf000]

                       java.lang.Thread.State: WAITING (on object monitor)

                            at java.lang.Object.wait(Native Method)

                            at java.lang.Object.wait(Unknown Source)

                            at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:382)

                            - locked <0x00000000838d9bb0> (a org.eclipse.jdt.internal.core.search.indexing.IndexManager)

                            at java.lang.Thread.run(Unknown Source)

                     

                    "Bundle File Closer" #26 daemon prio=6 os_prio=0 tid=0x000000000c3bc000 nid=0xa9c in Object.wait() [0x000000000ec1f000]

                       java.lang.Thread.State: WAITING (on object monitor)

                            at java.lang.Object.wait(Native Method)

                            at java.lang.Object.wait(Unknown Source)

                            at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:400)

                            - locked <0x000000008377b518> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)

                            at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:336)

                     

                    "Worker-1" #24 prio=5 os_prio=0 tid=0x000000000c528800 nid=0x17bc runnable [0x000000000dfbe000]

                       java.lang.Thread.State: RUNNABLE

                            at java.util.zip.ZipFile.open(Native Method)

                            at java.util.zip.ZipFile.<init>(Unknown Source)

                            at java.util.zip.ZipFile.<init>(Unknown Source)

                            at java.util.zip.ZipFile.<init>(Unknown Source)

                            at org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2678)

                            at org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2644)

                            at org.eclipse.jdt.internal.core.JarPackageFragmentRoot.getJar(JarPackageFragmentRoot.java:156)

                            at org.eclipse.jdt.internal.core.ClassFile.getJarBinaryTypeInfo(ClassFile.java:355)

                            at org.eclipse.jdt.internal.core.ClassFile.getBinaryTypeInfo(ClassFile.java:290)

                            at org.eclipse.jdt.internal.core.ClassFile.getBinaryTypeInfo(ClassFile.java:284)

                            at org.eclipse.jdt.internal.core.ClassFile.buildStructure(ClassFile.java:93)

                            at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:259)

                            at org.eclipse.jdt.internal.core.SourceRefElement.generateInfos(SourceRefElement.java:107)

                            at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:579)

                            at org.eclipse.jdt.internal.core.BinaryType.getElementInfo(BinaryType.java:287)

                            at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:302)

                            at org.eclipse.jdt.internal.core.BinaryType.isAnnotation(BinaryType.java:738)

                            at org.jboss.tools.batch.internal.core.scanner.FileSet.checkType(FileSet.java:81)

                            at org.jboss.tools.batch.internal.core.scanner.FileSet.add(FileSet.java:51)

                            at org.jboss.tools.batch.internal.core.impl.BatchBuilder.buildJars(BatchBuilder.java:220)

                            at org.jboss.tools.batch.internal.core.impl.BatchBuilder.build(BatchBuilder.java:139)

                            at org.jboss.tools.jst.web.kb.internal.KbBuilder.buildExtensionModels(KbBuilder.java:212)

                            at org.jboss.tools.jst.web.kb.internal.KbBuilder.build(KbBuilder.java:133)

                            at org.jboss.tools.jst.web.kb.KbProjectFactory$1KbBuilderEx.build(KbProjectFactory.java:107)

                            at org.jboss.tools.jst.web.kb.KbProjectFactory$1.run(KbProjectFactory.java:122)

                            at org.jboss.tools.common.model.XJob.runInWorkspace(XJob.java:192)

                            at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)

                            at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

                     

                    "Worker-0" #23 prio=5 os_prio=0 tid=0x000000000b007000 nid=0x1270 in Object.wait() [0x000000000dcbf000]

                       java.lang.Thread.State: TIMED_WAITING (on object monitor)

                            at java.lang.Object.wait(Native Method)

                            at org.eclipse.core.internal.jobs.WorkerPool.sleep(WorkerPool.java:188)

                            - locked <0x00000000818149c8> (a org.eclipse.core.internal.jobs.WorkerPool)

                            at org.eclipse.core.internal.jobs.WorkerPool.startJob(WorkerPool.java:220)

                            at org.eclipse.core.internal.jobs.Worker.run(Worker.java:52)

                     

                    "EMF Reference Cleaner" #22 daemon prio=5 os_prio=0 tid=0x000000000b5f7800 nid=0x1884 in Object.wait() [0x000000000d2ff000]

                       java.lang.Thread.State: WAITING (on object monitor)

                            at java.lang.Object.wait(Native Method)

                            at java.lang.ref.ReferenceQueue.remove(Unknown Source)

                            - locked <0x0000000081814b70> (a java.lang.ref.ReferenceQueue$Lock)

                            at java.lang.ref.ReferenceQueue.remove(Unknown Source)

                            at org.eclipse.emf.common.util.CommonUtil$1ReferenceClearingQueuePollingThread.run(CommonUtil.java:70)

                     

                    "Worker-JM" #17 prio=5 os_prio=0 tid=0x000000000aa90000 nid=0x7e4 in Object.wait() [0x000000000bf2f000]

                       java.lang.Thread.State: WAITING (on object monitor)

                            at java.lang.Object.wait(Native Method)

                            - waiting on <0x0000000081839bb0> (a java.util.ArrayList)

                            at org.eclipse.core.internal.jobs.InternalWorker.run(InternalWorker.java:59)

                            - locked <0x0000000081839bb0> (a java.util.ArrayList)

                     

                    "[Timer] - Main Queue Handler" #16 daemon prio=5 os_prio=0 tid=0x000000000aa9a000 nid=0x23fc in Object.wait() [0x000000000bb1f000]

                       java.lang.Thread.State: TIMED_WAITING (on object monitor)

                            at java.lang.Object.wait(Native Method)

                            at org.eclipse.equinox.internal.util.impl.tpt.timer.TimerImpl.run(TimerImpl.java:141)

                            - locked <0x0000000081839d40> (a java.lang.Object)

                            at java.lang.Thread.run(Unknown Source)

                     

                    "Start Level: Equinox Container: 1090250e-8556-0015-1e2e-a4e5061cf1bd" #14 daemon prio=5 os_prio=0 tid=0x000000000b3a8000 nid=0x7ec in Object.wait() [0x000000000bd4f000]

                       java.lang.Thread.State: WAITING (on object monitor)

                            at java.lang.Object.wait(Native Method)

                            - waiting on <0x000000008184d990> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)

                            at java.lang.Object.wait(Unknown Source)

                            at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:400)

                            - locked <0x000000008184d990> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)

                            at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:336)

                     

                    "Framework Event Dispatcher: Equinox Container: 1090250e-8556-0015-1e2e-a4e5061cf1bd" #13 daemon prio=5 os_prio=0 tid=0x000000000b3a7000 nid=0x1964 in Object.wait() [0x000000000bc4f000]

                       java.lang.Thread.State: WAITING (on object monitor)

                            at java.lang.Object.wait(Native Method)

                            at java.lang.Object.wait(Unknown Source)

                            at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.getNextEvent(EventManager.java:400)

                            - locked <0x0000000081839df8> (a org.eclipse.osgi.framework.eventmgr.EventManager$EventThread)

                            at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:336)

                     

                    "Active Thread: Equinox Container: 1090250e-8556-0015-1e2e-a4e5061cf1bd" #11 prio=5 os_prio=0 tid=0x000000000a66f800 nid=0x1f28 waiting on condition [0x000000000b71f000]

                       java.lang.Thread.State: TIMED_WAITING (parking)

                            at sun.misc.Unsafe.park(Native Method)

                            - parking to wait for  <0x000000008183a108> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

                            at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)

                            at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)

                            at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)

                            at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)

                            at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)

                            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

                            at java.lang.Thread.run(Unknown Source)

                     

                    "Service Thread" #9 daemon prio=9 os_prio=0 tid=0x0000000009881000 nid=0x2304 runnable [0x0000000000000000]

                       java.lang.Thread.State: RUNNABLE

                     

                    "C1 CompilerThread2" #8 daemon prio=9 os_prio=2 tid=0x0000000007f37000 nid=0x420 waiting on condition [0x0000000000000000]

                       java.lang.Thread.State: RUNNABLE

                     

                    "C2 CompilerThread1" #7 daemon prio=9 os_prio=2 tid=0x0000000007f31000 nid=0x22e0 waiting on condition [0x0000000000000000]

                       java.lang.Thread.State: RUNNABLE

                     

                    "C2 CompilerThread0" #6 daemon prio=9 os_prio=2 tid=0x0000000007f2f000 nid=0x1104 waiting on condition [0x0000000000000000]

                       java.lang.Thread.State: RUNNABLE

                     

                    "Attach Listener" #5 daemon prio=5 os_prio=2 tid=0x0000000007f2d000 nid=0x63c waiting on condition [0x0000000000000000]

                       java.lang.Thread.State: RUNNABLE

                     

                    "Signal Dispatcher" #4 daemon prio=9 os_prio=2 tid=0x0000000007f2c000 nid=0x1a1c runnable [0x0000000000000000]

                       java.lang.Thread.State: RUNNABLE

                     

                    "Finalizer" #3 daemon prio=8 os_prio=1 tid=0x0000000007ef9000 nid=0x4e8 in Object.wait() [0x000000000928f000]

                       java.lang.Thread.State: WAITING (on object monitor)

                            at java.lang.Object.wait(Native Method)

                            at java.lang.ref.ReferenceQueue.remove(Unknown Source)

                            - locked <0x000000008293ab58> (a java.lang.ref.ReferenceQueue$Lock)

                            at java.lang.ref.ReferenceQueue.remove(Unknown Source)

                            at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

                     

                    "Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x00000000023cf800 nid=0x3c4 in Object.wait() [0x000000000918f000]

                       java.lang.Thread.State: WAITING (on object monitor)

                            at java.lang.Object.wait(Native Method)

                            at java.lang.Object.wait(Unknown Source)

                            at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)

                            - locked <0x000000008293ad70> (a java.lang.ref.Reference$Lock)

                     

                    "main" #1 prio=6 os_prio=0 tid=0x00000000022e0800 nid=0x640 runnable [0x000000000014e000]

                       java.lang.Thread.State: RUNNABLE

                            at org.eclipse.swt.internal.win32.OS.WaitMessage(Native Method)

                            at org.eclipse.swt.widgets.Display.sleep(Display.java:4728)

                            at org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(WorkbenchAdvisor.java:368)

                            at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.eventLoopIdle(IDEWorkbenchAdvisor.java:858)

                            at org.eclipse.ui.internal.Workbench$3.eventLoopIdle(Workbench.java:517)

                            at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1132)

                            at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)

                            at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)

                            at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)

                            at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)

                            at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)

                            at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)

                            at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)

                            at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)

                            at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

                            at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)

                            at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)

                            at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)

                            at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

                            at java.lang.reflect.Method.invoke(Unknown Source)

                            at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)

                            at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)

                            at org.eclipse.equinox.launcher.Main.run(Main.java:1515)

                     

                    "VM Thread" os_prio=2 tid=0x0000000007ef8000 nid=0x1948 runnable

                     

                    "GC task thread#0 (ParallelGC)" os_prio=0 tid=0x00000000022f6800 nid=0x2100 runnable

                     

                    "GC task thread#1 (ParallelGC)" os_prio=0 tid=0x00000000022f8000 nid=0x1cf4 runnable

                     

                    "GC task thread#2 (ParallelGC)" os_prio=0 tid=0x00000000022f9800 nid=0x1fcc runnable

                     

                    "GC task thread#3 (ParallelGC)" os_prio=0 tid=0x00000000022fc000 nid=0x10a0 runnable

                     

                    "VM Periodic Task Thread" os_prio=2 tid=0x0000000009882000 nid=0x324 waiting on condition

                     

                    JNI global references: 388

                    • 9. Re: Eclipse Mars hangs with Invoking JBoss Knowledge Base Builder after adding glassfish-embedded-all:4.1 to pom.xml
                      Denis Golovin Master

                      I tried to unpack this jar and attach it as external class folder, builder works fast in this case. Does it scan classpath elements like this? I am asking because it feels like builder unpacks jar entries many times for different checks. But that is just my wild guess.

                      • 10. Re: Eclipse Mars hangs with Invoking JBoss Knowledge Base Builder after adding glassfish-embedded-all:4.1 to pom.xml
                        Viacheslav Kabanovich Newbie

                        I think that we have to use Jandex indexer not only to determine if jar is a Batch module, but to get all names of Batch artifact types - once for a jar and then store the names. I tried it - in glassfish-embedded-all-4.1.jar, the indexer collected Batch artifacts, about 50 of them, in less than a minute, JDT processed these types in a second.

                        • 11. Re: Eclipse Mars hangs with Invoking JBoss Knowledge Base Builder after adding glassfish-embedded-all:4.1 to pom.xml
                          Viacheslav Kabanovich Newbie

                          Our code does not unpack the jar, it just calls methods on IType. But JDT may unpack jar with every call to a new type from that jar. I am not sure about it, but the very first request to bynary type takes very long.

                           

                          We do scan class folders as well. It is good, that they work fast.

                          • 12. Re: Eclipse Mars hangs with Invoking JBoss Knowledge Base Builder after adding glassfish-embedded-all:4.1 to pom.xml
                            Viacheslav Kabanovich Newbie

                            [JBIDE-20593] JBoss Tools builders are very slow with large jar libraries - JBoss Issue Tracker

                             

                            https://github.com/jbosstools/jbosstools-javaee/pull/375

                             

                            JavaModelManager.cacheZipFiles(Object) is used to prevent JDT from creating new ZipFiles for each request during one build. It is not API, but may solve the issue if no side effects are found at testing.