logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Smith <psm...@aconex.com>
Subject Re: Can't get basic Zeroconf example to work.
Date Tue, 20 Jan 2009 21:32:31 GMT
> 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.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message