src/java/de/uapcore/lightpit/ModuleManager.java

changeset 9
20a9b2bc9063
parent 8
2dfdb79b5344
child 10
89e3e6e28b69
--- a/src/java/de/uapcore/lightpit/ModuleManager.java	Sun Dec 10 16:10:14 2017 +0100
+++ b/src/java/de/uapcore/lightpit/ModuleManager.java	Fri Dec 15 17:39:54 2017 +0100
@@ -70,26 +70,28 @@
         try {
             final Class scclass = Class.forName(reg.getClassName());
             
-            final boolean lpservlet = LightPITServlet.class.isAssignableFrom(scclass);
+            final boolean lpservlet = AbstractLightPITServlet.class.isAssignableFrom(scclass);
             final boolean lpmodule = scclass.isAnnotationPresent(LightPITModule.class);
             
             if (lpservlet && !lpmodule) {
                 LOG.warn(
-                    "Servlet is a LightPITServlet but is missing the module annotation: {}",
+                    "{} is a LightPIT Servlet but is missing the module annotation.",
                     reg.getClassName()
                 );
             } else if (!lpservlet && lpmodule) {
                 LOG.warn(
-                    "Servlet is annotated as a LightPITModule but does not extend LightPITServlet: {}",
-                    reg.getClassName()
+                    "{} is annotated as a LightPIT Module but does not extend {}.",
+                    reg.getClassName(),
+                    AbstractLightPITServlet.class.getSimpleName()
                 );
             }
             
             return lpservlet && lpmodule;
         } catch (ClassNotFoundException ex) {
             LOG.error(
-                    "Servlet registration refers to a class which cannot be found by the class loader: {}",
-                    reg.getClassName()
+                    "Servlet registration refers to class {} which cannot be found by the class loader (Reason: {})",
+                    reg.getClassName(),
+                    ex.getMessage()
             );
             return false;
         }        

mercurial