# [component_container_isolated]: Failed to load component: Failed to find class with name 'my_pkg::MyComponent': No match

- **ID:** `ros2/component-container-isolated-failed-load`
- **Domain:** ros2
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

The component class is not registered with the component container; either the class export macro is missing or the package's plugin description XML is incorrect.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| ROS 2 Humble | active | — | — |
| ROS 2 Iron | active | — | — |
| ROS 2 Rolling | active | — | — |

## Workarounds

1. **Add the RCLCPP_COMPONENTS_REGISTER_NODE macro to your component source file: `RCLCPP_COMPONENTS_REGISTER_NODE(my_pkg::MyComponent)` and ensure the package.xml exports the plugin: `<export><build_type>ament_cmake</build_type><ros2_component plugin="${prefix}/my_plugins.xml"/></export>`** (90% success)
   ```
   Add the RCLCPP_COMPONENTS_REGISTER_NODE macro to your component source file: `RCLCPP_COMPONENTS_REGISTER_NODE(my_pkg::MyComponent)` and ensure the package.xml exports the plugin: `<export><build_type>ament_cmake</build_type><ros2_component plugin="${prefix}/my_plugins.xml"/></export>`
   ```
2. **Check the plugin description XML file (e.g., my_plugins.xml) for correct library path: `<library path="libmy_pkg_component"><class type="my_pkg::MyComponent" base_class_type="rclcpp::Node"/></library>`** (85% success)
   ```
   Check the plugin description XML file (e.g., my_plugins.xml) for correct library path: `<library path="libmy_pkg_component"><class type="my_pkg::MyComponent" base_class_type="rclcpp::Node"/></library>`
   ```
3. **Run `ros2 component types` to verify the component is registered; if not listed, the export is missing.** (75% success)
   ```
   Run `ros2 component types` to verify the component is registered; if not listed, the export is missing.
   ```

## Dead Ends

- **Recompiling the package without cleaning build artifacts** — The issue is in plugin registration, not compilation; rebuild doesn't fix missing exports. (40% fail)
- **Manually copying the .so file to the container's library path** — The container loads via pluginlib, not direct library loading; registration is required. (80% fail)
- **Using component_container instead of component_container_isolated** — Both containers use the same plugin registration mechanism; the error will persist. (60% fail)
