Unable to locate custom component Java classes

Hello! I’ve been trying to create my custom component class following the documentation guides, however, Bloomreach does not seem to locate my classes, even though I’ve set hst:componentclassname to the correct value - again following the documentation. This is the error I get:

[INFO] [talledLocalContainer] 18.04.2022 13:54:35 WARN http-nio-9080-exec-7 [AbstractBaseOrderableValve.handleComponentExceptions:306] Component exception(s) found in page request, ‘Request{ method=‘GET’, scheme=‘http’, host=‘loca
lhost:9080’, requestURI=’/site/_cmsinternal/content’, queryString=‘null’}’.
[INFO] [talledLocalContainer] 18.04.2022 13:54:35 WARN http-nio-9080-exec-7 [DefaultPageErrorHandler.logWarningsForEachComponentExceptions:51] Component exception on org.example.components.SimpletestdocumentComponent : org.hippoec
m.hst.core.component.HstComponentException: Cannot find the class of /hst:myproject/hst:configurations/myproject-preview/hst:workspace/hst:containers/contentlist/simpledocument/simpledocumentitem: org.example.components.Simpletestd

This is on a fresh project as I thought I did something wrong with the configuration on my previous one. I’ve created my component classes in this directory: myproject\site\components\src\main\java\org\example\components. Do you have any idea what might be causing this issue?

The only thing I can think of is that you haven’t deployed that class. If you are local try doing a mvn clean verify. If on a server environment verify that you are deploying the correct version.

1 Like