diff --git a/include/dynamic-graph/entity.h b/include/dynamic-graph/entity.h
index b10217873e3e6a987b4db05060d86aa5cc836fa9..267a7fc59e858a2a6bd220caa06e2e36c5c2f9b8 100644
--- a/include/dynamic-graph/entity.h
+++ b/include/dynamic-graph/entity.h
@@ -60,10 +60,7 @@ namespace dynamicgraph
       return name;
     }
 
-    virtual const std::string& getClassName  () const
-    {
-      return CLASS_NAME;
-    }
+    virtual const std::string& getClassName  () const = 0;
 
     SignalBase<int>& getSignal (const std::string& signalName);
     const SignalBase<int>& getSignal (const std::string& signalName) const;
diff --git a/src/dgraph/entity.cpp b/src/dgraph/entity.cpp
index b71ba725252c03cb5641e0144f800f2b4b9788d8..0b5c5dbbdaa4ebb2e510f35c3de28cc65a910917 100644
--- a/src/dgraph/entity.cpp
+++ b/src/dgraph/entity.cpp
@@ -59,7 +59,7 @@ Entity( const string& name__ )
   if( name.length ()==0 )
     {
       stringstream oss; oss << rand ();
-      name = this->getClassName();
+      //name = this->getClassName(); Cannot call a virtual function from the constructor
       name+="::";
       name+=oss.str ();
     }