6

I'm attempting to run Wildfly 8.1.0 with the -verbose:class flag set, but it doesn't appear to be doing anything.

Near the start of server.log, it echos what the JVM arguments it receives are. Here's that line (linebreaks added by me for ease of reading).

2016-03-09 15:55:31,623 DEBUG [org.jboss.as.config] (MSC service thread 1-6) VM Arguments:
-Xms64m -Xmx512m -XX:MaxPermSize=256m 
-verbose:class
-Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000
-Djava.net.preferIPv4Stack=true
-Dorg.jboss.resolver.warning=true
-Djboss.modules.system.pkgs=org.jboss.byteman
-Djboss.server.default.config=cls.xml
-Djboss.home.dir=C:/app/CMS/stdsw/wildfly-8.1.0.Final
-Dorg.jboss.boot.log.file=C:/app/CMS/modules/server/wildfly/cls/log/boot.log 
-Dlogging.configuration=file:C:/app/CMS/modules/server/wildfly/cls/configuration/logging.properties
-Dcls.log.path=C:/app/CMS/modules/server/log
-Djboss.server.base.dir=C:/app/CMS/modules/server/wildfly/cls
-Djboss.log.dir=C:/app/CMS/modules/server/wildfly/cls/log
-Djboss.config.dir=C:/app/CMS/modules/server/wildfly/cls/configuration
-Djboss.server.data.dir=C:/app/CMS/modules/server/wildfly/cls/data
-Djboss.server.log.dir=C:/app/CMS/modules/server/wildfly/cls/log
-Djboss.server.temp.dir=C:/app/CMS/modules/server/wildfly/cls/tmp
-Djboss.server.deploy.dir=C:/app/CMS/modules/server/wildfly/cls/content 

My understanding is that with -verbose:class set as above, I should be getting messages like:

[Opened C:\JDK8\jre\lib\rt.jar]
[Loaded java.lang.Object from C:\Program Files\JDK160~1\jre\lib\rt.jar]

inserted into my server.log. They aren't there.

Here's the contents of my logging subsystem:

<subsystem xmlns="urn:jboss:domain:logging:2.0">
    <console-handler name="CONSOLE">
        <level name="INFO"/>
        <formatter>
            <named-formatter name="COLOR-PATTERN"/>
        </formatter>
    </console-handler>
    <periodic-rotating-file-handler name="FILE" autoflush="true">
        <formatter>
            <named-formatter name="PATTERN"/>
        </formatter>
        <file relative-to="jboss.server.log.dir" path="server.log"/>
        <suffix value=".yyyy-MM-dd"/>
        <append value="true"/>
    </periodic-rotating-file-handler>
    <logger category="com.arjuna">
        <level name="WARN"/>
    </logger>
    <logger category="org.apache.tomcat.util.modeler">
        <level name="WARN"/>
    </logger>
    <logger category="org.jboss.as.config">
        <level name="DEBUG"/>
    </logger>
    <logger category="sun.rmi">
        <level name="WARN"/>
    </logger>
    <logger category="jacorb">
        <level name="WARN"/>
    </logger>
    <logger category="jacorb.config">
        <level name="ERROR"/>
    </logger>
    <logger category="com.empolis.ecls.server.j2ee.jca.impl">
        <level name="DEBUG"/>
    </logger>
    <root-logger>
        <level name="DEBUG"/>
        <handlers>
            <handler name="CONSOLE"/>
            <handler name="FILE"/>
        </handlers>
    </root-logger>
    <formatter name="PATTERN">
        <pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
    </formatter>
    <formatter name="COLOR-PATTERN">
        <pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
    </formatter>
</subsystem>
ArtOfWarfare
  • 20,617
  • 19
  • 137
  • 193
  • Why do you expect, these messages should appear in the log? I guess you should see them just in console output. I've just did in console "set JAVA_OPTS=-verbose:class" and then "standalone.bat", and I see tonns of such messages in the console. – NullPointer Mar 09 '16 at 21:36
  • You might be after adding TRACE logging for `org.jboss.modules` since it will be a modular class loading loading classes. – James R. Perkins Mar 10 '16 at 16:40
  • @JamesR.Perkins - Would that have given me the full paths to the jars? – ArtOfWarfare Mar 10 '16 at 17:25
  • It doesn't give you the JAR, but the module used which would be more valuable I think. In theory a module could have it's duplicate JAR's from another module. Here's an example: `10:52:16,113 TRACE [org.jboss.modules] (DeploymentScanner-threads - 1) Attempting to define class org.jboss.as.controller.access.TargetResource in Module "org.jboss.as.controller:main" from local module loader @33e5ccce (finder: local module finder @5a42bbf4 (roots: /home/jperkins/servers/wildfly-10.0.0.Final/modules,/home/jperkins/servers/wildfly-10.0.0.Final/modules/system/layers/base))` – James R. Perkins Mar 10 '16 at 18:54
  • @JamesR.Perkins - My issue was that I had separate classes with the same package and name being loaded from different jars. Using `-verbose:class` uncovered it. This doesn't look like it would have. – ArtOfWarfare Mar 10 '16 at 18:56
  • Well the `"org.jboss.as.controller:main"` is the module. So in one of the "roots" you'd have `org/jboss/as/controller/main` which would have a list of the JAR's. Though this maybe less helpful for a deployment now that I think about it :) – James R. Perkins Mar 10 '16 at 20:34

1 Answers1

5

It should work. On windows, edit standalone.conf.bat and add -verbose:class to JAVA_OPTS

(well this outputs it only to the console, but an easy workaround would be to redirect it to a file)

user140547
  • 7,750
  • 3
  • 28
  • 80
  • I'm not sure if this is a standard wildfly thing or not, but I was actually running it through an ant script. That ant script was spawning wildfly on a new, background thread, which was suppressing all the console output. Changed `spawn="true"` to `spawn="false"` in that ant script and it ended up outputing to the console. Add in a `> \app\classlist.log` and I got the exactly what I wanted. – ArtOfWarfare Mar 10 '16 at 00:42