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

Displaytag excel export not working on Websphere 8

I am using displaytag with Spring 4 MVC in my application. The displaytag is supposed to support excel export of the table data. The export feature when tested on my local Tomcat 7 server works perfectly but does not seem to work on the Websphere 8…
Adish
  • 11
  • 5
0
votes
1 answer

Configuring rabbitmq with spring4 stomp and socksjs application

I am having issue with spring 4+Stomp+socks js app. It was working fine with simple message broker but when switch to rabbitmq it is not working and could not solve it with the answer mentioned at Configure External Broker(RabbitMQ) In…
user1188867
  • 3,726
  • 5
  • 43
  • 69
0
votes
1 answer

Should I use DI for Jersey API Client in Spring 4 application?

I have a java-spring application. I use jersey client for some connections to third-party services. I do not use other jersey features (such as features for restfull-services building etc.) Do I use dependency injection for creating of…
0
votes
0 answers

spring: share value between annotated beans like jsf applicationscope

I am working on a project with jsf 2.2 on the web side and spring 4 on the business side. I have a web filter which receives a parameter from the request url. From this parameter I have to connect to a database. There are cases where there are…
onderbewustzijn
  • 935
  • 7
  • 32
0
votes
1 answer

How apply a Spring Formatter in a standalone or testing application

I am working with Spring Framework 4.0.7 About Formatters For a Spring MVC application I have the following: @Autowired private Set> formatters; @Override public void addFormatters(FormatterRegistry registry) { …
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
0
votes
1 answer

Spring Web Flow LocalValidatorFactoryBean (JSR-349) does not work how is expected

I am working with Spring 4.0.7 and Spring Web Flow 2.4.0 I have the following (I am working with JSR 349): For an entity: @Min(value=1, message="{person.age.min}",groups={PersonRegistrationCheck.class}) @Max(value=115,…
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
0
votes
2 answers

Trying to generate error about Spring's @Autowired field injection for JUnit

I am working with Spring 4.0.7, and with JUnit about testing of course. About DI Spring offers @Autowired to be used in three locations constructor setter field I always work through the two first, why never the third option? Because I remember…
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
0
votes
0 answers

Spring 4 Using @Lazy and @Resource annotations together

I would like to lazy load a resource within a lazy loaded configuration class. it seems that it is not currently possible with Spring 4.1. @Configuration @Lazy public class ModificationConfiguration { @Resource(name="modProps") @Lazy …
Magnus Smith
  • 827
  • 2
  • 11
  • 28
0
votes
1 answer

hikaricp HikariConnectionProvider exception

When I trying to start tomcat I get this :"Cannot unwrap to requested type". I disabled hibernate properties but it does not impact for this. What I did wrong? Persistance config from annotation configuration begin here …
0
votes
0 answers

Spring 4.0 vs Java EE 7

I have an application using Spring Framework. Now I plan to convert it to web application. The research on Google shows that main competitor to Spring MVC is now Java EE 7. Are there any advantages to move to Java EE 7 instead of Spring? Please…
user2924714
  • 1,918
  • 1
  • 19
  • 26
0
votes
1 answer

Spring 4.0.x JSON/Ajax HTTP/1.1 406 Not Acceptable

I am working with Spring 4.0.5.RELEASE, Spring MVC through only Java Config I have in my pom.xml the following: org.codehaus.jackson jackson-mapper-asl
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
0
votes
0 answers

Spring MVC: Request Scope, trying to update a Command Object with binder.setDisallowedFields

I have this Object public class Deportista implements Serializable { private static final long serialVersionUID = 6229604242306465153L; private String id; ... @NotNull(message="{field.null}") public String getId() { …
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
0
votes
1 answer

Spring MVC, checking the @SessionAttributes content before and after status.setComplete()

For research and testing purposes I have the following: @Controller @RequestMapping(value="/deportista") @SessionAttributes(value={"deportistaRegistrar", "deportistaActualizar", "collections"}) public class DeportistaController { The values for…
Manuel Jordan
  • 15,253
  • 21
  • 95
  • 158
0
votes
0 answers

Generic Request Param (runtime construction)

My requests look like: http://... ?type[A].size=14 &type[B].query=test My @Controller has a method which should accept those generic request params: @RequestMapping(...) public void test(MyModel m) { ... } public static class MyModel { …
Benjamin M
  • 23,599
  • 32
  • 121
  • 201
0
votes
1 answer

How to mock a session in Spring 4 Java based config for unit test?

So I have a session scoped bean and naturally, I'm getting the error you would expect in my unit tests. java.lang.IllegalStateException: No Scope registered for scope 'Session' What is the proper Java based way to mock a session for a unit…
user447607
  • 5,149
  • 13
  • 33
  • 55