[jboss-user] [JBoss Microcontainer] - How to re-compile a class loader

lavot do-not-reply at jboss.com
Wed Jul 4 15:06:13 EDT 2012


lavot [https://community.jboss.org/people/lavot] created the discussion

"How to re-compile a class loader"

To view the discussion, visit: https://community.jboss.org/message/746164#746164

--------------------------------------------------------------
Hi,

I'm completely new here. I've been requested to help to improve perf on a project that runs under jboss 5.1.0.
We've done a jstack and most of the threads that run our code are blocked in the class loader in loadClass(). I've downloaded 2.09.GA jar of the class loader which seemed to improve a little the perf but now most of the threads are blocked in doLoad().
I've activated the traces for BaseClassLoader to try to understand which classes are loaded as after a few minutes of execution, I would have expected that all the classes would have been already loaded.
And that seems to be true as far as I saw:
2012-07-03 14:21:46,429 [WorkManager(2)-3] TRACE org.jboss.classloader.spi.base.BaseClassLoader - BaseClassLoader at c9447{vfszip:/opt/ESG/absapp/jboss-5.1.0.GA/server/prime/deploy/prime-cap-sms-ejb.jar/} loadClass ...capabilities.common.adapter.CapOutgoingAdapterApi resolve=false

2012-07-03 14:21:46,431 [WorkManager(2)-3] TRACE org.jboss.classloader.spi.base.BaseClassLoader - BaseClassLoader at c9447{vfszip:/opt/ESG/absapp/jboss-5.1.0.GA/server/prime/deploy/prime-cap-sms-ejb.jar/} already loaded class interface ...capabilities.common.adapter.CapOutgoingAdapterApi{cl=BaseClassLoader at c9447{vfszip:/opt/ESG/absapp/jboss-5.1.0.GA/server/prime/deploy/prime-cap-sms-ejb.jar/} codeSource=(jar:file:/opt/ESG/absapp/jboss-5.1.0.GA/server/prime/deploy/prime-cap-sms-ejb.jar!/ <no signer certificates>)}

Therefore, I don't understand why my class loader goes to doLoad() and then there gets blocked on the synchronize.

So, after that long introduction, here is my point. I'd like to understand better what is done in the class loader. So, I've decided to recompile a class loader with more traces but I failed. Could someone help me ?

I checked out the code:
c:\Program Files (x86)\Apache-Subversion-1.7.5\bin\svn.exe" co  http://anonsvn.jboss.org/repos/jbossas/projects/jboss-cl/tags/2.0.9.GA http://anonsvn.jboss.org/repos/jbossas/projects/jboss-cl/tags/2.0.9.GA 2.0.9.GA

And tried to compile:
mvn clean install
And got what I didn't understand:
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   JBoss ClassLoader Parent POM
[INFO]   JBoss ClassLoader
[INFO]   JBoss ClassLoading
[INFO]   JBoss ClassLoading VFS
[INFO]   JBoss ClassLoader Distribution Build
[INFO] ------------------------------------------------------------------------
[INFO] Building JBoss ClassLoader Parent POM
[INFO]    task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] [enforcer:enforce {execution: enforce-plugin-versions}]
[INFO] [enforcer:enforce {execution: enforce-java-version}]
[INFO] [enforcer:enforce {execution: enforce-maven-version}]
[INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
[INFO] [source:jar-no-fork {execution: attach-sources}]
[INFO] [install:install {execution: default-install}]
[INFO] Installing C:\Users\Lionel\Documents\Dev\JBOSS_CL\2.
0.9.GA\pom.xml to C:\Users\Lionel\Documents\M2_REPO\reposit
ory\org\jboss\cl\jboss-cl\2.0.9.GA\jboss-cl-2.0.9.GA.pom
[INFO] ------------------------------------------------------------------------
[INFO] Building JBoss ClassLoader
[INFO]    task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting file set: C:\Users\Lionel\Documents\Dev\JBO
SS_CL\2.0.9.GA\classloader\target (included: [**], excluded: [])
[INFO] [enforcer:enforce {execution: enforce-plugin-versions}]
[INFO] [enforcer:enforce {execution: enforce-java-version}]
[INFO] [enforcer:enforce {execution: enforce-maven-version}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Lionel\Documents\
Dev\JBOSS_CL\2.0.9.GA\classloader\src\main\resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 52 source files to C:\Users\Lionel\Documents\
Dev\JBOSS_CL\2.0.9.GA\classloader\target\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

could not parse error message: warning: [options] bootstrap class path not set i
n conjunction with -source 1.5
C:\Users\Lionel\Documents\Dev\JBOSS_CL\2.0.9.GA\classloader
\src\main\java\org\jboss\classloader\spi\base\BaseClassLoader.java:115: warning:
 [deprecation] isDebugEnabled() in Logger has been deprecated
      if (log.isDebugEnabled())
             ^

C:\Users\Lionel\DocumentsDev\JBOSS_CL\2.0.9.GA\classloader
\src\main\java\org\jboss\classloader\test\support\IsolatedClassLoaderTest.java:[
61,22] error: name clash: suite(Class<?>) in IsolatedClassLoaderTest and suite(C
lass) in AbstractTestCaseWithSetup have the same erasure, yet neither hides the
other


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Wed Jul 04 21:02:32 CEST 2012
[INFO] Final Memory: 32M/342M
[INFO] ------------------------------------------------------------------------


Thanks for help.
Lionel
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/746164#746164]

Start a new discussion in JBoss Microcontainer at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2114]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120704/e98e2361/attachment-0001.html 


More information about the jboss-user mailing list