Showing posts with label classes. logging. Show all posts
Showing posts with label classes. logging. Show all posts

29 September 2017

JBAS015009: Scan found incompletely copied file content for deployment on JBoss 6.x

Seems I got back in business, so that means....new material to share!

While developing application packaged as .war and using some automation for app deployment to remote JBoss instance (be it somewhere in the cloud or local virtual machine), you might run into this error reported in JBoss console log.

JBAS015009: Scan found incompletely copied file content for deployment

I assume that you are using auto-deploy feature in your Jboss, when it is supposed to pick up changed artifact on the fly.

The error basically might mean two things: that your file might have got corrupted while transferring (which is rather unlikely, but worth checking) or just JBoss sees it "corrupted".

The latter can be caused by your .war file exceeding some threshold size, which triggers this awkward dependency: your automation starts transferring file, JBoss notices the changed file but as it hasn't finished transferring, auto-deploy recognizes it as "corrupted" and drops the ball (at least that happens in EAP Version 6.3.2.GA which I'm using) and never attempts to deploy again.

In my case this started happening when .war size jumped from 7.5M to 18M (adding some 10M heavy dependencies).

The way around this problem was increasing scan interval value from 5sec to 15sec in your Core -> Deployment scanners -> default setting screen:

which, I believe, gives enough time for complete scp file transfer between my IDE and JBoss virtual machine. Ever since, it has been working for me like a charm.

Hope this helps, good luck!


02 October 2013

WAS 8.5 Trace missing - SLF4J: Class path contains multiple SLF4J bindings

It's been quite long since I posted here. Yet I have one new tip for you today:

The problem was that WebSphere 8.5 server did not recognize components to trace after application deployment, and after finally appearing in the traceable components tree did not log all expected output to trace log. As a result we wasn't able to troubleshoot the installation, not to mention that some of the log output was required by defined use cases of the designed solution.


After some search, asking here and there, a colleague of mine (thanks, Agnieszka!) noticed the following entries in the SystemOut.log file of the server when the troublesome application was deployed:


10/2/13 13:42:10:331 CEST] 00000042 SystemErr     R   SLF4J: Class path contains multiple SLF4J bindings.
[10/2/13 13:42:10:331 CEST] 00000042 SystemErr     R   SLF4J: Found binding in [bundleresource://243.fwk-1319487885:1/org/slf4j/impl/StaticLoggerBinder.class]
[10/2/13 13:42:10:331 CEST] 00000042 SystemErr     R   SLF4J: Found binding in [wsjar:file:/opt/ibm/WebSphere/AppServer/profiles/AppSrv01/installedApps/localhostNode01Cell/xxxxx/lib/slf4j-jdk14-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[10/2/13 13:42:10:332 CEST] 00000042 SystemErr     R   SLF4J: Found binding in [wsjar:file:/opt/ibm/WebSphere/AppServer/profiles/AppSrv01/installedApps/localhostNode01Cell/xxxxx/lib/slf4j-log4j12-1.7.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
[10/2/13 13:42:10:332 CEST] 00000042 SystemErr     R   SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
[10/2/13 13:42:10:357 CEST] 00000042 SystemErr     R   SLF4J: Actual binding is of type [org.slf4j.impl.JDK14LoggerFactory]

and apparently this was causing the server to make wrong class pickup the logging (and hence missing output as that class missed appropriate configuration).

I came up with the idea of removing one of the conflicting classes from ear with console option "Remove file" and selecting whole jar (lib/slf4j-log4j12-1.7.2.jar). After application restart logging started to work as expected!


Good luck!


Env: WebSphere 8.5.0.2 ND, Linux rhel 6 64bit, application build with Maven (some predefined class includes defined).