bloritsch 00/12/13 08:44:09
Modified: src/org/apache/cocoon/components/classloader Tag:
xml-cocoon2 RepositoryClassLoader.java
src/org/apache/cocoon/sitemap Tag: xml-cocoon2 Handler.java
Log:
Logging trying to track down errors.
Revision Changes Path
No revision
No revision
1.1.2.13 +2 -2
xml-cocoon/src/org/apache/cocoon/components/classloader/Attic/RepositoryClassLoader.java
Index: RepositoryClassLoader.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/components/classloader/Attic/RepositoryClassLoader.java,v
retrieving revision 1.1.2.12
retrieving revision 1.1.2.13
diff -u -r1.1.2.12 -r1.1.2.13
--- RepositoryClassLoader.java 2000/12/13 14:46:24 1.1.2.12
+++ RepositoryClassLoader.java 2000/12/13 16:44:06 1.1.2.13
@@ -24,7 +24,7 @@
* A class loader with a growable list of path search directories
*
* @author <a href="mailto:[EMAIL PROTECTED]">Ricardo Rocha</a>
- * @version CVS $Revision: 1.1.2.12 $ $Date: 2000/12/13 14:46:24 $
+ * @version CVS $Revision: 1.1.2.13 $ $Date: 2000/12/13 16:44:06 $
*/
class RepositoryClassLoader extends ClassLoader {
/**
@@ -118,7 +118,7 @@
try {
c = findSystemClass(name);
} catch (ClassNotFoundException e) {
- log.debug("Could not load class " + name + "trying to load from the
repository");
+ log.debug("Could not load class " + name + " trying to load from the
repository");
byte[] bits = this.loadClassData (name);
if (bits == null) {
No revision
No revision
1.1.2.8 +13 -6
xml-cocoon/src/org/apache/cocoon/sitemap/Attic/Handler.java
Index: Handler.java
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/Handler.java,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -u -r1.1.2.7 -r1.1.2.8
--- Handler.java 2000/12/08 20:40:31 1.1.2.7
+++ Handler.java 2000/12/13 16:44:08 1.1.2.8
@@ -35,7 +35,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
- * @version CVS $Revision: 1.1.2.7 $ $Date: 2000/12/08 20:40:31 $
+ * @version CVS $Revision: 1.1.2.8 $ $Date: 2000/12/13 16:44:08 $
*/
public class Handler implements Runnable, Configurable, Composer, Processor {
protected Logger log = LogKit.getLoggerFor("cocoon");
@@ -56,7 +56,8 @@
private Exception exception;
/** the managed sitemap */
- private Sitemap sitemap;
+
+ private Sitemap sitemap = null;
private boolean check_reload = true;
/** the regenerating thread */
@@ -86,12 +87,11 @@
} else {
this.sourceFile = new File (source);
if (!this.sourceFile.isFile()) {
- s = source + File.separatorChar + "sitemap.xmap";
- this.sourceFile = new File (s);
+ this.sourceFile = new File (this.sourceFile, "sitemap.xmap");
}
}
if (!this.sourceFile.canRead()) {
- throw new FileNotFoundException ("file " + s + " not found or
cannot be opened for reading");
+ throw new FileNotFoundException ("file " +
this.sourceFile.toString() + " not found or cannot be opened for reading");
}
}
@@ -133,8 +133,10 @@
public boolean process (Environment environment)
throws Exception {
throwEventualException();
- if (sitemap == null)
+ if (sitemap == null) {
log.fatalError("Sitemap is not set for the Handler!!!!");
+ throw new RuntimeException("The Sitemap is null, this should
never be!");
+ }
return sitemap.process(environment);
}
@@ -160,6 +162,11 @@
if (smap instanceof Composer) smap.compose(this.manager);
if (smap instanceof Configurable) smap.configure(this.conf);
this.sitemap = smap;
+ if (this.sitemap != null) {
+ log.debug("The sitemap has been successfully compiled!");
+ } else {
+ log.debug("No errors, but the sitemap has not been set.");
+ }
} catch (Exception e) {
log.error("Error compiling sitemap", e);
this.exception = e;