jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1171815 [1/3] - in /jackrabbit/sandbox/jackrabbit-mk: jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ jackrabbit-jcr2spi/src/main/java/org/apache/jac...
Date Fri, 16 Sep 2011 21:51:46 GMT
Author: mduerig
Date: Fri Sep 16 21:51:43 2011
New Revision: 1171815

URL: http://svn.apache.org/viewvc?rev=1171815&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP) 
logging   

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LazyItemIterator.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeAttic.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntries.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntry.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEventListener.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/PropertyEntry.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/UniqueIdResolver.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/EventJournalImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/FilteredEventIterator.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperation.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetMixin.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPrimaryType.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/NodeIteratorImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/QueryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/QueryObjectModelImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/RowIteratorImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoBuilder.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/batch/AbstractChangeLog.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/batch/ConsolidatingChangeLog.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/identifier/AbstractIdFactory.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/logging/SpiLoggerFactory.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/AbstractPath.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/IdentifierPath.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/MatchResult.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/Matcher.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NameFactoryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NamePath.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/NamePathWithIndex.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/PathFactoryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/Pattern.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/RelativePath.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/RootPath.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/ItemDefinitionImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeDefinitionImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefDiff.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeDefinitionImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeStorageImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeTemplateImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/PropertyDefinitionImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/constraint/ValueConstraint.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionReader.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeDefinitionWriter.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/privilege/PrivilegeXmlHandler.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/OrderQueryNode.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/PropertyFunctionQueryNode.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/QueryTreeBuilderRegistry.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/RelationQueryNode.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/TextsearchQueryNode.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/qom/QueryObjectModelFactoryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/sql/JCRSQLQueryBuilder.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/query/xpath/XPathQueryBuilder.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/util/Arrays.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/util/BoundedIterator.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/util/Iterators.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/util/WeakIdentityCollection.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValue.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/AbstractQValueFactory.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/QValueFactoryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/value/ValueFormat.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/CommitMessage.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/Paths.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/QueryInfoImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/QueryProcessor.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/Values.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java Fri Sep 16 21:51:43 2011
@@ -262,7 +262,10 @@ public abstract class ItemImpl<STATE_TYP
     @Override
     public void statusChanged(ItemState<?> state, Status previousStatus) {
         if (state != this.state) {
-            throw new IllegalArgumentException("Invalid argument: ItemState with changed status must be this.state.");
+            IllegalArgumentException e = new IllegalArgumentException("Invalid argument: ItemState with changed status " +
+                    "must be this.state.");
+            log.error(e.getMessage(), e);
+            throw e;
         }
 
         switch (state.getStatus()) {

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LazyItemIterator.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LazyItemIterator.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LazyItemIterator.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LazyItemIterator.java Fri Sep 16 21:51:43 2011
@@ -268,7 +268,9 @@ public final class LazyItemIterator {
         @Override
         public void skip(long skipNum) {
             if (skipNum < 0) {
-                throw new IllegalArgumentException("skipNum must not be negative");
+                IllegalArgumentException e = new IllegalArgumentException("skipNum must not be negative");
+                log.error(e.getMessage(), e);
+                throw e;
             }
             if (skipNum == 0) {
                 return;
@@ -312,7 +314,9 @@ public final class LazyItemIterator {
 
         @Override
         public void remove() {
-            throw new UnsupportedOperationException("remove");
+            UnsupportedOperationException e = new UnsupportedOperationException("remove");
+            log.error(e.getMessage(), e);
+            throw e;
         }
     }
 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java Fri Sep 16 21:51:43 2011
@@ -100,8 +100,10 @@ public class NodeImpl extends ItemImpl<N
             // should not occur. Since nodetypes are defined by the 'server'
             // its not possible to determine a fallback nodetype that is
             // always available.
-            throw new IllegalArgumentException("Unknown nodetype " +
-                    LogUtil.saveGetJCRName(ntName, session.getNamePathResolver()));
+            IllegalArgumentException e0 = new IllegalArgumentException("Unknown nodetype " +
+                    LogUtil.saveGetJCRName(ntName, session.getNamePathResolver()), e);
+            log.error(e0.getMessage(), e0);
+            throw e0;
         }
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/PropertyImpl.java Fri Sep 16 21:51:43 2011
@@ -513,7 +513,10 @@ public class PropertyImpl extends ItemIm
     private void setValue(Value value, int requiredType) throws RepositoryException {
         if (requiredType == PropertyType.UNDEFINED) {
             // should never get here since calling methods assert valid type
-            throw new IllegalArgumentException("Property type of a value cannot be undefined (" + safeGetJCRPath() + ").");
+            IllegalArgumentException e = new IllegalArgumentException("Property type of a value cannot be undefined (" +
+                    safeGetJCRPath() + ").");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         if (value == null) {
             setInternalValues(null, requiredType);

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeAttic.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeAttic.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeAttic.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeAttic.java Fri Sep 16 21:51:43 2011
@@ -17,6 +17,8 @@
 package org.apache.jackrabbit.jcr2spi.hierarchy;
 
 import org.apache.jackrabbit.spi.Name;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -28,6 +30,8 @@ import java.util.Set;
  * {@code ChildNodeAttic}...
  */
 class ChildNodeAttic {
+    private static final Logger log = LoggerFactory.getLogger(ChildNodeAttic.class);
+
     private final Set<NodeEntry> attic = new HashSet<NodeEntry>();
 
     boolean isEmpty() {
@@ -91,7 +95,9 @@ class ChildNodeAttic {
      */
     NodeEntry get(String uniqueId) {
         if (uniqueId == null) {
-            throw new IllegalArgumentException();
+            IllegalArgumentException e = new IllegalArgumentException("Unique id must not be null");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         for (NodeEntry ne : attic) {
             if (uniqueId.equals(ne.getUniqueID())) {

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntries.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntries.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntries.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/ChildNodeEntries.java Fri Sep 16 21:51:43 2011
@@ -221,7 +221,9 @@ final class ChildNodeEntries {
      */
     public NodeEntry get(Name nodeName, int index) {
         if (index < Path.INDEX_DEFAULT) {
-            throw new IllegalArgumentException("index is 1-based");
+            IllegalArgumentException e = new IllegalArgumentException("index is 1-based");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         return entriesByName.getNodeEntry(nodeName, index);
     }
@@ -237,7 +239,9 @@ final class ChildNodeEntries {
      */
     public NodeEntry get(Name nodeName, String uniqueID) {
         if (uniqueID == null || nodeName == null) {
-            throw new IllegalArgumentException();
+            IllegalArgumentException e = new IllegalArgumentException("Node name and id must not be null");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         for (NodeEntry cne : get(nodeName)) {
             if (uniqueID.equals(cne.getUniqueID())) {
@@ -271,7 +275,9 @@ final class ChildNodeEntries {
      */
     public synchronized void add(NodeEntry cne, int index) {
         if (index < Path.INDEX_UNDEFINED) {
-            throw new IllegalArgumentException("Invalid index" + index);
+            IllegalArgumentException e = new IllegalArgumentException("Invalid index" + index);
+            log.error(e.getMessage(), e);
+            throw e;
         }
         internalAdd(cne, index);
     }
@@ -664,7 +670,9 @@ final class ChildNodeEntries {
 
             @Override
             protected void setValue(Object value) {
-                throw new UnsupportedOperationException("Not implemented");
+                UnsupportedOperationException e = new UnsupportedOperationException("remove");
+                log.error(e.getMessage(), e);
+                throw e;
             }
 
             @Override
@@ -741,7 +749,9 @@ final class ChildNodeEntries {
 
             @Override
             public void remove() {
-                throw new UnsupportedOperationException("remove");
+                UnsupportedOperationException e = new UnsupportedOperationException("remove");
+                log.error(e.getMessage(), e);
+                throw e;
             }
 
             private void checkModCount() {
@@ -851,7 +861,9 @@ final class ChildNodeEntries {
 
         public LinkedEntries.LinkNode getLinkNode(Name name, int index) {
             if (index < Path.INDEX_DEFAULT) {
-                throw new IllegalArgumentException("Illegal index " + index);
+                IllegalArgumentException e = new IllegalArgumentException("Illegal index " + index);
+                log.error(e.getMessage(), e);
+                throw e;
             }
 
             LinkedEntries.LinkNode val = nameMap.get(name);

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntry.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntry.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntry.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntry.java Fri Sep 16 21:51:43 2011
@@ -301,7 +301,9 @@ public abstract class HierarchyEntry<STA
     public synchronized void setItemState(STATE_TYPE state) {
         STATE_TYPE currentState = internalGetItemState();
         if (state == null || state == currentState || denotesNode() != state.isNode()) {
-            throw new IllegalArgumentException();
+            IllegalArgumentException e = new IllegalArgumentException("Invalid item state");
+            log.error(e.getMessage(), e);
+            throw e;
         }
 
         if (currentState == null) {

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEventListener.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEventListener.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEventListener.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEventListener.java Fri Sep 16 21:51:43 2011
@@ -173,7 +173,9 @@ public class HierarchyEventListener impl
             NodeId parentId = event.getParentId();
             HierarchyEntry<?> parentEntry = parentId != null ? hierarchyMgr.lookup(parentId) : null;
             if (!parentEntry.denotesNode()) {
-                throw new IllegalArgumentException("Invalid parentId in event: " + parentId);
+                IllegalArgumentException e1 = new IllegalArgumentException("Invalid parentId in event: " + parentId);
+                log.error(e1.getMessage(), e1);
+                throw e1;
             }
 
             NodeEntry parent = cast(parentEntry);
@@ -199,15 +201,21 @@ public class HierarchyEventListener impl
                     break;
                 case Event.NODE_MOVED:
                     // TODO: implementation missing
-                    throw new UnsupportedOperationException("Implementation missing");
+                    UnsupportedOperationException e = new UnsupportedOperationException("Not implemented");
+                    log.error(e.getMessage(), e);
+                    throw e;
                     //break;
                 case Event.PERSIST:
                     // TODO: implementation missing
-                    throw new UnsupportedOperationException("Implementation missing");
+                    UnsupportedOperationException e0 = new UnsupportedOperationException("Not implemented");
+                    log.error(e0.getMessage(), e0);
+                    throw e0;
                     //break;
                 default:
                     // should never occur
-                    throw new IllegalArgumentException("Invalid event type: " + event.getType());
+                    IllegalArgumentException e1 = new IllegalArgumentException("Invalid event type: " + event.getType());
+                    log.error(e1.getMessage(), e1);
+                    throw e1;
             }
         }
     }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/NodeEntry.java Fri Sep 16 21:51:43 2011
@@ -145,7 +145,9 @@ public class NodeEntry extends Hierarchy
 
         @Override
         protected void unimplemented(Operation operation) {
-            throw new IllegalArgumentException("Invalid operation: " + operation.getName());
+            IllegalArgumentException e = new IllegalArgumentException("Invalid operation: " + operation.getName());
+            log.error(e.getMessage(), e);
+            throw e;
         }
     };
 
@@ -1095,7 +1097,9 @@ public class NodeEntry extends Hierarchy
                         // parent (i.e. this NodeEntry)
                         if (isUuidOrMixin(eventName)) {
                             if (!(child instanceof PropertyEntry)) {
-                                throw new IllegalArgumentException("Invalid event: " + childEvent);
+                                IllegalArgumentException e = new IllegalArgumentException("Invalid event: " + childEvent);
+                                log.error(e.getMessage(), e);
+                                throw e;
                             }
 
                             notifyUUIDorMIXINModified(Unchecked.<PropertyEntry>cast(child));
@@ -1105,14 +1109,21 @@ public class NodeEntry extends Hierarchy
                 break;
             case Event.NODE_MOVED:
                 // TODO: implementation missing
-                throw new UnsupportedOperationException("Implementation missing");
+                UnsupportedOperationException e = new UnsupportedOperationException("Not implemented");
+                log.error(e.getMessage(), e);
+                throw e;
                 //break;
             case Event.PERSIST:
                 // TODO: implementation missing
-                throw new UnsupportedOperationException("Implementation missing");
+                UnsupportedOperationException e0 = new UnsupportedOperationException("Not implemented");
+                log.error(e0.getMessage(), e0);
+                throw e0;
             default:
                 // ILLEGAL
-                throw new IllegalArgumentException("Illegal event type " + childEvent.getType() + " for NodeState.");
+                IllegalArgumentException e1 = new IllegalArgumentException("Illegal event type " +
+                        childEvent.getType() + " for NodeState.");
+                log.error(e1.getMessage(), e1);
+                throw e1;
         }
     }
 
@@ -1565,7 +1576,9 @@ public class NodeEntry extends Hierarchy
 
     private void complete(AddNode operation) throws RepositoryException {
         if (operation.getParentState().getHierarchyEntry() != this) {
-            throw new IllegalArgumentException();
+            IllegalArgumentException e = new IllegalArgumentException("Invalid operation target");
+            log.error(e.getMessage(), e);
+            throw e;
         }
 
         for (ItemState<?> itemState : operation.getAddedStates()) {
@@ -1589,7 +1602,9 @@ public class NodeEntry extends Hierarchy
 
     private void complete(AddProperty operation) throws RepositoryException {
         if (operation.getParentState().getHierarchyEntry() != this) {
-            throw new IllegalArgumentException();
+            IllegalArgumentException e = new IllegalArgumentException("Invalid operation target");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         PropertyEntry pe = getPropertyEntry(operation.getPropertyName());
         if (pe != null && pe.getStatus() == Status.NEW) {
@@ -1618,7 +1633,9 @@ public class NodeEntry extends Hierarchy
     private void complete(Remove operation) throws RepositoryException {
         HierarchyEntry<?> rmEntry = operation.getRemoveState().getHierarchyEntry();
         if (rmEntry.getParent() != this) {
-            throw new IllegalArgumentException();
+            IllegalArgumentException e = new IllegalArgumentException("Invalid operation target");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         switch (operation.getStatus()) {
             case PERSISTED:
@@ -1645,7 +1662,9 @@ public class NodeEntry extends Hierarchy
 
     private void complete(SetMixin operation) throws RepositoryException {
         if (operation.getNodeState().getHierarchyEntry() != this) {
-            throw new IllegalArgumentException();
+            IllegalArgumentException e = new IllegalArgumentException("Invalid operation target");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         PropertyEntry pe = getPropertyEntry(NameConstants.JCR_MIXINTYPES);
         if (pe != null) {
@@ -1670,7 +1689,9 @@ public class NodeEntry extends Hierarchy
 
     private void complete(SetPrimaryType operation) throws RepositoryException {
         if (operation.getNodeState().getHierarchyEntry() != this) {
-            throw new IllegalArgumentException();
+            IllegalArgumentException e = new IllegalArgumentException("Invalid operation target");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         PropertyEntry pe = getPropertyEntry(NameConstants.JCR_PRIMARYTYPE);
         if (pe != null) {
@@ -1697,7 +1718,9 @@ public class NodeEntry extends Hierarchy
     private void complete(ReorderNodes operation) throws RepositoryException {
         HierarchyEntry<?> he = operation.getInsertNode().getHierarchyEntry();
         if (he != this) {
-            throw new IllegalArgumentException();
+            IllegalArgumentException e = new IllegalArgumentException("Invalid operation target");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         // NOTE: if reorder occurred in combination with a 'move' the clean-up
         // of the revertInfo is postponed until {@link #complete(Move)}.
@@ -1723,7 +1746,9 @@ public class NodeEntry extends Hierarchy
     private void complete(Move operation) throws RepositoryException {
         HierarchyEntry<?> he = operation.getSourceState().getHierarchyEntry();
         if (he != this) {
-            throw new IllegalArgumentException();
+            IllegalArgumentException e = new IllegalArgumentException("Invalid operation target");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         switch (operation.getStatus()) {
             case PERSISTED:

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/PropertyEntry.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/PropertyEntry.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/PropertyEntry.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/PropertyEntry.java Fri Sep 16 21:51:43 2011
@@ -23,6 +23,8 @@ import org.apache.jackrabbit.jcr2spi.sta
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.Path;
 import org.apache.jackrabbit.spi.PropertyId;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jcr.ItemNotFoundException;
 import javax.jcr.RepositoryException;
@@ -33,6 +35,7 @@ import static org.apache.jackrabbit.spi.
  * {@code PropertyEntryImpl} implements a reference to a property state.
  */
 public class PropertyEntry extends HierarchyEntry<PropertyState> {
+    private static final Logger log = LoggerFactory.getLogger(PropertyEntry.class);
 
     /**
      * Creates a new {@code PropertyEntryImpl}.
@@ -103,12 +106,16 @@ public class PropertyEntry extends Hiera
     @Override
     public void complete(Operation operation) throws RepositoryException {
         if (!(operation instanceof SetPropertyValue)) {
-            throw new IllegalArgumentException();
+            IllegalArgumentException e = new IllegalArgumentException("Invalid operation");
+            log.error(e.getMessage(), e);
+            throw e;
         }
 
         SetPropertyValue op = cast(operation);
         if (op.getPropertyState().getHierarchyEntry() != this) {
-            throw new IllegalArgumentException();
+            IllegalArgumentException e = new IllegalArgumentException("Invalid operation target");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         switch (operation.getStatus()) {
             case PERSISTED:

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/UniqueIdResolver.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/UniqueIdResolver.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/UniqueIdResolver.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/UniqueIdResolver.java Fri Sep 16 21:51:43 2011
@@ -62,7 +62,9 @@ public class UniqueIdResolver implements
 
     public NodeEntry lookup(String uniqueId) {
         if (uniqueId == null) {
-            throw new IllegalArgumentException();
+            IllegalArgumentException e = new IllegalArgumentException("UniqueId must not be null");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         return lookUp.get(uniqueId);
     }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/nodetype/NodeTypeRegistryImpl.java Fri Sep 16 21:51:43 2011
@@ -683,7 +683,9 @@ public class NodeTypeRegistryImpl implem
 
         @Override
         public void putAll(Map<? extends Name, ? extends QNodeTypeDefinition> t) {
-            throw new UnsupportedOperationException("Implementation missing");
+            UnsupportedOperationException e = new UnsupportedOperationException("Not implemented");
+            log.error(e.getMessage(), e);
+            throw e;
         }
 
         @Override
@@ -696,7 +698,9 @@ public class NodeTypeRegistryImpl implem
         @Override
         public QNodeTypeDefinition get(Object key) {
             if (!(key instanceof Name)) {
-                throw new IllegalArgumentException();
+                IllegalArgumentException e = new IllegalArgumentException("Key is not a name");
+                log.error(e.getMessage(), e);
+                throw e;
             }
             QNodeTypeDefinition def = nodetypeDefinitions.get(key);
             if (def == null) {

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/EventJournalImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/EventJournalImpl.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/EventJournalImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/EventJournalImpl.java Fri Sep 16 21:51:43 2011
@@ -16,21 +16,20 @@
  */
 package org.apache.jackrabbit.jcr2spi.observation;
 
-import java.util.List;
-import java.util.LinkedList;
-import java.util.NoSuchElementException;
-
-import javax.jcr.observation.EventJournal;
-import javax.jcr.RepositoryException;
-
+import org.apache.jackrabbit.jcr2spi.WorkspaceManager;
 import org.apache.jackrabbit.spi.Event;
-import org.apache.jackrabbit.spi.EventFilter;
 import org.apache.jackrabbit.spi.EventBundle;
+import org.apache.jackrabbit.spi.EventFilter;
 import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
-import org.apache.jackrabbit.jcr2spi.WorkspaceManager;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.jcr.RepositoryException;
+import javax.jcr.observation.EventJournal;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.NoSuchElementException;
+
 /**
  * {@code EventJournalImpl} implement the JSR 283 event journal over SPI.
  */
@@ -129,7 +128,9 @@ public class EventJournalImpl implements
 
     @Override
     public void remove() {
-        throw new UnsupportedOperationException();
+        UnsupportedOperationException e = new UnsupportedOperationException("remove");
+        log.error(e.getMessage(), e);
+        throw e;
     }
 
     //----------------------------< internal >----------------------------------

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/FilteredEventIterator.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/FilteredEventIterator.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/FilteredEventIterator.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/observation/FilteredEventIterator.java Fri Sep 16 21:51:43 2011
@@ -16,21 +16,23 @@
  */
 package org.apache.jackrabbit.jcr2spi.observation;
 
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-import javax.jcr.observation.Event;
-import javax.jcr.observation.EventIterator;
-
 import org.apache.jackrabbit.spi.EventFilter;
 import org.apache.jackrabbit.spi.IdFactory;
 import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.jcr.observation.Event;
+import javax.jcr.observation.EventIterator;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
 
 /**
  * Implements an event iterator that converts SPI events into JCR events and
  * filters out the ones that are not accepted by an {@link EventFilter}.
  */
 class FilteredEventIterator implements EventIterator {
+    private static final Logger log = LoggerFactory.getLogger(FilteredEventIterator.class);
 
     /**
      * The actual {@link org.apache.jackrabbit.spi.Event}s fired by the repository service
@@ -136,7 +138,9 @@ class FilteredEventIterator implements E
      */
     @Override
     public void remove() {
-        throw new UnsupportedOperationException("EventIterator.remove()");
+        UnsupportedOperationException e = new UnsupportedOperationException("remove");
+        log.error(e.getMessage(), e);
+        throw e;
     }
 
     /**

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperation.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperation.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/AbstractOperation.java Fri Sep 16 21:51:43 2011
@@ -65,7 +65,9 @@ public abstract class AbstractOperation 
     @Override
     public void undo() throws RepositoryException {
         assertStatus(Status.PENDING);
-        throw new UnsupportedOperationException("Undo not supported.");
+        UnsupportedOperationException e = new UnsupportedOperationException("undo");
+        log.error(e.getMessage(), e);
+        throw e;
     }
 
     @Override
@@ -106,9 +108,9 @@ public abstract class AbstractOperation 
 
     protected final void assertStatus(Status status) {
         if (this.status != status) {
-            String msg = "Illegal status: found " + this.status + ", expected " + status;
-            log.debug(msg);
-            throw new IllegalStateException(msg);
+            IllegalStateException e = new IllegalStateException("Illegal status: found " + this.status + ", expected " + status);
+            log.error(e.getMessage(), e);
+            throw e;
         }
     }
 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/LockOperation.java Fri Sep 16 21:51:43 2011
@@ -19,6 +19,8 @@ package org.apache.jackrabbit.jcr2spi.op
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.LockInfo;
 import org.apache.jackrabbit.spi.NodeId;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jcr.RepositoryException;
 
@@ -26,6 +28,8 @@ import javax.jcr.RepositoryException;
  * {@code LockOperation}...
  */
 public class LockOperation extends AbstractOperation {
+    private static final Logger log = LoggerFactory.getLogger(LockOperation.class);
+    
     private final NodeState nodeState;
     private final boolean isDeep;
     private final boolean isSessionScoped;
@@ -93,17 +97,24 @@ public class LockOperation extends Abstr
 
     public void setLockInfo(LockInfo lockInfo) {
         if (lockInfo == null) {
-            throw new IllegalArgumentException("IdIterator must not be null.");
+            IllegalArgumentException e = new IllegalArgumentException("IdIterator must not be null.");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         if (this.lockInfo != null) {
-            throw new IllegalStateException("Merge operation has already been executed -> FailedIds already set.");
+            IllegalStateException e = new IllegalStateException("Merge operation has already been executed -> " +
+                    "FailedIds already set.");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         this.lockInfo = lockInfo;
     }
 
     public LockInfo getLockInfo() {
         if (lockInfo == null) {
-            throw new IllegalStateException("Merge operation has not been executed yet.");
+            IllegalStateException e = new IllegalStateException("Merge operation has not been executed yet.");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         return lockInfo;
     }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Merge.java Fri Sep 16 21:51:43 2011
@@ -115,17 +115,25 @@ public class Merge extends AbstractOpera
 
     public void setFailedIds(Iterator<NodeId> failedIds) {
         if (failedIds == null) {
-            throw new IllegalArgumentException("IdIterator must not be null.");
+            IllegalArgumentException e = new IllegalArgumentException("IdIterator must not be null.");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         if (this.failedIds != null) {
-            throw new IllegalStateException("Merge operation has already been executed -> FailedIds already set.");
+            IllegalStateException e = new IllegalStateException("Merge operation has already been executed " +
+                    "-> FailedIds already set.");
+            
+            log.error(e.getMessage(), e);
+            throw e;
         }
         this.failedIds = failedIds;
     }
 
     public Iterator<NodeId> getFailedIds() {
         if (failedIds == null) {
-            throw new IllegalStateException("Merge operation has not been executed yet.");
+            IllegalStateException e = new IllegalStateException("Merge operation has not been executed yet.");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         return failedIds;
     }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/Restore.java Fri Sep 16 21:51:43 2011
@@ -20,6 +20,8 @@ import org.apache.jackrabbit.jcr2spi.hie
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.Path;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.version.Version;
@@ -28,6 +30,8 @@ import javax.jcr.version.Version;
  * {@code Restore}...
  */
 public class Restore extends AbstractOperation {
+    private static final Logger log = LoggerFactory.getLogger(Restore.class);
+
     private final NodeState nodeState;
     private final Path relQPath;
     private final NodeState[] versionStates;
@@ -123,7 +127,9 @@ public class Restore extends AbstractOpe
      */
     public static Operation create(NodeState nodeState, Path relQPath, NodeState versionState, boolean removeExisting) {
         if (nodeState == null || versionState == null) {
-            throw new IllegalArgumentException("Neither nodeState nor versionState must be null.");
+            IllegalArgumentException e = new IllegalArgumentException("Neither nodeState nor versionState must be null.");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         return new Restore(nodeState, relQPath, new NodeState[] {versionState}, removeExisting);
     }
@@ -135,7 +141,9 @@ public class Restore extends AbstractOpe
      */
     public static Operation create(NodeState[] versionStates, boolean removeExisting) {
         if (versionStates == null || versionStates.length == 0) {
-            throw new IllegalArgumentException("Version states must not be null.");
+            IllegalArgumentException e = new IllegalArgumentException("Version states must not be null.");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         return new Restore(null, null, versionStates, removeExisting);
     }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetMixin.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetMixin.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetMixin.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetMixin.java Fri Sep 16 21:51:43 2011
@@ -21,6 +21,8 @@ import org.apache.jackrabbit.jcr2spi.sta
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jcr.RepositoryException;
 
@@ -28,6 +30,8 @@ import javax.jcr.RepositoryException;
  * {@code SetMixin}...
  */
 public class SetMixin extends TransientOperation {
+    private static final Logger log = LoggerFactory.getLogger(SetMixin.class);
+
     private static final int SET_MIXIN_OPTIONS = ItemStateValidator.CHECK_LOCK
             | ItemStateValidator.CHECK_VERSIONING;
 
@@ -108,7 +112,9 @@ public class SetMixin extends TransientO
 
     public static Operation create(NodeState nodeState, Name[] mixinNames) throws RepositoryException {
         if (nodeState == null || mixinNames == null) {
-            throw new IllegalArgumentException();
+            IllegalArgumentException e = new IllegalArgumentException("Node state and mixin names must not be null");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         return new SetMixin(nodeState, mixinNames);
     }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPrimaryType.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPrimaryType.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPrimaryType.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/SetPrimaryType.java Fri Sep 16 21:51:43 2011
@@ -20,6 +20,8 @@ import org.apache.jackrabbit.jcr2spi.sta
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.Name;
 import org.apache.jackrabbit.spi.NodeId;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jcr.RepositoryException;
 
@@ -27,6 +29,8 @@ import javax.jcr.RepositoryException;
  * {@code SetPrimaryNodeType}...
  */
 public class SetPrimaryType extends TransientOperation {
+    private static final Logger log = LoggerFactory.getLogger(SetPrimaryType.class);
+
     private static final int SET_PRIMARY_TYPE_OPTIONS =
             ItemStateValidator.CHECK_VERSIONING
             | ItemStateValidator.CHECK_LOCK;
@@ -97,10 +101,11 @@ public class SetPrimaryType extends Tran
 
     //------------------------------------------------------------< Factory >---
 
-    public static Operation create(NodeState nodeState, Name primaryTypeName)
-            throws RepositoryException {
+    public static Operation create(NodeState nodeState, Name primaryTypeName) throws RepositoryException {
         if (nodeState == null || primaryTypeName == null) {
-            throw new IllegalArgumentException();
+            IllegalArgumentException e = new IllegalArgumentException("Node state and primary type name must not be null");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         return new SetPrimaryType(nodeState, primaryTypeName);
     }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/operation/WorkspaceImport.java Fri Sep 16 21:51:43 2011
@@ -19,6 +19,8 @@ package org.apache.jackrabbit.jcr2spi.op
 import org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntry;
 import org.apache.jackrabbit.jcr2spi.state.NodeState;
 import org.apache.jackrabbit.spi.NodeId;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jcr.ImportUUIDBehavior;
 import javax.jcr.RepositoryException;
@@ -28,13 +30,17 @@ import java.io.InputStream;
  * {@code WorkspaceImport}...
  */
 public class WorkspaceImport extends AbstractOperation {
+    private static final Logger log = LoggerFactory.getLogger(WorkspaceImport.class);
+    
     private final NodeState nodeState;
     private final InputStream xmlStream;
     private final int uuidBehaviour;
 
     private WorkspaceImport(NodeState nodeState, InputStream xmlStream, int uuidBehaviour) {
         if (nodeState == null || xmlStream == null) {
-            throw new IllegalArgumentException();
+            IllegalArgumentException e = new IllegalArgumentException("Node state and XML stream must not be null");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         this.nodeState = nodeState;
         this.xmlStream = xmlStream;

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/NodeIteratorImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/NodeIteratorImpl.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/NodeIteratorImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/NodeIteratorImpl.java Fri Sep 16 21:51:43 2011
@@ -128,7 +128,9 @@ public class NodeIteratorImpl implements
     @Override
     public void skip(long skipNum) throws NoSuchElementException {
         if (skipNum < 0) {
-            throw new IllegalArgumentException("skipNum must not be negative");
+            IllegalArgumentException e = new IllegalArgumentException("skipNum must not be negative");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         if (skipNum == 0) {
             // do nothing
@@ -203,7 +205,9 @@ public class NodeIteratorImpl implements
      */
     @Override
     public void remove() {
-        throw new UnsupportedOperationException("remove");
+        UnsupportedOperationException e = new UnsupportedOperationException("remove");
+        log.error(e.getMessage(), e);
+        throw e;
     }
 
     //------------------------------------------------------------< private >---

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/QueryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/QueryImpl.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/QueryImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/QueryImpl.java Fri Sep 16 21:51:43 2011
@@ -24,6 +24,8 @@ import org.apache.jackrabbit.spi.commons
 import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
 import org.apache.jackrabbit.spi.commons.value.ValueFormat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jcr.ItemNotFoundException;
 import javax.jcr.Node;
@@ -43,6 +45,7 @@ import java.util.Map;
  * Provides the default implementation for a JCR query.
  */
 public class QueryImpl implements Query {
+    private static final Logger log = LoggerFactory.getLogger(QueryImpl.class);
 
     /**
      * The session of the user executing this query
@@ -190,7 +193,10 @@ public class QueryImpl implements Query 
     @Override
     public void bindValue(String varName, Value value) throws RepositoryException {
         if (!varNames.contains(varName)) {
-            throw new IllegalArgumentException(varName + " is not a known bind variable name in this query");
+            IllegalArgumentException e = new IllegalArgumentException(varName + " is not a known bind variable name in " +
+                    "this query");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         if (value == null) {
             boundValues.remove(varName);

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/QueryObjectModelImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/QueryObjectModelImpl.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/QueryObjectModelImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/QueryObjectModelImpl.java Fri Sep 16 21:51:43 2011
@@ -152,8 +152,7 @@ public class QueryObjectModelImpl extend
         }
 
         @Override
-        public void bindValue(String varName, Value value)
-                throws IllegalArgumentException, RepositoryException {
+        public void bindValue(String varName, Value value) throws IllegalArgumentException, RepositoryException {
             throw new UnsupportedOperationException();
         }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/RowIteratorImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/RowIteratorImpl.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/RowIteratorImpl.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/query/RowIteratorImpl.java Fri Sep 16 21:51:43 2011
@@ -25,6 +25,8 @@ import org.apache.jackrabbit.spi.QueryRe
 import org.apache.jackrabbit.spi.commons.conversion.NameException;
 import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver;
 import org.apache.jackrabbit.spi.commons.value.ValueFormat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jcr.ItemNotFoundException;
 import javax.jcr.Node;
@@ -44,6 +46,7 @@ import java.util.NoSuchElementException;
  * a {@link javax.jcr.query.QueryResult}.
  */
 class RowIteratorImpl implements RowIterator {
+    private static final Logger log = LoggerFactory.getLogger(RowIteratorImpl.class);
 
     /**
      * The result rows from the SPI implementation.
@@ -158,7 +161,9 @@ class RowIteratorImpl implements RowIter
      */
     @Override
     public void remove() {
-        throw new UnsupportedOperationException("remove");
+        UnsupportedOperationException e = new UnsupportedOperationException("remove");
+        log.error(e.getMessage(), e);
+        throw e;
     }
 
     /**

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java Fri Sep 16 21:51:43 2011
@@ -86,7 +86,9 @@ public abstract class ItemState<ENTRY_TY
             ItemDefinitionProvider definitionProvider) {
         
         if (entry == null) {
-            throw new IllegalArgumentException("Cannot build ItemState from 'null' HierarchyEntry");
+            IllegalArgumentException e = new IllegalArgumentException("Cannot build ItemState from 'null' HierarchyEntry");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         switch (initialStatus) {
             case EXISTING:
@@ -101,9 +103,10 @@ public abstract class ItemState<ENTRY_TY
             case STALE_DESTROYED:
             case MODIFIED:
             case REMOVED:
-                String msg = "illegal status: " + initialStatus;
-                log.debug(msg);
-                throw new IllegalArgumentException(msg);
+                IllegalArgumentException e = new IllegalArgumentException("illegal status: " + initialStatus);
+                log.error(e.getMessage(), e);
+                throw e;
+
         }
         hierarchyEntry = entry;
         this.isf = isf;
@@ -236,12 +239,17 @@ public abstract class ItemState<ENTRY_TY
         }
 
         if (oldStatus == Status.REMOVED) {
-            throw new IllegalStateException("State is already in terminal status " + oldStatus);
+            IllegalStateException e = new IllegalStateException("State is already in terminal status " + oldStatus);
+            log.error(e.getMessage(), e);
+            throw e;
         }
         if (Status.isValidStatusChange(oldStatus, newStatus)) {
             status = Status.getNewStatus(oldStatus, newStatus);
         } else {
-            throw new IllegalArgumentException("Invalid new status " + newStatus + " for state with status " + oldStatus);
+            IllegalArgumentException e = new IllegalArgumentException("Invalid new status " + newStatus +
+                    " for state with status " + oldStatus);
+            log.error(e.getMessage(), e);
+            throw e;
         }
         // Notify listeners about status change
         // copy listeners to array to avoid ConcurrentModificationException

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/NodeState.java Fri Sep 16 21:51:43 2011
@@ -120,7 +120,10 @@ public class NodeState extends ItemState
         boolean modified = false;
         if (another != null && another != this) {
             if (!another.isNode()) {
-                throw new IllegalArgumentException("Attempt to merge node state with property state.");
+                IllegalArgumentException e = new IllegalArgumentException("Attempt to merge node state with property " +
+                        "state.");
+                log.error(e.getMessage(), e);
+                throw e;
             }
             synchronized (another) {
                 NodeState otherState = cast(another);

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/PropertyState.java Fri Sep 16 21:51:43 2011
@@ -127,7 +127,10 @@ public class PropertyState extends ItemS
         boolean modified = false;
         if (another != null && another != this) {
             if (another.isNode()) {
-                throw new IllegalArgumentException("Attempt to merge property state with node state.");
+                IllegalArgumentException e = new IllegalArgumentException("Attempt to merge property state with node " +
+                        "state.");
+                log.error(e.getMessage(), e);
+                throw e;
             }
 
             PropertyData anotherData = Unchecked.<PropertyState>cast(another).data;
@@ -153,7 +156,9 @@ public class PropertyState extends ItemS
     @Override
     public boolean revert() {
         if (getStatus() == Status.NEW) {
-            throw new IllegalStateException("Cannot call revert on a NEW property state.");
+            IllegalStateException e = new IllegalStateException("Cannot call revert on a NEW property state.");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         if (transientData == null) {
             return false;

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/SessionItemStateManager.java Fri Sep 16 21:51:43 2011
@@ -208,7 +208,9 @@ public class SessionItemStateManager ext
 
     @Override
     public void execute(ChangeLog changes) throws RepositoryException {
-        throw new UnsupportedOperationException("Not implemented for SessionItemStateManager");
+        UnsupportedOperationException e = new UnsupportedOperationException("Not implemented for SessionItemStateManager");
+        log.error(e.getMessage(), e);
+        throw e;
     }
 
     @Override
@@ -223,7 +225,11 @@ public class SessionItemStateManager ext
 
     @Override
     protected void unimplemented(Operation operation) throws RepositoryException {
-        throw new UnsupportedOperationException("Internal error: unsupported operation " + operation.getName());
+        UnsupportedOperationException e = new UnsupportedOperationException("Internal error: unsupported operation " +
+                operation.getName());
+        
+        log.error(e.getMessage(), e);
+        throw e;
     }
 
     /**

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/WorkspaceItemStateFactory.java Fri Sep 16 21:51:43 2011
@@ -508,8 +508,9 @@ public class WorkspaceItemStateFactory e
             degree--;
         }
         if (degree != 0) {
-            log.error("Parent of degree {} does not exist.", degree);
-            throw new IllegalArgumentException();
+            IllegalArgumentException e = new IllegalArgumentException("Parent of degree " + degree + " does not exist.");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         return parent;
     }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/AbstractReadableRepositoryService.java Fri Sep 16 21:51:43 2011
@@ -24,6 +24,8 @@ import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.NodeInfo;
 import org.apache.jackrabbit.spi.QValue;
 import org.apache.jackrabbit.spi.SessionInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jcr.Credentials;
 import javax.jcr.ItemNotFoundException;
@@ -48,6 +50,7 @@ import java.util.Set;
  * underlying content.
  */
 public abstract class AbstractReadableRepositoryService extends AbstractRepositoryService {
+    private static final Logger log = LoggerFactory.getLogger(AbstractReadableRepositoryService.class);
 
     protected static final Set<String> WRITE_ACTIONS = new HashSet<String>(
             Arrays.asList("add_node", "set_property", "remove"));
@@ -77,13 +80,14 @@ public abstract class AbstractReadableRe
      * @throws IllegalArgumentException  if {@code defaultWsp} is {@code null}
      */
     protected AbstractReadableRepositoryService(Map<String, QValue[]> descriptors, Map<String, String> namespaces,
-                                                Reader cnd, List<String> wspNames, String defaultWsp)
-            throws RepositoryException, IllegalArgumentException {
+            Reader cnd, List<String> wspNames, String defaultWsp) throws RepositoryException, IllegalArgumentException {
 
         super(descriptors, namespaces, cnd);
 
         if (defaultWsp == null) {
-            throw new IllegalArgumentException("Default workspace is null");
+            IllegalArgumentException e = new IllegalArgumentException("Default workspace is null");
+            log.error(e.getMessage(), e);
+            throw e;
         }
 
         this.wspNames = Collections.unmodifiableList(new ArrayList<String>(wspNames));

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoBuilder.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoBuilder.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoBuilder.java Fri Sep 16 21:51:43 2011
@@ -26,13 +26,15 @@ import org.apache.jackrabbit.spi.Propert
 import org.apache.jackrabbit.spi.PropertyInfo;
 import org.apache.jackrabbit.spi.QValue;
 import org.apache.jackrabbit.spi.commons.identifier.IdFactoryImpl;
-import org.apache.jackrabbit.spi.commons.util.Iterators;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
 import org.apache.jackrabbit.spi.commons.name.NameFactoryImpl;
 import org.apache.jackrabbit.spi.commons.name.PathFactoryImpl;
 import org.apache.jackrabbit.spi.commons.util.Function1;
+import org.apache.jackrabbit.spi.commons.util.Iterators;
 import org.apache.jackrabbit.spi.commons.util.Predicate1;
 import org.apache.jackrabbit.spi.commons.value.QValueFactoryImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
@@ -72,6 +74,7 @@ import static org.apache.jackrabbit.spi.
  * </pre>
  */
 public final class ItemInfoBuilder {
+    static final Logger log = LoggerFactory.getLogger(ItemInfoBuilder.class);
 
     private ItemInfoBuilder() {
     }
@@ -349,7 +352,9 @@ public final class ItemInfoBuilder {
          */
         public NodeInfoBuilder build() throws RepositoryException {
             if (stale) {
-                throw new IllegalStateException("Builder is stale");
+                IllegalStateException e = new IllegalStateException("Builder is stale");
+                log.error(e.getMessage(), e);
+                throw e;
             }
             else {
                 stale = true;
@@ -389,7 +394,9 @@ public final class ItemInfoBuilder {
          */
         public NodeInfo getNodeInfo() {
             if (!stale) {
-                throw new IllegalStateException("NodeInfo not built yet");
+                IllegalStateException e = new IllegalStateException("NodeInfo not built yet");
+                log.error(e.getMessage(), e);
+                throw e;
             }
             return nodeInfo;
         }
@@ -427,7 +434,9 @@ public final class ItemInfoBuilder {
 
         private Path getPath() throws RepositoryException {
             if (localName == null && name == null) {
-                throw new IllegalStateException("Name not set");
+                IllegalStateException e = new IllegalStateException("Name not set");
+                log.error(e.getMessage(), e);
+                throw e;
             }
             
             if (parent == null && parentPath == null) {
@@ -545,9 +554,11 @@ public final class ItemInfoBuilder {
          */
         public PropertyInfoBuilder setType(int type) {
             if (!values.isEmpty() && type != values.get(0).getType()) {
-                throw new IllegalStateException("Type mismatch. " +
+                IllegalStateException e = new IllegalStateException("Type mismatch. " +
                         "Required " + PropertyType.nameFromValue(values.get(0).getType()) +
                         " found " + PropertyType.nameFromValue(type));
+                log.error(e.getMessage(), e);
+                throw e;
             }
 
             this.type = type;
@@ -565,9 +576,11 @@ public final class ItemInfoBuilder {
         public PropertyInfoBuilder addValue(QValue value) {
             int actualType = value.getType();
             if (type != PropertyType.UNDEFINED && type != actualType) {
-                throw new IllegalStateException("Type mismatch. " +
+                IllegalStateException e = new IllegalStateException("Type mismatch. " +
                         "Required " + PropertyType.nameFromValue(type) +
                         " found " + PropertyType.nameFromValue(value.getType()));
+                log.error(e.getMessage(), e);
+                throw e;
             }
 
             values.add(value);
@@ -729,8 +742,11 @@ public final class ItemInfoBuilder {
          */
         public PropertyInfoBuilder setMultivalued(boolean on) {
             if (!on && values.size() != 1) {
-                throw new IllegalStateException(
-                        "Cannot create single valued property when multiple values are present");
+                IllegalStateException e = new IllegalStateException("Cannot create single valued property when " +
+                        "multiple values are present");
+
+                log.error(e.getMessage(), e);
+                throw e;
             }
             isMultivalued = true;
             return this;
@@ -748,13 +764,19 @@ public final class ItemInfoBuilder {
          */
         public NodeInfoBuilder build() throws RepositoryException {
             if (stale) {
-                throw new IllegalStateException("Builder is stale");
+                IllegalStateException e = new IllegalStateException("Builder is stale");
+                log.error(e.getMessage(), e);
+                throw e;
             }
             else if (type == PropertyType.UNDEFINED) {
-                throw new IllegalStateException("Type not set");
+                IllegalStateException e = new IllegalStateException("Type not set");
+                log.error(e.getMessage(), e);
+                throw e;
             }
             else if (localName == null && name == null) {
-                throw new IllegalStateException("Name not set");
+                IllegalStateException e = new IllegalStateException("Name not set");
+                log.error(e.getMessage(), e);
+                throw e;
             }
             else {
                 stale = true;
@@ -792,7 +814,9 @@ public final class ItemInfoBuilder {
          */
         public PropertyInfo getPropertyInfo() {
             if (!stale) {
-                throw new IllegalStateException("PropertyInfo not built yet");
+                IllegalStateException e = new IllegalStateException("PropertyInfo not built yet");
+                log.error(e.getMessage(), e);
+                throw e;
             }
             return propertyInfo;
         }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/batch/AbstractChangeLog.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/batch/AbstractChangeLog.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/batch/AbstractChangeLog.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/batch/AbstractChangeLog.java Fri Sep 16 21:51:43 2011
@@ -18,6 +18,8 @@ package org.apache.jackrabbit.spi.common
 
 import org.apache.jackrabbit.spi.Batch;
 import org.apache.jackrabbit.spi.commons.util.Unchecked;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jcr.RepositoryException;
 import java.util.Iterator;
@@ -30,6 +32,7 @@ import java.util.List;
  * @param <T>
  */
 public abstract class AbstractChangeLog<T extends Operation> implements ChangeLog {
+    private static final Logger log = LoggerFactory.getLogger(AbstractChangeLog.class);
 
     /**
      * {@link Operation}s kept in this change log.
@@ -53,7 +56,9 @@ public abstract class AbstractChangeLog<
     @Override
     public Batch apply(Batch batch) throws RepositoryException {
         if (batch == null) {
-            throw new IllegalArgumentException("Batch must not be null");
+            IllegalArgumentException e = new IllegalArgumentException("Batch must not be null");
+            log.error(e.getMessage(), e);
+            throw e;
         }
         for (T op : operations) {
             op.apply(batch);
@@ -93,7 +98,9 @@ public abstract class AbstractChangeLog<
 
     @Override
     public int hashCode() {
-        throw new IllegalArgumentException("Not hashable");
+        IllegalArgumentException e = new IllegalArgumentException("Not hashable");
+        log.error(e.getMessage(), e);
+        throw e;
     }
 
 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/batch/ConsolidatingChangeLog.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/batch/ConsolidatingChangeLog.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/batch/ConsolidatingChangeLog.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/batch/ConsolidatingChangeLog.java Fri Sep 16 21:51:43 2011
@@ -26,6 +26,8 @@ import org.apache.jackrabbit.spi.Propert
 import org.apache.jackrabbit.spi.QValue;
 import org.apache.jackrabbit.spi.commons.name.PathFactoryImpl;
 import org.apache.jackrabbit.spi.commons.util.Unchecked;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jcr.RepositoryException;
 import java.util.Iterator;
@@ -42,6 +44,8 @@ import static org.apache.jackrabbit.spi.
  * concerning cancellation.
  */
 public class ConsolidatingChangeLog extends AbstractChangeLog<ConsolidatingChangeLog.CancelableOperation> {
+    static final Logger log = LoggerFactory.getLogger(ConsolidatingChangeLog.class);
+
     private static final PathFactory PATH_FACTORY = PathFactoryImpl.getInstance();
 
     /**
@@ -190,7 +194,9 @@ public class ConsolidatingChangeLog exte
         @Override
         public void remove() {
             if (done) {
-                throw new IllegalStateException("Cannot remove last element");
+                IllegalStateException e = new IllegalStateException("Cannot remove last element");
+                log.error(e.getMessage(), e);
+                throw e;
             }
             else {
                 it.remove();

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/identifier/AbstractIdFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/identifier/AbstractIdFactory.java?rev=1171815&r1=1171814&r2=1171815&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/identifier/AbstractIdFactory.java (original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/identifier/AbstractIdFactory.java Fri Sep 16 21:51:43 2011
@@ -17,13 +17,15 @@
 package org.apache.jackrabbit.spi.commons.identifier;
 
 import org.apache.jackrabbit.spi.IdFactory;
-import org.apache.jackrabbit.spi.PropertyId;
-import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.ItemId;
 import org.apache.jackrabbit.spi.Name;
+import org.apache.jackrabbit.spi.NodeId;
 import org.apache.jackrabbit.spi.Path;
 import org.apache.jackrabbit.spi.PathFactory;
+import org.apache.jackrabbit.spi.PropertyId;
 import org.apache.jackrabbit.util.Text;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.jcr.RepositoryException;
 import java.io.Serializable;
@@ -32,6 +34,7 @@ import java.io.Serializable;
  * {@code AbstractIdFactory}...
  */
 public abstract class AbstractIdFactory implements IdFactory {
+    private static final Logger log = LoggerFactory.getLogger(AbstractIdFactory.class);
 
     private static final char DELIMITER = '@';
 
@@ -41,7 +44,9 @@ public abstract class AbstractIdFactory 
         try {
             return new NodeIdImpl(parentId, path, getPathFactory());
         } catch (RepositoryException e) {
-            throw new IllegalArgumentException(e.getMessage());
+            IllegalArgumentException e0 = new IllegalArgumentException(e.getMessage(), e);
+            log.error(e0.getMessage(), e0);
+            throw e0;
         }
     }
 
@@ -60,7 +65,9 @@ public abstract class AbstractIdFactory 
         try {
             return new PropertyIdImpl(parentId, propertyName, getPathFactory());
         } catch (RepositoryException e) {
-            throw new IllegalArgumentException(e.getMessage());
+            IllegalArgumentException e0 = new IllegalArgumentException(e.getMessage(), e);
+            log.error(e0.getMessage(), e0);
+            throw e0;
         }
     }
 
@@ -123,7 +130,9 @@ public abstract class AbstractIdFactory 
 
         private ItemIdImpl(String uniqueID, Path path) {
             if (uniqueID == null && path == null) {
-                throw new IllegalArgumentException("Only uniqueID or relative path might be null.");
+                IllegalArgumentException e = new IllegalArgumentException("Only uniqueID or relative path might be null.");
+                log.error(e.getMessage(), e);
+                throw e;
             }
             this.uniqueID = uniqueID;
             this.path = path;
@@ -132,7 +141,10 @@ public abstract class AbstractIdFactory 
         private ItemIdImpl(NodeId parentId, Name name, PathFactory factory)
                 throws RepositoryException {
             if (parentId == null || name == null) {
-                throw new IllegalArgumentException("Invalid ItemIdImpl: parentId and name must not be null.");
+                IllegalArgumentException e = new IllegalArgumentException("Invalid ItemIdImpl: parentId and name must " +
+                        "not be null.");
+                log.error(e.getMessage(), e);
+                throw e;
             }
             uniqueID = parentId.getUniqueID();
             Path parentPath = parentId.getPath();



Mime
View raw message