Following is my aspect: I do not get any compile time errors but I do following exception when I start my jetty server: nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a
Tag: spring
java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotationUtils.isInJavaLangAnnotationPackage(Ljava/lang/annotation/Annotation;)Z
Am very new to spring and JUnit. Am trying to run a simple JUnit test case for spring service class, but it fails and I get this exception.I didnt write any test yet, but trying to run through before implementing. Using tomcat v7.0. And I dont think have any spring conflicting versions. Please help. Where else do i need to
Spring @Transactional on one service method spanning over two Hibernate transaction managers
I was wondering if it is possible to use two transaction manager in one service methods. Because due to the limitation of client’s mysql db configuration, we have got 2 different datasources within one database, i.e., one user/pwd/url per schema. Thats why i have to configured two transaction managers. Now I got problem when it comes to the service implementation.
Spring MVC web application: No default constructor found
Project ZIP: http://goo.gl/ddhLg5 Spring web app cannot be executed giving HTTP Status 500 error. It also writes out that No default constructor found for DSLR but in fact there is a default constructor. Maybe it has to do with application context or the way my beans declared? What is the reason my application cannot start? DSLR: web.xml DSLRServletController-servlet.xml: mvc-dispatcher-servlet.xml ERROR:
First level cache not working with JPA and Hibernate
I an new to use hibernate caching (first level, 2nd level and query cache). My project is configured using Spring MVC and JPA. I am testing first level cache using JUnit test case below. And my entity class is defined as : This should execute native query once in case first level cache is by default enabled. But I am
mvn spring-boot:run doesn’t start spring
ANSWER: I changed the version tag from 0.0.1-SNAPSHOT to 1.0.2.RELEASE and it worked, see answer below. I am following this documentation and have created the Example.java as instructed. When I run mvn spring-boot:run spring doesn’t start it just says BUILD SUCCESS. It’s my understanding that Spring should start and Tomcat serving up the page. Here are some details: Example.java located
How do I tell Spring Boot which main class to use for the executable jar?
My project has more than one class with a main method. How do I tell the Spring Boot Maven plugin which of the classes it should use as the main class? Answer Add your start class in your pom: or
How to implement only specific method of CrudRepository in Spring?
I’m using CrudRepository of spring-data-jpa to just define an interface of an entity and then having all standard crud methods without having to provide an implementation explicitly, eg: Though now I’d like to override only the save() method in my custom implementation. How could I achieve this? Because, if I implement the interface UserRepo, I’d have to implement all other
How to fix Hibernate LazyInitializationException: failed to lazily initialize a collection of roles, could not initialize proxy – no Session
In the custom AuthenticationProvider from my spring project, I am trying read the list of authorities of the logged user, but I am facing the following error: Reading other topics from here in StackOverflow, I understand this happens due the way this type of atribute is handled by the framework, but i can’t figure out any solution for my case.
List of ALL Spring Boot application properties
Is there a list of ALL properties that are available in a application.yml or application.properties file when using Spring Boot? I only seem to find the common ones. Answer As rightly pointed out by earlier answers you may find the “common” application properties listed here. But incase you need the comprehensive list of all properties, you may refer to spring-configuration-metadata.json.