Very simple and straight forward.
However, as soon as I run the app, I get the following Error:
java.lang.InstantiationError: javax.jmdns.JmDNS
at
org.apache.log4j.net.Zeroconf4log4j.<clinit>(Zeroconf4log4j.java:23)
at
org
.apache.log4j.net.ZeroConfSocketHubAppender.activateOptions(ZeroConfS
ocketHubAppender.java:45)
Looking at the javadoc for that Error:
* Thrown when an application tries to use the Java <code>new</code>
* construct to instantiate an abstract class or an interface.
* <p>
* Normally, this error is caught by the compiler; this error can
* only occur at run time if the definition of a class has
* incompatibly changed.
My guess is that you have an incorrect version of the JmDNS library in
your classpath. Which version of jmdns are you using?
log4j-zeroconf requires:
[INFO] [dependency:tree]
[INFO] log4j:apache-log4j-zeroconf:jar:1.0-SNAPSHOT
[INFO] +- junit:junit:jar:3.8.1:test
[INFO] +- log4j:log4j:jar:1.2.16-SNAPSHOT:compile
[INFO] \- jmdns:jmdns:jar:1.0:compile
I now notice that JmDns has a 2.0 available, which is probably the
issue here. Could you download 1.0 and replace it (looking at
sourceforge, they don't appear to publish older jars, weird, if you
like I can send you the jmdns 1.0 jar in a separate, direct email)? I
'll go and play with JmDNS 2.0 to test compatibility with that. Since
log4j-zeroconf is not a released product yet, if 2.0 looks the goods,
I'll mark log4j-zeroconf to depend on that.
Paul