Index: src/java/org/apache/nutch/crawl/Generator.java
===================================================================
--- src/java/org/apache/nutch/crawl/Generator.java	(revision 576540)
+++ src/java/org/apache/nutch/crawl/Generator.java	(working copy)
@@ -184,7 +184,15 @@
         Text url = entry.url;
 
         if (maxPerHost > 0) {                     // are we counting hosts?
-          URL u = new URL(url.toString());
+          URL u = null;
+	
+	  try {
+		 u = new URL(url.toString());
+	  } catch (java.net.MalformedURLException e) {
+		LOG.warn("Bad protocol on url: " + url.toString());
+		continue;
+	  }
+
           String host = u.getHost();
           if (host == null) {
             // unknown host, skip
