Questions tagged [spring-4]

Version 4.x of the Spring Framework

Use for general Spring related questions. This tag is for questions that are specific to versions 4.x only.

618 questions
0
votes
1 answer

Starting the Scheduled jobs during weblogic server start gives the NullpointerException in spring application

My requirement is to start the jobs during the weblogic server startup using the spring scheduler (ThreadpoolScheduler). Here is what i have done. Created the Scheduler in app-context.xml- task:scheduler id="scheduler" pool-size="10" Created a…
ram
  • 173
  • 2
  • 4
  • 13
0
votes
1 answer

Data not retrieving after saving in database in hibernate 4

I am using Hibernate 4 with Spring 4. I have created my own session factory and used Hibernate Transaction Manager. I have a problem while retrieving the data after saving. I am saving the data using ProcedureCall and in every method I am opening…
Balkrushn
  • 91
  • 1
  • 1
  • 12
0
votes
1 answer

Tomcat 7 sessions end unexpectedly Spring Security with message: HttpSession returned null object for SPRING_SECURITY_CONTEXT

We are facing an issue with our webapp deployed on Tomcat 7. Users are getting kicked out of the system even when its not under load. This is also happening when we run the application locally within eclipse. The application uses Spring Security…
Dhananjay
  • 642
  • 6
  • 15
0
votes
1 answer

Spring Security 4 - Allow Access To Controller And Authenticate Everything Else

I was following this github project to familiarize myself with Spring Security. I have the project up and running as is. I made a small modification to the OAuth2ServerConfiguration.java file trying to allow access to a controller and authenticating…
Hatem Jaber
  • 2,341
  • 2
  • 22
  • 38
0
votes
1 answer

Can't get an Entity from db

I have a postgree db. And spring+hibernate. When i wan't to get entity by any criteria, it is return me 0 length list. Looks like some dependency are missed, or like entity isn't recognized like Entity. My maven config: ... …
Yevgen Kulik
  • 5,713
  • 2
  • 22
  • 44
0
votes
1 answer

Spring mvc redirection pattern with parameters

I am trying to add a resource handler into my Spring Boot App (1.1.8.RELEASE) which must be able to convert this example. //From: {HOST_PREFIX_1}/u/{1}/{2}/myimage.jpg //To: {CDN_PREFIX_2}/u/{1}/{2}/images/myimage.jpg I don't know whether spring…
Antonio Acevedo
  • 1,480
  • 3
  • 21
  • 39
0
votes
1 answer

Error 400 when using @PathVariable in Spring 4 Groovy Controller

I'm trying to use Groovy as my Controller's language. I choose mkyong's example for this one. However Instead of Gradle, I use Maven. Here are my codes: pom.xml (dependencies only, changed here to Gradle format for reading purpose) compile…
Iqbal Djulfri
  • 718
  • 6
  • 14
0
votes
0 answers

Properties in Spring Environment

I'm trying to create a custom property placeholder. At my Spring Configuration Class I have this: @Configuration @Import(ConfigurationClass2.class) public class ConfigurationClass1 { @Bean @Lazy(false) public static…
Beto Neto
  • 3,962
  • 7
  • 47
  • 81
0
votes
1 answer

issue while deploying on weblogic 12c with autowiring SessionFactory

doing some POC work using hibernate4, Spring4, weblogic12c. its looking for javax.persistence.Table.indexes while deploying and its fails everytime. I have cross checked that hibernate-jpa-2.1-api-1.0.0.Final.jar is there in lib folder under…
DIY
  • 21
  • 1
  • 6
0
votes
1 answer

Spring thymeleaf: How to return url which is bind to controller

I have some example controller with method which return home page as follow: public class IndexController { @RequestMapping(value="/", method=RequestMethod.GET) public ModelAndView mainPage() { return new ModelAndView("home"); } …
masterdany88
  • 5,041
  • 11
  • 58
  • 132
0
votes
1 answer

Spring4 $ Tiles3 integration: Could not resolve view with name 'home' in servlet with name 'dispatcher'

I am a newbie to Spring, but until know I havent meet any serious problem. I would like to use some templeate mechanism with spring, so I've pick up Apache Tiles. I thought that it will be the easiest. But I struggle with it for almost 2 days now. I…
masterdany88
  • 5,041
  • 11
  • 58
  • 132
0
votes
0 answers

Spring4 & Tiles3 config programatically error: Caused by: java.io.FileNotFoundException:

I need Your help. I am trying to configure Spring4 to work with Tiles3. But I would like to be done with no xml. I've done some configuration already: package com.derp.common.init; import javax.servlet.ServletContext; import…
masterdany88
  • 5,041
  • 11
  • 58
  • 132
0
votes
1 answer

Java Spring 4 - why i need manually scan for beans in WebApplicationInitializer

I'm trying to setup a Web application with Spring 4.1 and Wicket 6.18. I want to use the full code approach. I have two test classes annotated with @Configuration and with @Bean. I want them to be discovered when i startup my app in Tomcat but it is…
Robert Niestroj
  • 15,299
  • 14
  • 76
  • 119
0
votes
2 answers

RequestMapping is not redirecting to correct JSP

What is happening is the home.jsp is not being displayed. When I type in the URL, the pages displayed, the JSPs display correctly. When clicking the link to create new, edit, or delete contact the URL is…
rray
  • 470
  • 3
  • 10
  • 27
0
votes
1 answer

Behaviour @RequestMapping's produces through RestTemplate and Web Browser

I am working with Spring 4.0.7 I have an entity where it is represented in JSON and XML. @Entity @Table(name="person") @XmlRootElement(name="person") @XmlType(propOrder = {"id",…,"address"}) public class Person implements Serializable { I have the…
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158