diff --git a/ccm-core/src/com/arsdigita/domain/DomainObjectTraversal.java b/ccm-core/src/com/arsdigita/domain/DomainObjectTraversal.java index 2975504f2..b49ead062 100755 --- a/ccm-core/src/com/arsdigita/domain/DomainObjectTraversal.java +++ b/ccm-core/src/com/arsdigita/domain/DomainObjectTraversal.java @@ -114,7 +114,11 @@ public abstract class DomainObjectTraversal { public static void registerAdapter(final String type, final DomainObjectTraversalAdapter adapter, final String context) { - registerAdapter(SessionManager.getMetadataRoot().getObjectType(type), + final ObjectType objectType = SessionManager.getMetadataRoot().getObjectType(type); + if (objectType == null) { + throw new IllegalArgumentException(String.format("Can't find object type '%s'", type)); + } + registerAdapter(objectType, adapter, context); } @@ -127,7 +131,11 @@ public abstract class DomainObjectTraversal { */ public static void unregisterAdapter(final String type, final String context) { - unregisterAdapter(SessionManager.getMetadataRoot().getObjectType(type), + final ObjectType objectType = SessionManager.getMetadataRoot().getObjectType(type); + if (objectType == null) { + throw new IllegalArgumentException(String.format("Can't find object type '%s'", type)); + } + unregisterAdapter(objectType, context); } diff --git a/ccm-core/src/log4j.properties b/ccm-core/src/log4j.properties index 31cf59d5f..052d33f8d 100755 --- a/ccm-core/src/log4j.properties +++ b/ccm-core/src/log4j.properties @@ -33,7 +33,7 @@ log4j.logger.com.arsdigita.web.CCMApplicationContextListener=INFO # For seeing progress of main runtime initialization process log4j.logger.com.arsdigita.runtime.CCMResourceManager=INFO -#log4j.logger.com.arsdigita.runtime.Runtime=INFO +log4j.logger.com.arsdigita.runtime.Runtime=INFO log4j.logger.com.arsdigita.bundle.Loader=INFO