Uncaught SilverStripe\Core\Injector\InjectorNotFoundException: Class <classname> does not exist

Silverstripe Version:5.3.3

I want to create a CsvBulkLoader and followed the example here: https://www.syntro.ch/blog/enable-csv-import-in-silverstripe-gridfields/
which seems to be a bit outdated (3 years ago) as I get the following error message:

Uncaught SilverStripe\Core\Injector\InjectorNotFoundException: Class classname does not exist

Can anyone please point me in the right direction? The class definitely exists and the spelling is 100% correct.
What has changed since the article mentioned above?

It would be helpful to share some actual code, and the error message in a bit more detail. It’s going to be very hard to offer any meaningful advice from your message

1 Like

Sorry Tim,
Thank you for your reply.
I somehow figured it out and I am not sure what at the end lead to getting it solved as I googled a lot and tried everything.
I followed some of the suggestions here: https://github.com/silverstripe/silverstripe-framework/issues/7968

I think the routes did the trick, but only putting the ‘\DocumentImportController’ in single quotes

---
Name: csvimport_routes
After: framework/routes#coreroutes
---
SilverStripe\Control\Director:
  rules:
    "importcontroller": '<mynamespace>\DocumentImportController'

Now I am stuck with the $duplicateChecks but for this I will open an new topic.