Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev-tools reloading issue with spring-hateoas #4117

Closed
sergiorc opened this issue Oct 8, 2015 · 4 comments
Closed

Dev-tools reloading issue with spring-hateoas #4117

sergiorc opened this issue Oct 8, 2015 · 4 comments
Assignees
Labels
status: duplicate A duplicate of another issue

Comments

@sergiorc
Copy link

sergiorc commented Oct 8, 2015

Using, from spring-boot-starter 1.3.0.M5

  • spring-boot-devtools 1.3.0.M5
  • spring-hateoas 0.19.0.RELEASE
@SuppressWarnings({"rawtypes", "unchecked"})
@RequestMapping(method = RequestMethod.GET)
public ResponseEntity<?> findEscrituras(Pageable p, PagedResourcesAssembler<EscriturasBO> pagedResourcesAssembler) {
        Collection<Link> links = new ArrayList<Link>();
        // link to search(filter)
        links.add(linkTo(
                methodOn(EscriturasRestController.class).searchEscrituras(p, pagedResourcesAssembler,
                        new EscriturasBO())).withRel(EscriturasResource.SEARCH_REL));

It works ok until you make any modification in the application.
After devtools reload, invoking "findEscrituras" methods produces:

java.lang.ClassCastException: com.qipert.tseo.rest.escrituras.mvc.EscriturasRestController$$EnhancerByCGLIB$$2770108b cannot be cast to com.qipert.tseo.rest.escrituras.mvc.EscriturasRestController
    at com.qipert.tseo.rest.escrituras.mvc.EscriturasRestController.findEscrituras(EscriturasRestController.java:123) ~[classes/:na]
    at com.qipert.tseo.rest.escrituras.mvc.EscriturasRestController$$FastClassBySpringCGLIB$$cfc373ab.invoke(<generated>) ~[spring-core-4.2.0.RELEASE.jar:na]
@snicoll
Copy link
Member

snicoll commented Oct 8, 2015

Most probably a duplicate of #3805

@RobMaskell
Copy link

Looks similar to the one I raised a while ago #3784

@wilkinsona
Copy link
Member

@RobMaskell It does indeed. Thanks, and apologies; it looks like we missed that issue when you raised it.

@wilkinsona wilkinsona self-assigned this Oct 8, 2015
@wilkinsona
Copy link
Member

This is a duplicate of #3784

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

4 participants