introduced some customization for the content list in admin
authorzapata <zapata>
Sat, 30 Nov 2002 19:45:56 +0000 (19:45 +0000)
committerzapata <zapata>
Sat, 30 Nov 2002 19:45:56 +0000 (19:45 +0000)
12 files changed:
source/mir/servlet/ServletModule.java
source/mir/servlet/ServletModuleDispatch.java
source/mircoders/global/ProducerEngine.java
source/mircoders/localizer/MirAdminInterfaceLocalizer.java
source/mircoders/localizer/basic/MirBasicAdminInterfaceLocalizer.java
source/mircoders/localizer/basic/MirBasicDataModelLocalizer.java
source/mircoders/localizer/basic/MirBasicLocalizer.java
source/mircoders/localizer/basic/MirBasicProducerLocalizer.java
source/mircoders/module/ModuleContent.java
source/mircoders/servlet/ServletModuleContent.java
source/mircoders/servlet/ServletModuleLocalizer.java
source/mircoders/servlet/ServletModuleOpenIndy.java

index 9cb9564..c18be05 100755 (executable)
@@ -114,10 +114,6 @@ public abstract class ServletModule {
         return loc;
     }
 
-    // ACHTUNG DEPRECATED::::
-    public void process(HttpServletRequest req, HttpServletResponse res) throws ServletModuleException {
-    }
-
     public void redirect(HttpServletResponse aResponse, String aQuery) throws ServletModuleException {
       try {
         aResponse.sendRedirect(MirConfig.getProp("RootUri") + "/Mir?"+aQuery);
index 04cec99..77c49cb 100755 (executable)
@@ -42,14 +42,14 @@ import  mir.log.*;
  * Dispatcher, calls the method passed to ServletModule Class, through the "do"
  * Parameter (via POST or GET)
  *
- * @version $Id: ServletModuleDispatch.java,v 1.9 2002/11/29 13:43:41 zapata Exp $
+ * @version $Id: ServletModuleDispatch.java,v 1.10 2002/11/30 19:45:56 zapata Exp $
  *
  * @Author rk
  *
  */
 public final class ServletModuleDispatch {
 
-  private static LoggerWrapper logger = new LoggerWrapper("servlet.dispatch");
+  private static LoggerWrapper logger = new LoggerWrapper("ServletModule.Dispatch");
   private static final Class[] SIGNATURE = { HttpServletRequest.class, HttpServletResponse.class };
 
  /**
index 2af4b85..69d18a9 100755 (executable)
@@ -48,7 +48,7 @@ public class ProducerEngine {
 
   protected ProducerEngine() {
     producerJobQueue = new JobQueue();
-    logger = new LoggerWrapper("producer");
+    logger = new LoggerWrapper("Producer");
 
     queueThread = new Thread(new ProducerJobQueueThread());
     queueThread.start();
index a2fe76b..841e1df 100755 (executable)
@@ -39,10 +39,14 @@ import mir.entity.*;
 import mir.entity.adapter.*;
 
 public interface MirAdminInterfaceLocalizer {
-  public Map simpleCommentOperations();
-  public Map simpleArticleOperations();
+  public List simpleCommentOperations();
+  public MirSimpleEntityOperation simpleCommentOperationForName(String aName);
+
+  public List simpleArticleOperations();
+  public MirSimpleEntityOperation simpleArticleOperationForName(String aName);
 
   public interface MirSimpleEntityOperation {
+    public String getName();
     public boolean isAvailable(EntityAdapter anEntity);
     public void perform(EntityAdapter anEntity);
   }
index a5f9f2c..6edb553 100755 (executable)
@@ -41,41 +41,78 @@ import mircoders.storage.*;
 
 
 public class MirBasicAdminInterfaceLocalizer implements MirAdminInterfaceLocalizer {
-  private Map simpleCommentOperations;
-  private Map simpleArticleOperations;
+  private Vector simpleCommentOperations;
+  private Vector simpleArticleOperations;
+  private Map simpleCommentOperationsMap;
+  private Map simpleArticleOperationsMap;
 
   public MirBasicAdminInterfaceLocalizer() throws MirLocalizerFailure, MirLocalizerExc {
-    simpleCommentOperations = new HashMap();
-    simpleArticleOperations = new HashMap();
+    simpleCommentOperations = new Vector();
+    simpleArticleOperations = new Vector();
+    simpleCommentOperationsMap = new HashMap();
+    simpleArticleOperationsMap = new HashMap();
 
-    buildSimpleCommentOperations(simpleCommentOperations);
-    buildSimpleArticleOperations(simpleArticleOperations);
+    addSimpleArticleOperation(new ChangeArticleFieldOperation("newswire", "to_article_type", "0", "1"));
+    addSimpleArticleOperation(new SetArticleFieldOperation("unhide", "is_published", "1"));
+    addSimpleArticleOperation(new SetArticleFieldOperation("hide", "is_published", "0"));
+
+    addSimpleCommentOperation(new SetCommentFieldOperation("unhide", "is_published", "1"));
+    addSimpleCommentOperation(new SetCommentFieldOperation("hide", "is_published", "0"));
   }
 
-  public Map simpleCommentOperations() {
+  public List simpleCommentOperations() {
     return simpleCommentOperations;
   };
 
-  public Map simpleArticleOperations() {
+  public List simpleArticleOperations() {
     return simpleArticleOperations;
   };
 
-  public void buildSimpleCommentOperations(Map anOperations) throws MirLocalizerFailure, MirLocalizerExc {
-    anOperations.put("hide", new HideCommentOperation());
-    anOperations.put("unhide", new UnhideCommentOperation());
+  public MirSimpleEntityOperation simpleArticleOperationForName(String aName) {
+    return (MirSimpleEntityOperation) simpleArticleOperationsMap.get(aName);
   };
 
-  public void buildSimpleArticleOperations(Map anOperations)  throws MirLocalizerFailure, MirLocalizerExc {
-    anOperations.put("hide", new HideArticleOperation());
-    anOperations.put("unhide", new UnhideArticleOperation());
+  public MirSimpleEntityOperation simpleCommentOperationForName(String aName) {
+    return (MirSimpleEntityOperation) simpleCommentOperationsMap.get(aName);
   };
 
+  public void removeSimpleArticleOperation(String aName) {
+    simpleArticleOperations.remove(simpleArticleOperationsMap.get(aName));
+    simpleArticleOperationsMap.remove(aName);
+  }
+
+  public void addSimpleArticleOperation(MirSimpleEntityOperation anOperation) {
+    removeSimpleArticleOperation(anOperation.getName());
+    simpleArticleOperationsMap.put(anOperation.getName(), anOperation);
+    simpleArticleOperations.add(anOperation);
+  }
+
+  public void removeSimpleCommentOperation(String aName) {
+    simpleCommentOperations.remove(simpleCommentOperationsMap.get(aName));
+    simpleCommentOperationsMap.remove(aName);
+  }
+
+  public void addSimpleCommentOperation(MirSimpleEntityOperation anOperation) {
+    removeSimpleCommentOperation(anOperation.getName());
+    simpleCommentOperationsMap.put(anOperation.getName(), anOperation);
+    simpleCommentOperations.add(anOperation);
+  }
+
   protected abstract static class EntityModifyingOperation implements MirSimpleEntityOperation {
+    private String name;
+
+    protected EntityModifyingOperation(String aName) {
+      name = aName;
+    }
+
+    public String getName() {
+      return name;
+    };
+
     public boolean isAvailable(EntityAdapter anEntity) {
       try {
-
         Entity entity = anEntity.getEntity();
-        return (entity instanceof EntityComment) && isAvailable((EntityComment) entity);
+        return isAvailable(entity);
       }
       catch (Throwable t) {
         return false;
@@ -97,6 +134,10 @@ public class MirBasicAdminInterfaceLocalizer implements MirAdminInterfaceLocaliz
   }
 
   public static abstract class CommentModifyingOperation extends EntityModifyingOperation {
+    public CommentModifyingOperation(String aName) {
+      super(aName);
+    }
+
     protected boolean isAvailable(Entity anEntity) throws StorageObjectException {
       return anEntity instanceof EntityComment && isAvailable((EntityComment) anEntity);
     }
@@ -111,8 +152,12 @@ public class MirBasicAdminInterfaceLocalizer implements MirAdminInterfaceLocaliz
   }
 
   public static abstract class ArticleModifyingOperation extends EntityModifyingOperation {
+    public ArticleModifyingOperation(String aName) {
+      super(aName);
+    }
+
     protected boolean isAvailable(Entity anEntity) throws StorageObjectException {
-      return anEntity instanceof EntityContent && isAvailable((EntityComment) anEntity);
+      return anEntity instanceof EntityContent && isAvailable((EntityContent) anEntity);
     }
 
     protected void performModification(Entity anEntity) throws StorageObjectException {
@@ -124,39 +169,65 @@ public class MirBasicAdminInterfaceLocalizer implements MirAdminInterfaceLocaliz
     protected abstract void performModification(EntityContent anArticle) throws StorageObjectException ;
   }
 
-  private static class HideCommentOperation extends CommentModifyingOperation {
-    protected boolean isAvailable(EntityComment aComment) {
-      return aComment.getValue("is_published").equals("1");
-    }
-    protected void performModification(EntityComment aComment) throws StorageObjectException {
-      aComment.setValueForProperty("is_published", "0");
+  protected static class SetCommentFieldOperation extends CommentModifyingOperation {
+    private String field;
+    private String value;
+
+    public SetCommentFieldOperation(String aName, String aField, String aValue) {
+      super(aName);
+
+      field = aField;
+      value = aValue;
     }
-  }
 
-  private static class UnhideCommentOperation extends CommentModifyingOperation {
     protected boolean isAvailable(EntityComment aComment) {
-      return aComment.getValue("is_published").equals("0");
+      return aComment.getValue(field) == null || !aComment.getValue(field).equals(value);
     }
+
     protected void performModification(EntityComment aComment) throws StorageObjectException {
-      aComment.setValueForProperty("is_published", "1");
+      aComment.setValueForProperty(field, value);
     }
   }
 
-  private static class HideArticleOperation extends ArticleModifyingOperation {
+  protected static class SetArticleFieldOperation extends ArticleModifyingOperation {
+    private String field;
+    private String value;
+
+    public SetArticleFieldOperation(String aName, String aField, String aValue) {
+      super(aName);
+
+      field = aField;
+      value = aValue;
+    }
+
     protected boolean isAvailable(EntityContent anArticle) {
-      return anArticle.getValue("is_published").equals("1");
+      return anArticle.getValue(field) == null || !anArticle.getValue(field).equals(value);
     }
+
     protected void performModification(EntityContent anArticle) throws StorageObjectException {
-      anArticle.setValueForProperty("is_published", "0");
+      anArticle.setValueForProperty(field, value);
     }
   }
 
-  private static class UnhideArticleOperation extends ArticleModifyingOperation {
+  protected static class ChangeArticleFieldOperation extends ArticleModifyingOperation {
+    private String field;
+    private String oldValue;
+    private String newValue;
+
+    public ChangeArticleFieldOperation(String aName, String aField, String anOldValue, String aNewValue) {
+      super(aName);
+
+      field = aField;
+      newValue = aNewValue;
+      oldValue = anOldValue;
+    }
+
     protected boolean isAvailable(EntityContent anArticle) {
-      return anArticle.getValue("is_published").equals("0");
+      return anArticle.getValue(field) != null && anArticle.getValue(field).equals(oldValue);
     }
+
     protected void performModification(EntityContent anArticle) throws StorageObjectException {
-      anArticle.setValueForProperty("is_published", "1");
+      anArticle.setValueForProperty(field, newValue);
     }
   }
 }
\ No newline at end of file
index 4b66e94..8beca89 100755 (executable)
@@ -77,6 +77,9 @@ public class MirBasicDataModelLocalizer implements MirDataModelLocalizer {
 \r
       anEntityAdapterDefinition.addCalculatedField("description_parsed", new FilteredField("description"));\r
       anEntityAdapterDefinition.addCalculatedField("content_data_parsed", new FilteredField("content_data"));\r
+\r
+      anEntityAdapterDefinition.addCalculatedField("operations",\r
+          new EntityToSimpleOperationsField(MirGlobal.localizer().adminInterface().simpleArticleOperations()));\r
     }\r
     catch (Throwable t) {\r
       throw new MirLocalizerFailure(t.getMessage(), t);\r
@@ -89,7 +92,8 @@ public class MirBasicDataModelLocalizer implements MirDataModelLocalizer {
       anEntityAdapterDefinition.addCalculatedField("to_content", new CommentToContentField());\r
 \r
       anEntityAdapterDefinition.addCalculatedField("description_parsed", new FilteredField("description"));\r
-      anEntityAdapterDefinition.addCalculatedField("operations", new CommentToOperationsField());\r
+      anEntityAdapterDefinition.addCalculatedField("operations",\r
+          new EntityToSimpleOperationsField(MirGlobal.localizer().adminInterface().simpleCommentOperations()));\r
     }\r
     catch (Throwable t) {\r
       throw new MirLocalizerFailure(t.getMessage(), t);\r
@@ -152,21 +156,24 @@ public class MirBasicDataModelLocalizer implements MirDataModelLocalizer {
     }\r
   }\r
 \r
-  protected class CommentToOperationsField implements EntityAdapterDefinition.CalculatedField {\r
+  protected class EntityToSimpleOperationsField implements EntityAdapterDefinition.CalculatedField {\r
+    private List operations;\r
+\r
+    public EntityToSimpleOperationsField(List anOperations) {\r
+      operations = anOperations;\r
+    }\r
+\r
     public Object getValue(EntityAdapter anEntityAdapter) {\r
       try {\r
-        Map operations = MirGlobal.localizer().adminInterface().simpleCommentOperations();\r
-        Iterator i = operations.entrySet().iterator();\r
+        Iterator i = operations.iterator();\r
         List availableOperations = new Vector();\r
 \r
         while (i.hasNext()) {\r
-          Map.Entry entry = (Map.Entry) i.next();\r
-\r
           MirAdminInterfaceLocalizer.MirSimpleEntityOperation operation =\r
-            (MirAdminInterfaceLocalizer.MirSimpleEntityOperation) entry.getValue();\r
+            (MirAdminInterfaceLocalizer.MirSimpleEntityOperation) i.next();\r
 \r
           if (operation.isAvailable(anEntityAdapter)) {\r
-            availableOperations.add(entry.getKey());\r
+            availableOperations.add(operation.getName());\r
           }\r
         };\r
 \r
index 0422ec0..5130b6a 100755 (executable)
@@ -36,7 +36,7 @@ import mircoders.global.*;
 import mircoders.localizer.*;
 
 public class MirBasicLocalizer implements MirLocalizer {
-  protected static Logfile logger = Logfile.getInstance( MirGlobal.getConfigProperty("Home") + "/" + MirGlobal.getConfigProperty("Mir.Localizer.Logfile"));
+//  protected static Logfile logger = Logfile.getInstance( MirGlobal.getConfigProperty("Home") + "/" + MirGlobal.getConfigProperty("Mir.Localizer.Logfile"));
 
   public MirProducerLocalizer producers() throws MirLocalizerFailure, MirLocalizerExc {
     return new MirBasicProducerLocalizer();
index 197b1c9..30db6f4 100755 (executable)
@@ -58,9 +58,6 @@ public class MirBasicProducerLocalizer implements MirProducerLocalizer {
   protected static Logfile logger = Logfile.getInstance( MirGlobal.getConfigProperty("Home") + "/" + MirGlobal.getConfigProperty("Mir.Localizer.Logfile"));
 
   public MirBasicProducerLocalizer() {
-
-
-
     try {
       String allNewProducers = MirGlobal.getConfigProperty("Mir.Localizer.Producer.AllNewProducers");
       allNewProducerTasks = ProducerEngine.ProducerTask.parseProducerTaskList(allNewProducers);
index 9cff5b0..6a44b55 100755 (executable)
@@ -51,7 +51,7 @@ import mircoders.storage.*;
 /*
  *  ContentObjekt -
  *
- * @version $Id: ModuleContent.java,v 1.11 2002/11/29 13:43:42 zapata Exp $
+ * @version $Id: ModuleContent.java,v 1.12 2002/11/30 19:45:56 zapata Exp $
  *
  * @author RK, mir-coders
  *
@@ -225,7 +225,9 @@ public class ModuleContent extends AbstractModule
       }
       return theStorage.selectByWhereClause(whereClause, orderBy, offset);
     }
-    catch (StorageObjectException e){  throw new ModuleException(e.toString()); }
+    catch (StorageObjectException e) {
+      throw new ModuleException(e.toString());
+    }
   }
 }
 
index 08e84b1..c2f57b6 100755 (executable)
@@ -56,12 +56,13 @@ import mircoders.global.*;
 import mircoders.storage.*;
 import mircoders.module.*;
 import mircoders.entity.*;
+import mircoders.localizer.*;
 
 /*
  *  ServletModuleContent -
  *  deliver html for the article admin form.
  *
- * @version $Id: ServletModuleContent.java,v 1.23 2002/11/29 13:43:42 zapata Exp $
+ * @version $Id: ServletModuleContent.java,v 1.24 2002/11/30 19:45:56 zapata Exp $
  * @author rk, mir-coders
  *
  */
@@ -117,8 +118,6 @@ public class ServletModuleContent extends ServletModule
       if (req.getParameter("prev") != null)
         offset = Integer.parseInt(req.getParameter("prevoffset"));
 
-
-
     returnArticleList(req, res, whereParam, orderParam, offset);
   }
 
@@ -176,7 +175,7 @@ public class ServletModuleContent extends ServletModule
     try {
       EntityUsers   user = _getUser(req);
       HashMap withValues = getIntersectingValues(req, DatabaseContent.getInstance());
-//theLog.printDebugInfo(":: content :: got intersecting values");
+
       String now = StringUtil.date2webdbDate(new GregorianCalendar());
       withValues.put("date", now);
       withValues.put("publish_path", StringUtil.webdbDate2path(now));
@@ -187,14 +186,9 @@ public class ServletModuleContent extends ServletModule
       if (!withValues.containsKey("is_html"))
         withValues.put("is_html","0");
 
-//      ML: this is not multi-language friendly and this can be done in a template
-//      if (withValues.get("creator").toString().equals(""))
-//        withValues.put("creator","Anonym");
-
-
       String id = mainModule.add(withValues);
       DatabaseContentToTopics.getInstance().setTopics(id,req.getParameterValues("to_topic"));
-//theLog.printDebugInfo(":: content :: inserted");
+
       _showObject(id, req, res);
     }
     catch (StorageObjectException e) {
@@ -208,7 +202,7 @@ public class ServletModuleContent extends ServletModule
   public void delete(HttpServletRequest req, HttpServletResponse res) throws ServletModuleException
   {
     EntityUsers   user = _getUser(req);
-// hier pruefen ob dem akt. user loeschen erlaubt ist...
+
     String idParam = req.getParameter("id");
     if (idParam == null) throw new ServletModuleException("Invalid call: id missing");
 
@@ -218,7 +212,7 @@ public class ServletModuleContent extends ServletModule
     logger.info("where = " + req.getParameter("where"));
 
     if (confirmParam == null && cancelParam == null) {
-// HTML Ausgabe zum Confirmen!
+
       SimpleHash mergeData = new SimpleHash();
       mergeData.put("module", "Content");
       mergeData.put("infoString", "Content: " + idParam);
@@ -233,7 +227,7 @@ public class ServletModuleContent extends ServletModule
         try {
           mainModule.deleteById(idParam);
 
-          /** @todo the following two should be imlied in
+          /** @todo the following two should be implied in
            *  DatabaseContent */
 
           //delete rows in the content_x_topic-table
@@ -393,7 +387,6 @@ public class ServletModuleContent extends ServletModule
         entContent = withValues;
       }
 
-
       extraInfo.put("themenPopupData", themenModule.getTopicsAsSimpleList());
       try {
         extraInfo.put("articletypePopupData", DatabaseArticleType.getInstance().getPopupData());
@@ -409,14 +402,17 @@ public class ServletModuleContent extends ServletModule
       }
 
       extraInfo.put("schwerpunktPopupData", schwerpunktModule.getSchwerpunktAsSimpleList());
-// hier code um zur liste zurueckzukommen
+
+      // code to be able to return to the list:
       String offsetParam, whereParam, orderParam;
       if ((offsetParam = req.getParameter("offset"))!=null) extraInfo.put("offset", offsetParam);
       if ((whereParam = req.getParameter("where"))!=null) extraInfo.put("where", whereParam);
       if ((orderParam = req.getParameter("order"))!=null) extraInfo.put("order", orderParam);
+
       extraInfo.put("login_user", _getUser(req));
       deliver(req, res, entContent, extraInfo, templateObjektString);
-    } catch (Exception e) {
+    }
+    catch (Exception e) {
       throw new ServletModuleException(e.toString());
     }
   }
index 1799f56..406f978 100755 (executable)
@@ -38,16 +38,32 @@ import javax.servlet.http.*;
 
 import mir.servlet.*;
 import mir.entity.adapter.*;
+import mir.log.*;
+
 import mircoders.global.*;
 import mircoders.localizer.*;
 import mircoders.storage.*;
 import mircoders.entity.*;
+import mircoders.module.*;
 
 public class ServletModuleLocalizer extends ServletModule {
   private static ServletModuleLocalizer instance = new ServletModuleLocalizer();
-
   public static ServletModule getInstance() { return instance; }
 
+  private ModuleContent contentModule;
+
+  private ServletModuleLocalizer() {
+    try {
+      contentModule = new ModuleContent(DatabaseContent.getInstance());
+
+      logger = new LoggerWrapper("ServletModule.Localizer");
+    }
+    catch (Exception e) {
+      logger.error("ServletModuleLocalizer could not be initialized: " + e.getMessage());
+    }
+  }
+
+
   public void commentoperation(HttpServletRequest req, HttpServletResponse res) throws ServletModuleException
   {
     try {
@@ -56,7 +72,7 @@ public class ServletModuleLocalizer extends ServletModule {
       EntityComment comment = (EntityComment) DatabaseComment.getInstance().selectById(commentId);
       MirAdminInterfaceLocalizer.MirSimpleEntityOperation operation =
           (MirAdminInterfaceLocalizer.MirSimpleEntityOperation)
-          MirGlobal.localizer().adminInterface().simpleCommentOperations().get(operationKey);
+          MirGlobal.localizer().adminInterface().simpleArticleOperationForName(operationKey);
 
       EntityAdapter adapter = MirGlobal.localizer().dataModel().adapterModel().makeEntityAdapter("comment", comment);
 
@@ -69,4 +85,32 @@ public class ServletModuleLocalizer extends ServletModule {
       throw new ServletModuleException(t.getMessage());
     }
   }
+
+  public void articleoperation(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletModuleException {
+    String articleIdString = aRequest.getParameter("articleid");
+    String operationString = aRequest.getParameter("operation");
+    String returnUrlString = aRequest.getParameter("returnurl");
+
+    MirAdminInterfaceLocalizer.MirSimpleEntityOperation operation;
+    EntityAdapter article;
+    EntityContent entity;
+
+    try {
+      entity = (EntityContent) contentModule.getById(articleIdString);
+
+      if (entity!=null) {
+        article = MirGlobal.localizer().dataModel().adapterModel().makeEntityAdapter("content", entity);
+        operation = MirGlobal.localizer().adminInterface().simpleArticleOperationForName(operationString);
+        operation.perform(article);
+      }
+
+      redirect(aResponse, returnUrlString);
+    }
+    catch (Throwable e) {
+      e.printStackTrace(System.out);
+      throw new ServletModuleException(e.getMessage());
+    }
+  }
+
+
 }
\ No newline at end of file
index f99eefc..d6e9e58 100755 (executable)
@@ -84,7 +84,7 @@ import mircoders.search.*;
  *    open-postings to the newswire
  *
  * @author mir-coders group
- * @version $Id: ServletModuleOpenIndy.java,v 1.47 2002/11/29 14:22:30 john Exp $
+ * @version $Id: ServletModuleOpenIndy.java,v 1.48 2002/11/30 19:45:57 zapata Exp $
  *
  */
 
@@ -108,7 +108,8 @@ public class ServletModuleOpenIndy extends ServletModule
 
   private ServletModuleOpenIndy() {
     try {
-      logger = new LoggerWrapper("ServletModule.OpenIndy.Logfile");
+      logger = new LoggerWrapper("ServletModule.OpenIndy");
+
       commentFormTemplate = MirConfig.getProp("ServletModule.OpenIndy.CommentTemplate");
       commentFormDoneTemplate = MirConfig.getProp("ServletModule.OpenIndy.CommentDoneTemplate");
       commentFormDupeTemplate = MirConfig.getProp("ServletModule.OpenIndy.CommentDupeTemplate");
@@ -126,7 +127,7 @@ public class ServletModuleOpenIndy extends ServletModule
 
     }
     catch (StorageObjectException e) {
-      logger.error("servletmoduleopenindy could not be initialized");
+      logger.error("servletmoduleopenindy could not be initialized: " + e.getMessage());
     }
   }