[hornetq-commits] JBoss hornetq SVN: r12166 - trunk/hornetq-core/src/main/java/org/hornetq/utils.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Feb 22 23:40:29 EST 2012


Author: gaohoward
Date: 2012-02-22 23:40:27 -0500 (Wed, 22 Feb 2012)
New Revision: 12166

Modified:
   trunk/hornetq-core/src/main/java/org/hornetq/utils/VersionLoader.java
Log:
add extra debug info


Modified: trunk/hornetq-core/src/main/java/org/hornetq/utils/VersionLoader.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/utils/VersionLoader.java	2012-02-22 22:58:47 UTC (rev 12165)
+++ trunk/hornetq-core/src/main/java/org/hornetq/utils/VersionLoader.java	2012-02-23 04:40:27 UTC (rev 12166)
@@ -15,6 +15,8 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.net.URL;
+import java.net.URLClassLoader;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.Properties;
@@ -89,7 +91,18 @@
 
       return VersionLoader.version;
    }
-
+   
+   public static String getClasspathString() {
+      StringBuffer classpath = new StringBuffer();
+      ClassLoader applicationClassLoader = VersionImpl.class.getClassLoader();
+      URL[] urls = ((URLClassLoader)applicationClassLoader).getURLs();
+       for(int i=0; i < urls.length; i++) {
+           classpath.append(urls[i].getFile()).append("\r\n");
+       }    
+      
+       return classpath.toString();
+   }
+   
    private static Version load()
    {
       Properties versionProps = new Properties();
@@ -98,6 +111,7 @@
       {
          if (in == null)
          {
+            log.warn("Classpath: " + getClasspathString());
             throw new RuntimeException(VersionLoader.PROP_FILE_NAME + " is not available");
          }
          try



More information about the hornetq-commits mailing list