| From | Sent On | Attachments |
|---|---|---|
| pete...@css.ch | Feb 8, 2012 12:35 am | |
| Evgeny Mandrikov | Feb 8, 2012 1:08 am | |
| pete...@css.ch | Feb 8, 2012 5:56 am | |
| Evgeny Mandrikov | Feb 8, 2012 11:13 pm | |
| pete...@css.ch | Feb 9, 2012 1:30 am | |
| Evgeny Mandrikov | Feb 9, 2012 2:36 am | |
| pete...@css.ch | Feb 9, 2012 10:23 am | |
| pete...@css.ch | Feb 10, 2012 3:08 am | |
| Evgeny Mandrikov | Feb 10, 2012 2:37 pm |
| Subject: | Re: Re: [sonar-user] Re:Re: [sonar-user] Antwort: Re: [sonar-user] IllegalStateException: Can not create ClassLoader | |
|---|---|---|
| From: | pete...@css.ch (pete...@css.ch) | |
| Date: | Feb 10, 2012 3:08:52 am | |
| List: | org.codehaus.sonar.user | |
Hi
My guess about <trycatch> was right: The stacktrace is eaten and only the exception message is logged (unfortunately, not even debug or verbose flags changes that).
Removing <trycatch> I get the following output now:
[sonar:sonar] 10:56:58.559 INFO Java bytecode scan... [sonar:sonar] 10:56:58.570 DEBUG ----- Classpath analyzed by Squid: [sonar:sonar] 10:56:58.571 DEBUG /tools/IBM/RAD75/runtimes/base_v61/runtimes/com.ibm.ws.admin.client_6.1.0.jar [..] [sonar:sonar] 10:56:58.869 DEBUG /tools/IBM/RAD75/runtimes/base_v61/java/jre/lib/xml.jar [sonar:sonar] 10:56:58.870 DEBUG ----- [sonar:sonar] 10:56:59.150 DEBUG Delete temporary directory: /home/TU_bldadm/buildAgent/temp/buildTmp/sonar-batch40161437811707724701328867798207088000 [sonar:sonar] java.lang.IllegalStateException: Can not create ClassLoader [sonar:sonar] Class org.apache.tools.ant.taskdefs.Javac loaded from parent loader (parentFirst) [sonar:sonar] Finding class org.codehaus.groovy.ant.GroovycTask [antcall] The following error occurred while executing this line: /appdata/repo/tools/sonarcss-ant/debug/ant/targets.opt.sonar.xml:79: java.lang.IllegalStateException: Can not create ClassLoader [ant] The following error occurred while executing this line: /home/TU_bldadm/buildAgent/work/bea_build/build.xml:71: The following error occurred while executing this line: /appdata/repo/tools/sonarcss-ant/debug/ant/targets.opt.sonar.xml:79: java.lang.IllegalStateException: Can not create ClassLoader Ant output: at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.Project.executeTarget(Project.java:1368) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.apache.tools.ant.Main.runBuild(Main.java:809) at org.apache.tools.ant.Main.startAnt(Main.java:217) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) Caused by: java.util.zip.ZipException: Too many open files /home/TU_bldadm/buildAgent/work/bea_build/sandbox/bea_common/build/3rd/lib/leistung_xml_dde.jar at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:259) at java.util.jar.JarFile.<init>(JarFile.java:174) at java.util.jar.JarFile.<init>(JarFile.java:139) at org.sonar.java.bytecode.loader.JarLoader.<init>(JarLoader.java:46) at org.sonar.java.bytecode.loader.SquidClassLoader.<init>(SquidClassLoader.java:48) at org.sonar.java.bytecode.ClassLoaderBuilder.create(ClassLoaderBuilder.java:60) ... 77 more
Seems like this build opens to many files. ulimit -n gives me a OS limit of 8192 open files.
=> Possible root causes: - a limit on open files that is too low - code that does not properly close files after using them (e. g. some steps before bytecode scan like Java source code import or AST scan leave files open)
What do you suggest (I'd rather not increase the OS limits if I there are other ways to fix that).
Regards
Peter
___________________________________________________________________
Peter Waldispühl IAAE Informatiker CSS Versicherung Tribschenstrasse 21 / Postfach 2568 CH-6002 Luzern Telefon ++41 (0)58 277 17 32 Telefax ++41 (0)58 277 12 12 pete...@css.ch www.css.ch
___________________________________________________________________
CSS Kranken-Versicherung AG, CSS Versicherung AG, INTRAS Kranken-Versicherung AG, INTRAS Versicherung AG, Arcosana AG
Peter Waldispühl/Notes/CSS schrieb am 09.02.2012 19:24:09:
Von: Peter Waldispühl/Notes/CSS An: us...@sonar.codehaus.org, Datum: 09.02.2012 19:24 Betreff: Antwort: Re: [sonar-user] Re:Re: [sonar-user] Antwort: Re: [sonar-user] IllegalStateException: Can not create ClassLoader
Hi
I've asked for stack-trace whereas I don't see stack-trace in your log. Which Ant option did you used ? Could you try "ant -v" (extra verbose) ? In order to be clear : exception which you see just wraps another one and would be better to find a line of code where original cause was thrown.
Sorry, but that is exactly what I get when using ant -v -d (i. e. extra verbose & debug; BTW: ant is version 1.8.1). => Either 1) the stack trace is not logged at all or 2) the <trycatch> construct that I use in the ant wrapper (to prevent builds to fail in case sonar is not available or analysis fails) consumes the exception and only logs the exception message.
I will have to modify the ant wrapper to check (2). Updates follow ..
Peter





