[wildfly-dev] classloading problem prevents Wildfly from running (Wildfly 10.1, LogManager, IBM JDK8, yajsw)

Will Milspec will.milspec at gmail.com
Wed Oct 26 10:20:31 EDT 2016


Hi all,

I've run into a classloading problem that prevents wildfly 10.1 from
running with the following stack:

-Wildfly 10.1
-IBM JDK 8 (the latest, 8.0-3.12)
-YAJSW ("Yet Another Java Service Wrapper")
-Ubuntu 14.04 linux AMD 64

LogManager Classloader check fails with IBMJDK8 and YAJSW
==========================================================
This stack fails because wildfly/jboss thinks the logManager is not loaded
properly.

Wildfly concludes as such because this check returns true:
     if (LogManager.getLogManager().getClass() == LogManager.class) {

To clarify:  with this tech stack, the system classloader loads both
LogManager.getLogManager() and LogManager.class. Thus the two classes are
identical, i.e. "=="

I'll call this stack:
Stack1) IBMJDK8 and Yajsw

Log Manager Classloader check succeeds with other stacks
==========================================================
This 'class==" check succeeds (returns false) in all other stacks I've
tested with Wildfly 10.1

Stack2) IBMJDK8 from the command line (no yasw)
Stack3) Oracle JDK8 with yajsw
Stack4) Oracle JDK8 from the command line (no yajsw)


With stacks 2-4, the jboss-module-classloader loads
"LogManager.getLogManager()", whereas the system classloader loads
"LogManager.class"

I have no idea why the difference, i.e. why "ibmjdk8 and yajsw" uses
"system classloader" to load LogManager.getLogManager and why the
difference for the other stacks.

Note that between "Stack1" and "Stack2", I only changed "which java
command". All other configurations are identical.

Code Details: Where this check occurs
=============================
I've searched the wildfly code and found this check in two places:
   jboss-modules: Main.java
   wildfly-core: LoggingExtension.java

I may have missed something. (I checked the versions in the
shipped-with-wildfly-10.1 jar, cloned the various git repos and checked out
the corresponding versions for jboss-modules and wildlfy-core)

Xref, Xpost
===================
As this problem has several components, I've posted it in a few places:
yajsw forums, ibm jdk forums etc.

Yeah, I know cross-posting is bad form. Mea culpa. But as user, I did not
know (and still don't) if the problem lies in "yajsw code" or
"wildfly/jboss code" or in the IBM JDK. This is "low-level stuff"

Other posts (same information):
https://www.ibm.com/developerworks/community/forums/html/topic?id=8e9e4ae2-53a7-42e8-8086-6208b80e2910&ps=25

https://sourceforge.net/p/yajsw/discussion/810311/thread/e730451b/?limit=25


Questions
=====================
-Any workarounds? (i've tried all sorts of tweaks, all dead end)

-Any idea why the difference, i.e. why would systemclassloader load
"LogManager.getLogManager()" with "Stack1" vs "Stacks2-4"

thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20161026/f04da732/attachment.html 


More information about the wildfly-dev mailing list