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 Wed, 21 Jan 2009 02:55:34 GMT
>> 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
>>

You're definitely using 2.0, I get that same problem.  See [1] below  
with the diff to the log4j-zeroconf that will make it compatible with  
JmDNS 2.0, however this upgrade comes with the side affect that the  
JmDNS 2.0 jar is compiled with 1.6 source/binary compatibility.  If we  
upgraded log4j-zeroconf to use JmDNS 2.0, that would effectively  
mandate it to also require 1.6 (currently you can get it to work on  
JRE 1.2).

I'm going to contact the JmDNS authors to see if they can spin out a  
new release with JRE backwards compatibility (I can't see why not at a  
minimum 1.4 support).

Paul


[1]
Index: src/main/java/org/apache/log4j/net/Zeroconf4log4j.java
===================================================================
--- src/main/java/org/apache/log4j/net/Zeroconf4log4j.java	(revision  
693655)
+++ src/main/java/org/apache/log4j/net/Zeroconf4log4j.java	(working  
copy)
@@ -44,7 +44,7 @@
      public static synchronized JmDNS getInstance() {
          if (instance == null) {
              try {
-                instance = new JmDNS();
+                instance = JmDNS.create();
              } catch (Exception e) {
                  throw new RuntimeException(
                          "Failed to create an instance of JmDNS", e);
Index: src/main/java/org/apache/log4j/net/ZeroConfSocketHubAppender.java
===================================================================
--- src/main/java/org/apache/log4j/net/ZeroConfSocketHubAppender.java	 
(revision 693655)
+++ src/main/java/org/apache/log4j/net/ZeroConfSocketHubAppender.java	 
(working copy)
@@ -80,7 +80,7 @@
      }

      private ServiceInfo buildServiceInfo() {
-        return new ServiceInfo(zeroConfZone, getName(), actualPortUsed,
+        return ServiceInfo.create(zeroConfZone, getName(),  
actualPortUsed,
                  "SocketHubAppender on port " + this.actualPortUsed);
      }

Index: pom.xml
===================================================================
--- pom.xml	(revision 693655)
+++ pom.xml	(working copy)
@@ -83,8 +83,8 @@
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
-            <source>1.2</source>
-            <target>1.1</target>
+            <source>1.6</source>
+            <target>1.6</target>
          </configuration>
        </plugin>
  	  <plugin>
@@ -218,7 +218,7 @@
      <dependency>
        <groupId>jmdns</groupId>
        <artifactId>jmdns</artifactId>
-      <version>1.0</version>
+      <version>2.0</version>
      </dependency>
    </dependencies>
    <reporting>


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