<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/">

  <channel rdf:about="http://simplericity.com/">
    <title>simplericity</title>
    <link>http://simplericity.com/</link>
    <description>Reducing software entropy</description>
    <items>
      <rdf:Seq>
        
        <rdf:li resource="http://simplericity.com/2009/11/10/1257880778509.html" />
        
        <rdf:li resource="http://simplericity.com/2009/03/10/1236710820000.html" />
        
        <rdf:li resource="http://simplericity.com/2009/01/02/1230894176938.html" />
        
      </rdf:Seq>
    </items>
  </channel>

  
  <item rdf:about="http://simplericity.com/2009/11/10/1257880778509.html">
    <title>Make your war file executable with the Jetty Console Maven plugin</title>
    <link>http://simplericity.com/2009/11/10/1257880778509.html</link>
    
      
        <description>
          &lt;p&gt;A while back I made a little Maven plugin that takes a war file and makes it executable. With executable I mean that it embeds a Jetty servlet container. Running java -jar myapp.war will deploy your war with the embedded Jetty instance.&lt;/p&gt;
&lt;p&gt;This provides a very convenient distribution method for Java web applications. It lets you distribute your application as a single artifact. Your users are no longer forced to install a big and ugly app server just to run your app. &lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;But if they really want to, the war is still a war file that can be deployed the &amp;quot;normal&amp;quot; way in Tomcat, Glassfish, Weblogic, Websphere or any servlet compliant web server. (You tell me you actually use Websphere? Seriously!?).&lt;/p&gt;
&lt;p&gt; With a single distribution in a single file, there&#039;s also less chance of your users getting confused about how to get your application running.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;a href=&#034;http://blogs.webtide.com/janb/&#034;&gt;Jan Bartel&lt;/a&gt; of Jetty fame asked for a link describing this plugin and since I didn&#039;t really have any thing useful, here&#039;s a blog post:&lt;/p&gt;
&lt;h2&gt;An example: The Puffin Secrets Webapp&lt;/h2&gt;
&lt;p&gt;Meet the Puffin Secrets webapp. This very small, yet very useful web application let us listen in on the puffins while they chat about Jetty:&lt;/p&gt;
&lt;img src=&#034;http://simplericity.com/images/jettyconsole/puffin-app.png&#034; alt=&#034;&#034; /&gt;&lt;br /&gt;
&lt;p&gt;Since puffins are a bit shy, we need to click the button to see what they really think about Jetty:&lt;/p&gt;
&lt;img src=&#034;http://simplericity.com/images/jettyconsole/puffin-app-love.png&#034; alt=&#034;&#034; /&gt;&lt;br /&gt;
&lt;p&gt;To make this war file executable, we need to add a bit of plugin configuration to our Maven pom.xml:&lt;/p&gt;
&lt;pre&gt;&lt;build&gt;&amp;lt;plugin&amp;gt;&lt;br /&gt;    &amp;lt;groupId&amp;gt;org.simplericity.jettyconsole&amp;lt;/groupId&amp;gt;&lt;br /&gt;    &amp;lt;artifactId&amp;gt;jetty-console-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;    &amp;lt;version&amp;gt;1.23&amp;lt;/version&amp;gt;&lt;br /&gt;    &amp;lt;executions&amp;gt;&lt;br /&gt;        &amp;lt;execution&amp;gt;&lt;br /&gt;            &amp;lt;goals&amp;gt;&lt;br /&gt;                &amp;lt;goal&amp;gt;createconsole&amp;lt;/goal&amp;gt;&lt;br /&gt;            &amp;lt;/goals&amp;gt;&lt;br /&gt;        &amp;lt;/execution&amp;gt;&lt;br /&gt;    &amp;lt;/executions&amp;gt;&lt;br /&gt;&amp;lt;/plugin&amp;gt;&lt;br /&gt;    &lt;/build&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;After running mvn clean install, we should now have a target directory looking like this:&lt;/p&gt;
&lt;img src=&#034;http://simplericity.com/images/jettyconsole/target-directory.png&#034; alt=&#034;&#034; /&gt;&lt;br /&gt;
&lt;p&gt;Notice the -jetty-console.war version of your war file. This war file is now runnable with java -jar (On a Mac it&#039;s actually double-clickable!). Running the war will start a little Swing console (unless run on a server):&lt;/p&gt;
&lt;img src=&#034;http://simplericity.com/images/jettyconsole/console.png&#034; alt=&#034;&#034; /&gt;&lt;br /&gt;
&lt;p&gt;The flies are there to remind you that you probably have bugs in your code. Still you might want to use a less generic background image. This can be done by adding the following configuration:&lt;/p&gt;
&lt;pre&gt;&lt;configuration&gt;&lt;br /&gt;&amp;lt;plugin&amp;gt;&lt;br /&gt;    &amp;lt;groupId&amp;gt;org.simplericity.jettyconsole&amp;lt;/groupId&amp;gt;&lt;br /&gt;    &amp;lt;artifactId&amp;gt;jetty-console-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;    &amp;lt;version&amp;gt;1.23&amp;lt;/version&amp;gt;&lt;br /&gt;    &amp;lt;executions&amp;gt;&lt;br /&gt;        &amp;lt;execution&amp;gt;&lt;br /&gt;            &amp;lt;goals&amp;gt;&lt;br /&gt;                &amp;lt;goal&amp;gt;createconsole&amp;lt;/goal&amp;gt;&lt;br /&gt;            &amp;lt;/goals&amp;gt;&lt;br /&gt;            &amp;lt;configuration&amp;gt;&lt;br /&gt;                &lt;strong&gt;&amp;lt;backgroundImage&amp;gt;${basedir}/src/main/jettyconsole/puffin.jpg&amp;lt;/backgroundImage&amp;gt;&lt;/strong&gt;&lt;br /&gt;            &amp;lt;/configuration&amp;gt;&lt;br /&gt;        &amp;lt;/execution&amp;gt;&lt;br /&gt;    &amp;lt;/executions&amp;gt;&lt;br /&gt;&amp;lt;/plugin&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/configuration&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;This gives us a much more puffin-relevant background:&lt;/p&gt;
&lt;img src=&#034;http://simplericity.com/images/jettyconsole/console-puffins.png&#034; alt=&#034;&#034; /&gt;&lt;br /&gt;
&lt;p&gt;The console is currently pretty simple. It allows the user to select a port and start the application. As a convenience the console will open a browser with the correct URL. This saves the user some seconds. (When demoing a product, seconds matter!)&lt;/p&gt;
&lt;h2&gt;Command line options&lt;/h2&gt;
&lt;p&gt;While the graphical console is nice for demoing an application or distributing it to testers, for installation on a server we need some command line interaction. You can see a list of available options by typing java -jar myapp.war --help&lt;/p&gt;
&lt;pre&gt;Usage: java org.simplericity.jettyconsole.JettyConsoleStarter [--option=value] [--option=value]&lt;br /&gt;&lt;br /&gt;Options:&lt;br /&gt; --sslProxied        - Running behind an SSL proxy&lt;br /&gt; --port n            - Create an HTTP listener on port n (default 8080)&lt;br /&gt; --bindAddress addr  - Accept connections only on address addr (default: accept on any address)&lt;br /&gt; --forwarded         - Set reverse proxy handling using X-Forwarded-For headers&lt;br /&gt; --contextPath /path - Set context path (default: /)&lt;br /&gt; --headless          - Don&#039;t open graphical console, even if available&lt;br /&gt; --help              - Print this help message&lt;br /&gt; --tmpDir /path      - Temporary directory, default is /tmp&lt;br /&gt;&lt;/pre&gt;
&lt;h2&gt;Plugins&lt;/h2&gt;
&lt;p&gt;The core of the Jetty console is intentionally kept as small as possible. Additional functionality can be included by adding plugins to your plugin configuration. You might want to add the log4j plugin: &lt;br /&gt;
&lt;/p&gt;
&lt;pre&gt;&lt;configuration&gt;&lt;additionaldependencies&gt;&lt;additionaldependency&gt;&amp;lt;configuration&amp;gt;&lt;br /&gt;    &amp;lt;backgroundImage&amp;gt;${basedir}/src/main/jettyconsole/puffin.jpg&amp;lt;/backgroundImage&amp;gt;&lt;br /&gt;    &amp;lt;additionalDependencies&amp;gt;&lt;br /&gt;        &lt;strong&gt;&amp;lt;additionalDependency&amp;gt;&lt;br /&gt;            &amp;lt;artifactId&amp;gt;jetty-console-log4j-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;        &amp;lt;/additionalDependency&amp;gt;&lt;/strong&gt;&lt;br /&gt;    &amp;lt;/additionalDependencies&amp;gt;&lt;br /&gt;&amp;lt;/configuration&amp;gt;&lt;artifactid&gt;&lt;/artifactid&gt;&lt;/additionaldependency&gt;&lt;/additionaldependencies&gt;&lt;br /&gt;&lt;/configuration&gt;&lt;/pre&gt;
&lt;p&gt;This should give you an extra option when running --help :&lt;/p&gt;
&lt;pre&gt;Usage: java org.simplericity.jettyconsole.JettyConsoleStarter [--option=value] [--option=value]&lt;br /&gt;&lt;br /&gt;Options:&lt;br /&gt; --sslProxied        - Running behind an SSL proxy&lt;br /&gt; --port n            - Create an HTTP listener on port n (default 8080)&lt;br /&gt; --bindAddress addr  - Accept connections only on address addr (default: accept on any address)&lt;br /&gt; --forwarded         - Set reverse proxy handling using X-Forwarded-For headers&lt;br /&gt; --contextPath /path - Set context path (default: /)&lt;br /&gt; --headless          - Don&#039;t open graphical console, even if available&lt;br /&gt; --help              - Print this help message&lt;br /&gt; --tmpDir /path      - Temporary directory, default is /tmp&lt;br /&gt; &lt;strong&gt;--logConfig file    - Read log4j configuration from file&lt;/strong&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;The other plugins currently available are:&lt;/p&gt;
&lt;strong&gt;ajp&lt;/strong&gt;: Lets you configure an AJP connector in Jetty&lt;br /&gt;
&lt;strong&gt;requestlog&lt;/strong&gt;: Allows you to log requests to an access log for traffic analysis&lt;br /&gt;
&lt;strong&gt;jsp&lt;/strong&gt;: Adds JSP support to your application&lt;br /&gt;
&lt;strong&gt;jettyxml&lt;/strong&gt;: Allows you to apply arbitrary Jetty XML configurations to your Server or WebAppContext&lt;br /&gt;
&lt;strong&gt;gzip&lt;/strong&gt;: Compresses your HTML, CSS and Javascript for bandwidth savings&lt;br /&gt;
&lt;p&gt;If the available plugins don&#039;t match your needs, it&#039;s quite easy to make your own and include it with in &amp;lt;additionalDependencies/&amp;gt;&lt;additionaldependencies&gt;. &lt;/additionaldependencies&gt;&amp;lt;additionalDependencies/&amp;gt;&lt;additionaldependencies&gt;&lt;additionaldependencies&gt; can also be used to add normal Maven dependencies, such as a database driver referred to in jetty.xml&lt;/additionaldependencies&gt;&lt;/additionaldependencies&gt;&lt;/p&gt;
&lt;h2&gt;Maven repository configuration&lt;/h2&gt;
&lt;p&gt;Since this plugin is not (yet) in the Maven Central repository, you&#039;ll need to add a pluginRepository to your pom.xml: &lt;br /&gt;
&lt;/p&gt;
&lt;pre&gt;&amp;lt;pluginRepositories&amp;gt;&lt;br /&gt;    &amp;lt;pluginRepository&amp;gt;&lt;br /&gt;        &amp;lt;id&amp;gt;kos&amp;lt;/id&amp;gt;&lt;br /&gt;        &amp;lt;url&amp;gt;http://opensource.kantega.no/nexus/content/groups/public/&amp;lt;/url&amp;gt;&lt;br /&gt;    &amp;lt;/pluginRepository&amp;gt;&lt;br /&gt;&amp;lt;/pluginRepositories&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;repositories&amp;gt;&lt;br /&gt;    &amp;lt;repository&amp;gt;&lt;br /&gt;        &amp;lt;id&amp;gt;kos&amp;lt;/id&amp;gt;&lt;br /&gt;        &amp;lt;url&amp;gt;http://opensource.kantega.no/nexus/content/groups/public/&amp;lt;/url&amp;gt;&lt;br /&gt;    &amp;lt;/repository&amp;gt;&lt;br /&gt;&amp;lt;/repositories&amp;gt;&lt;/pre&gt;
&lt;p&gt;The complete puffin example webapp is available in Subversion here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#034;http://simplericity.org/svn/simplericity/trunk/jetty-console-example/&#034;&gt;http://simplericity.org/svn/simplericity/trunk/jetty-console-example/&lt;/a&gt;&lt;/p&gt;
        </description>
      
      
    
  </item>
  
  <item rdf:about="http://simplericity.com/2009/03/10/1236710820000.html">
    <title>Back from a fantastic Java Posse Roundup 2009</title>
    <link>http://simplericity.com/2009/03/10/1236710820000.html</link>
    
      
        <description>
          &lt;p&gt; After a 30 hours, 5 flights travel, last night I finally made it home from the Java Posse Roundup in lovely Crested Butte, Colorado. After sleeping for 13 hours I&#039;m now feeling quite good.&lt;/p&gt;
&lt;p&gt;&lt;img align=&#034;right&#034; src=&#034;http://simplericity.com/images/jpr09/cb.jpg&#034; alt=&#034;&#034; /&gt;Although I suffered jet lag, got a cold and had altitude induced headaches and nosebleeds I must say this was an absolutely awesome conference experience.  &lt;/p&gt;
&lt;p&gt; Day Zero was the alternative languages day. I enjoyed learning about Scala and LINQ, but after lunch I used my two feet and joined the JavaFX dojo. During lunch break I discussed lightning talks with Tor and Joe and we ended up spending the rest of the day creating a lightning talk timer application. Sitting next to Tor trying to keep up with his JavaFX hacking was very fun. I learned more JavaFX in a couple of hours than I probably would on a week on my own.  &lt;/p&gt;
&lt;p&gt; Tuesday through friday we had open space discussions on a wide variety of Java and software related topics. We had three or four sessions at the same time, so I&#039;m looking forward to hear the ones I missed on the Java Posse podcast. By wednesday I had unfortunately lost my voice due to a cold. This turns out to be a serious handicap on an open space conference. Although I wasn&#039;t able to contribute much in the discussion I still had a great experience and I learned a lot. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#034;http://simplericity.com/images/jpr09/recording.jpg&#034; alt=&#034;&#034; /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The evening &lt;a href=&#034;http://joelneely.wordpress.com/2009/03/06/jpr-2009-thursday-lightning-talks/&#034;&gt;lightning talks&lt;/a&gt;&amp;nbsp; was a great success and we had no trouble filling the slots. The mix of Java and non-technical talks worked out really well. I initially thought five minutes would be too tight, but it allowed for more talks and people really had to stay focused to get their points through. My personal highlight would be James Ward&#039;s Flex UI demos and Andrew Harmel Law&#039;s talk about zombies. &lt;/p&gt;
&lt;p&gt; Crested Butte was a very nice town for this kind of conference. Many of us rented houses around town which turned out to be a great way of getting to know people. Many people went downhill or snowmobiling, but because of my cold I decided cross country skiing would be enough of a challenge. So I had a couple of really nice skiing sessions, here&#039;s a picture from one of them with Dave Briccetti, Dianne Marsh, Dick Wall and Joel Neely:&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;&lt;img src=&#034;http://simplericity.com/images/jpr09/xc.jpg&#034; alt=&#034;&#034; /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Waiting for my connecting flight in Denver I just had to take this picture:&lt;/p&gt;
&lt;img alt=&#034;&#034; src=&#034;http://simplericity.com/images/jpr09/wiperchange.jpg&#034; /&gt;
&lt;p&gt;Seems like the guy is trying to replace the wiper blades of the plane by leaning out the window. Eventually he gave up and a few minutes later a guy with a lift came and finished the job. &lt;br /&gt;
&lt;/p&gt;
        </description>
      
      
    
  </item>
  
  <item rdf:about="http://simplericity.com/2009/01/02/1230894176938.html">
    <title>Slf4j on Glassfish: When smart ideas collide</title>
    <link>http://simplericity.com/2009/01/02/1230894176938.html</link>
    
      
        <description>
          Have you ever noticed how two ideas can seem really smart one by one, but not all that great when combined?&lt;br /&gt;
&lt;br /&gt;
I recently tried to install &lt;a href=&#034;http://nexus.sonatype.org&#034;&gt;Nexus&lt;/a&gt;, the excellent Maven repository manager from &lt;a href=&#034;http://sonatype.com&#034;&gt;Sonatype&lt;/a&gt;. (And by the way: Every organization using Maven needs a repository manager and Nexus is the best one out there!)&lt;br /&gt;
&lt;br /&gt;
A secondary goal of the project I was working on was to get some exerience using &lt;a href=&#034;https://glassfish.dev.java.net/&#034;&gt;Glassfish&lt;/a&gt;. But sadly, Nexus failed to deploy on Glassfish:&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&#034;http://simplericity.com/images/glassfish_slf4j/stackoverflow.png&#034; alt=&#034;&#034; /&gt;&lt;br /&gt;
&lt;br /&gt;
All I got was this error message in the admin console. A closer look in the Glassfish logs didn&#039;t reveal any stacktrace or relevant messages. Since my project was a pretty busy one, I soon gave up and found another way to run Nexus.&lt;br /&gt;
&lt;br /&gt;
A couple of days ago however, I decided to find out what caused the StackOverflowError. I restarted Glassfish with debugging enabled and attached IntelliJ IDEA&#039;s debugger to it. After setting an exception breakpoint it was easy to see what was really happening under the hood.&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&#034;http://simplericity.com/images/glassfish_slf4j/exceptionbreakpoint.png&#034; alt=&#034;&#034; /&gt;&lt;br /&gt;
&lt;br /&gt;
I redeployed and got a stacktrace starting with this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;httpWorkerThread-4848-1@1033 daemon, priority=10, in group &#039;Grizzly&#039;, status: &#039;RUNNING&#039;&lt;br /&gt;at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:491)&lt;br /&gt;at java.lang.StringBuffer.append(StringBuffer.java:302)&lt;br /&gt;at org.apache.log4j.helpers.ISO8601DateFormat.format(ISO8601DateFormat.java:132)&lt;br /&gt;at java.text.DateFormat.format(DateFormat.java:314)&lt;br /&gt;at org.apache.log4j.helpers.PatternParser$DatePatternConverter.convert(PatternParser.java:444)&lt;br /&gt;at org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:64)&lt;br /&gt;at org.apache.log4j.PatternLayout.format(PatternLayout.java:503)&lt;br /&gt;at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:301)&lt;br /&gt;at org.apache.log4j.WriterAppender.append(WriterAppender.java:159)&lt;br /&gt;at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)&lt;br /&gt;at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)&lt;br /&gt;at org.apache.log4j.Category.callAppenders(Category.java:203)&lt;br /&gt;at org.apache.log4j.Category.forcedLog(Category.java:388)&lt;br /&gt;at org.apache.log4j.Category.log(Category.java:853)&lt;br /&gt;at org.slf4j.impl.Log4jLoggerAdapter.log(Log4jLoggerAdapter.java:597)&lt;br /&gt;at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:169)&lt;br /&gt;at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:242)&lt;br /&gt;at java.util.logging.Logger.log(Logger.java:452)&lt;br /&gt;at java.util.logging.Logger.doLog(Logger.java:474)&lt;br /&gt;at java.util.logging.Logger.logp(Logger.java:590)&lt;br /&gt;at com.sun.common.util.logging.LoggingOutputStream.flush(LoggingOutputStream.java:90)&lt;br /&gt;at java.io.PrintStream.write(PrintStream.java:414)&lt;br /&gt;at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)&lt;br /&gt;at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(StreamEncoder.java:395)&lt;br /&gt;at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:136)&lt;br /&gt;at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:146)&lt;br /&gt;at java.io.OutputStreamWriter.write(OutputStreamWriter.java:204)&lt;br /&gt;at java.io.Writer.write(Writer.java:126)&lt;br /&gt;at org.apache.log4j.helpers.QuietWriter.write(QuietWriter.java:47)&lt;br /&gt;at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:301)&lt;br /&gt;at org.apache.log4j.WriterAppender.append(WriterAppender.java:159)&lt;br /&gt;at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)&lt;br /&gt;at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)&lt;br /&gt;at org.apache.log4j.Category.callAppenders(Category.java:203)&lt;br /&gt;at org.apache.log4j.Category.forcedLog(Category.java:388)&lt;br /&gt;at org.apache.log4j.Category.log(Category.java:853)&lt;br /&gt;at org.slf4j.impl.Log4jLoggerAdapter.log(Log4jLoggerAdapter.java:597)&lt;br /&gt;at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:169)&lt;br /&gt;at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:242)&lt;br /&gt;at java.util.logging.Logger.log(Logger.java:452)&lt;br /&gt;at java.util.logging.Logger.doLog(Logger.java:474)&lt;br /&gt;at java.util.logging.Logger.logp(Logger.java:590)&lt;br /&gt;at com.sun.common.util.logging.LoggingOutputStream.flush(LoggingOutputStream.java:90)&lt;br /&gt;	 &lt;br /&gt;&lt;/pre&gt;
and then about 1000 more lines of the same. There was clearly some kind of loop in the logging system that eventually caused the StackOverflowError. How could this happen?&lt;br /&gt;
&lt;br /&gt;
I knew Nexus was using SLF4J, the &lt;a href=&#034;http://www.slf4j.org/&#034;&gt;Simple Logging Facade for Java&lt;/a&gt;. SLF4J was set up to log to &lt;a href=&#034;http://www.slf4j.org/&#034;&gt;Log4J&lt;/a&gt;. And Log4J was set up with a &lt;a href=&#034;http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/ConsoleAppender.html&#034;&gt;ConsoleAppender&lt;/a&gt;. From the stracktrace I could tell that Log4J wasn&#039;t printing its output to the console, but to a LoggingOutputStream. Some googling revealed that LoggingOutputStream is set up by Glassfish &lt;a href=&#034;http://blogs.sun.com/nickstephen/entry/java_redirecting_system_out_and&#034;&gt;to catch any output to System.out&lt;/a&gt; and redirect it to the Java Logging API (JUL).&lt;br /&gt;
&lt;br /&gt;
So Log4J was obviously feeding its log lines into what it thought was the console while it was actually fed into the Java Logging API instead. But why did this cause a loop?&lt;br /&gt;
&lt;br /&gt;
The answer is found a few lines up the stacktrace in a class called &lt;a href=&#034;http://www.slf4j.org/api/org/slf4j/bridge/SLF4JBridgeHandler.html&#034;&gt;SLF4JBridgeHandler&lt;/a&gt;. This class installs a bridge that will redirect all logs from the Java Logging API back to SLF4J. Which is pretty smart thing to do if you have code logging to JUL, but you want all code to log to be handled throgh SLF4J instead. Combined with Glassfish&#039;s LoggingOutputStream however, it caused an infinite loop:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;The Nexus application code logs to SLF4J&lt;/li&gt;
    &lt;li&gt;SLF4J logs to Log4J&lt;/li&gt;
    &lt;li&gt;Log4J writes its log lines to System.out through the configured ConsoleAppender&lt;/li&gt;
    &lt;li&gt;The log lines are processed by Glassfish&#039;s LoggingOutputStream and sent to Java Logging&lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;Java Logging sends its logs to SLF4J because of the SLF4JBridgeHandler.&lt;/li&gt;
    &lt;li&gt;SLF4J logs to.. Wait.. Houston, we have a problem!&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
So the next time you come up an idea you think is really smart, take a minute or two to consider the possibility that right now, somewhere else in the world, someone else might be thinking about an equally smart idea that when combined with yours will make the world explode.&lt;br /&gt;
&lt;br /&gt;
This issue is reported in the Nexus issue tracker as &lt;a href=&#034;https://issues.sonatype.org/browse/NEXUS-1307&#034;&gt;NEXUS-1307&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&#034;http://simplericity.com/images/glassfish_slf4j/served.jpg&#034; alt=&#034;&#034; /&gt;
        </description>
      
      
    
  </item>
  

</rdf:RDF>
