I went through the instructions, step by step. But at the end of the 6th step, I got a blank page.
Even if I get to the end of the instruction, I still get the message:
[INFO] [talledLocalContainer] 15.07.2019 22:45:54 WARN http-nio-8080-exec-2 [DefaultPageErrorHandler.logWarningsForEachComponentExceptions:51] Component exception on org.example.components.SimpleComponent : org.hippoecm.hst.core.component.HstComponentException: Cannot find the class of /hst:hst/hst:configurations/myhippoproject/hst:pages/home: org.example.components.SimpleComponent
The class is in place, the application has restarted.
Check your resources
SimpledocumentResource.java
package org.example.rest;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import org.onehippo.cms7.essentials.components.paging.Pageable;
import org.onehippo.cms7.essentials.components.rest.BaseRestResource;
import org.onehippo.cms7.essentials.components.rest.ctx.DefaultRestContext;
import org.example.beans.Simpledocument;
/**
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
@Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.APPLICATION_FORM_URLENCODED})
@Path("/Simpledocument/")
public class SimpledocumentResource extends BaseRestResource {
@GET
@Path("/")
public Pageable<Simpledocument> index(@Context HttpServletRequest request) {
System.out.print("Hello World::Simpledocument");
return findBeans(new DefaultRestContext(this, request), Simpledocument.class);
}
@GET
@Path("/page/{page}")
public Pageable<Simpledocument> page(@Context HttpServletRequest request, @PathParam("page") int page) {
return findBeans(new DefaultRestContext(this, request, page, DefaultRestContext.PAGE_SIZE), Simpledocument.class);
}
@GET
@Path("/page/{page}/{pageSize}")
public Pageable<Simpledocument> pageForSize(@Context HttpServletRequest request, @PathParam("page") int page, @PathParam("pageSize") int pageSize) {
return findBeans(new DefaultRestContext(this, request, page, pageSize), Simpledocument.class);
}
}