diff --git a/tapeserver/castor/exception/MemException.hpp b/common/exception/MemException.hpp
similarity index 98%
rename from tapeserver/castor/exception/MemException.hpp
rename to common/exception/MemException.hpp
index 6ba09e60b787bb96563d73f8bdce462c31e2615b..bdbaa188dfd914bb58d30471202f2f541e443569 100644
--- a/tapeserver/castor/exception/MemException.hpp
+++ b/common/exception/MemException.hpp
@@ -25,7 +25,7 @@
 #include "common/exception/Exception.hpp"
 #include <string>
 
-namespace castor {
+namespace cta {
 namespace exception {
 /**
  * A generic exception thrown when there is something wrong with the memory
diff --git a/tapeserver/castor/tape/tapeserver/daemon/DataPipeline.hpp b/tapeserver/castor/tape/tapeserver/daemon/DataPipeline.hpp
index 96be01db6bf0e5591fdf45affe13e432c0b7ef39..0054ac35faa2fe030b29adf8eac0f312aaff2a30 100644
--- a/tapeserver/castor/tape/tapeserver/daemon/DataPipeline.hpp
+++ b/tapeserver/castor/tape/tapeserver/daemon/DataPipeline.hpp
@@ -72,7 +72,7 @@ public:
     {
       castor::server::MutexLocker ml(&m_countersMutex);
       if (m_freeBlocksProvided >= m_blocksNeeded) {
-        throw castor::exception::MemException("DataFifo overflow on free blocks");
+        throw cta::exception::MemException("DataFifo overflow on free blocks");
       }
       m_freeBlocksProvided++;
       ret = m_freeBlocksProvided < m_blocksNeeded;
@@ -106,7 +106,7 @@ public:
     {
       castor::server::MutexLocker ml(&m_countersMutex);
       if (m_dataBlocksPushed >= m_blocksNeeded)
-        throw castor::exception::MemException("DataFifo overflow on data blocks");
+        throw cta::exception::MemException("DataFifo overflow on data blocks");
     }
     m_dataBlocks.push(mb);
     {
diff --git a/tapeserver/castor/tape/tapeserver/daemon/Payload.hpp b/tapeserver/castor/tape/tapeserver/daemon/Payload.hpp
index 14dae21d75eb86faee4792875f9da99e011d167d..7767bcb42a55204643ef27748b0200e275130ada 100644
--- a/tapeserver/castor/tape/tapeserver/daemon/Payload.hpp
+++ b/tapeserver/castor/tape/tapeserver/daemon/Payload.hpp
@@ -23,7 +23,7 @@
 #include <zlib.h>
 #include "castor/tape/tapeserver/file/DiskFile.hpp"
 #include "castor/tape/tapeserver/file/File.hpp"
-#include "castor/exception/MemException.hpp"
+#include "common/exception/MemException.hpp"
 #include "common/exception/EndOfFile.hpp"
 #pragma once 
 
@@ -45,7 +45,7 @@ public:
   Payload(size_t capacity):
   m_data(new (std::nothrow) unsigned char[capacity]),m_totalCapacity(capacity),m_size(0) {
     if(NULL == m_data) {
-      throw castor::exception::MemException("Failed to allocate memory for a new MemBlock!");
+      throw cta::exception::MemException("Failed to allocate memory for a new MemBlock!");
     }
   }
   
@@ -104,7 +104,7 @@ public:
       err << "Trying to read a tape file block with too little space left: BlockSize="
        << from.getBlockSize() << " remainingFreeSpace=" << remainingFreeSpace()
               << " (totalSize=" << m_totalCapacity << ")"; 
-      throw castor::exception::MemException(err.str());
+      throw cta::exception::MemException(err.str());
     }
     size_t readSize;
     try {
diff --git a/tapeserver/castor/tape/tapeserver/drive/DriveGeneric.cpp b/tapeserver/castor/tape/tapeserver/drive/DriveGeneric.cpp
index 08360b188d5cb140d1b80db81ea374cd92ef81d7..3b596566ae6a685ac3aef78d493d4b4818572426 100644
--- a/tapeserver/castor/tape/tapeserver/drive/DriveGeneric.cpp
+++ b/tapeserver/castor/tape/tapeserver/drive/DriveGeneric.cpp
@@ -27,7 +27,7 @@
 
 #include "castor/utils/Timer.hpp"
 #include "castor/utils/CRC.hpp"
-#include "castor/exception/MemException.hpp"
+#include "common/exception/MemException.hpp"
 
 namespace castor {
 namespace tape {
@@ -698,7 +698,7 @@ void drive::DriveGeneric::writeBlock(const void * data, size_t count)  {
         uint8_t * dataWithCrc32c =(new (std::nothrow)
           uint8_t [count+SCSI::logicBlockProtectionMethod::CRC32CLength]);
         if(NULL == dataWithCrc32c) {
-          throw castor::exception::MemException("Failed to allocate memory "
+          throw cta::exception::MemException("Failed to allocate memory "
             " for a new MemBlock in DriveGeneric::writeBlock!");
         }
         memcpy(dataWithCrc32c, data, count);
@@ -752,7 +752,7 @@ ssize_t drive::DriveGeneric::readBlock(void * data, size_t count)  {
         uint8_t * dataWithCrc32c =(new (std::nothrow)
           uint8_t [count+SCSI::logicBlockProtectionMethod::CRC32CLength]);
         if(NULL == dataWithCrc32c) {
-          throw castor::exception::MemException("In DriveGeneric::readBlock: Failed to allocate memory");
+          throw cta::exception::MemException("In DriveGeneric::readBlock: Failed to allocate memory");
         }
         ssize_t res = m_sysWrapper.read(m_tapeFD, dataWithCrc32c,
           count+SCSI::logicBlockProtectionMethod::CRC32CLength);
@@ -812,7 +812,7 @@ void drive::DriveGeneric::readExactBlock(void * data, size_t count, std::string
         uint8_t * dataWithCrc32c =(new (std::nothrow)
           uint8_t [count+SCSI::logicBlockProtectionMethod::CRC32CLength]);
         if(NULL == dataWithCrc32c) {
-          throw castor::exception::MemException("Failed to allocate memory "
+          throw cta::exception::MemException("Failed to allocate memory "
             " for a new MemBlock in DriveGeneric::readBlock!");
         }
         ssize_t res = m_sysWrapper.read(m_tapeFD, dataWithCrc32c,