Spring at StackOverflow

Welcome to our StackOverflow page, where we maintain a list of StackOverflow tags that our engineering team monitors and participates in. If you are a previous forum.spring.io user, please read the blog post about the change or visit the read-only archive.

Active questions on StackOverflow

0
votes
0answers
9 views

form:error not showing error

When validating object controller just refreshes the page, instead showing errors via form:errors, can you tell me where is the problem. I guest it needs to get error from binding result and insert it
-2
votes
2answers
20 views

NullPointerException when validtion object

I get NullPointerException when validating object. I send to controller dto, and when validating it. I cant understan where is the problem because product that goes into validate method is not null, V
1
votes
1answers
53 views

Spring boot Hibernate could not deserialize: invalid stream header: 3433302E

I am having issue with spring boot hibernate: I have DATETIME field in MYSQL and I am trying to load to Java 8 Spring boot.However, it is throwing exception: >HHH000327: Error performing load comm
0
votes
1answers
19 views

SpringBoot + Apache Shiro Java Config

I have problems with implement SprigBoot WebApp using Apache Shiro(I had same problems with Spring Security but I read that Shiro is easier to implement - Unfortunately for me Not). So, at the beginn
0
votes
0answers
6 views

Using Hazel Cast to synchronize instances in a cluster

In my work place, we have a java system (tomcat,spring,hibernate,soap+rest web services). Some of the web services require the server to save state. For example, while performing some long service, th
0
votes
0answers
30 views

What is the most ideal way to add validation to Spring REST Service Request Parameters

I have a Spring-REST service that has support for GET, POST, PUT requests and they all have been mapped in a @Controller (Sorry for stating the obvious, just new to the technology) Now each method (R
0
votes
0answers
23 views

Spring Mongodb Query ArrayIndexOutOfBoundsException

I have following Spring MongoDB repository class. When I am trying to access this method I am getting following exception. Could you please let me know what's wrong with this one or how to populate Ta
0
votes
2answers
45 views

Is it good idea to use the Dao design patern with spring Boot, instead of using repository design pattern provided by spring data jpa?

actually I'm new on spring Boot but I've been using Spring for a little while. With spring, I used to handle my database(mysql) through a generic DAO with hibernate/JPA. However all the tutorials I fo
1
votes
0answers
179 views

Autowiring with constructor

Spring doc for Autowiring by constructor says that its same as byType, but for constructor arguments. If thats the case, then why doesnt the following program fail: config.xml <bean id="traing
0
votes
1answers
15 views

Spring Integration listen on queue without poller

I want to implement the HTTP endpoint using Spring Integration, which listen to the http requests, sends the request data as messages to the channel and another endpoint should listen messages on this
0
votes
2answers
686 views

Spring MVC can't reach application on Tomcat

I'm building an application with Spring MVC. I firstly created a Maven project with webapp archetype. I followed a tutorial (which gave the sources code) and I can't find where am I wrong ? The tuto
4
votes
1answers
8024 views

CreateQuery is not valid without active transaction

I'm trying to use the Spring @Transactional annotation, but i have problems when the method findAll is called and i have this error: org.hibernate.HibernateException: createQuery is not valid witho
0
votes
1answers
13 views

Failed convert from multipartFile to Blob

I want to save document to MySQL database. I have following controller @RequestMapping(value = "/save", method = RequestMethod.POST) public String save( @ModelAttribute("document")
1
votes
1answers
33 views

Why my spring @Transactional with REQUIRED can't rollback?

I try to write a very simple code to test @Transactional, but it won't rollback when I use Propagation.REQUIRED. Here is the code. @Component public class A { private JdbcTemplate jd
0
votes
1answers
13 views

spring-data-mongodb nested document projection

I have posts collection with nested document comments. Simply document schema looks like this: { "_id" : ObjectId("5867e5e64f768509c59f9392"), "userId" : 1, "comments": [ {
0
votes
0answers
10 views

Nested @RequestMapping - how it works in Apache Tiles view?

I am using Spring and Apache Tiles (to manage my views). I have Controller class: @Controller @RequestMapping("/insurancecompany") public class InsuranceCompanyController { @Autowired privat
0
votes
0answers
11 views

Jersey 2.23.2 + Spring 4.3.4 + Spring data JPA 1.10.5

We are developing a project currently using Jersey 1.18 ,Spring 3.1.0 and Spring data jpa 1.2.0.We are trying to migrate to Jersey 2.23.2 + Spring 4.3.4 + Spring data JPA 1.10.5,but we are getting lot
0
votes
4answers
154 views

How to write a RestController to update a JPA entity from an XML request, the Spring Data JPA way?

I have a database with one table named person: id | first_name | last_name | date_of_birth ----|------------|-----------|--------------- 1 | Tin | Tin | 2000-10-10 There's a JP
0
votes
1answers
23 views

unable to access instance variable in different method in spring mvc

In search() method I am setting value to ss variable, but getting null when when trying to access this inside run() or any other method. Recently I came to spring from struts. This senerio is possibl
-2
votes
0answers
12 views

Difference between Spring Security 3 and 4

What are the major differences between Spring Security 3 and Spring Security 4 ?
-1
votes
1answers
9 views

spring websocket scope missing

when i use the new "websocket" scope in a component, i get: java.lang.IllegalStateException: No Scope registered for scope name 'websocket' controller: @RestController @Scope(value = "websocket",
2
votes
1answers
8407 views

Spring Java based config and JUnit does not work when webmvc is enabled

I have started with a new Spring 3.2.0.RELEASE based application and I really wanted to do away with XML configuration since its a new project but I have run into a wall when it comes to writing Junit
0
votes
1answers
23 views

Understanding Spring Boot's Oauth2 starter

I started off looking at the Oauth2 starter project and minimal configuration. https://github.com/spring-projects/spring-security-oauth/blob/master/tests/annotation/jdbc/src/main/java/demo/Applicati
10
votes
3answers
153 views

Deserialization of JavaScript array to Java LinkedHashSet using Jackson and Spring doesn't remove duplicates

Let's say I have this client-side JSON input: { id: "5", types: [ {id: "1", types:[]}, {id: "2", types:[]}, {id: "1", types[]} ] } I have this class: class Entity {
0
votes
0answers
7 views

Getting error while joining table in hibernate

I want to join the table in hibernate but I am getting error "HTTP Status 500 - Request processing failed; nested exception is org.hibernate.PropertyAccessException: could not get a field value by ref
-6
votes
1answers
28 views

How to create own ConcurrentHashMap

One of the interview. My friend got the below interview. I tried to find the answer. But I could not. How to create own Concurrenthashmap?
0
votes
0answers
8 views

Cassandra Multi Tenant running scripts for DB/Table creation

Currently when I create database/tables in Cassandra I have to run scripts before fetching data. But now I want to create same Database for each tenant in multi tenant architecture. Do I need to creat
0
votes
0answers
16 views

Thymeleaf. Form. Could not parse as expression. Spring Hibernate

I tried different ways, but nothing works. I want to in the field gradeName (in database) write automatically in this way: IDxYyyyy, where x - idGrade (auto generated) and yyyy - actual year of start
0
votes
0answers
7 views

liquibase-hibernate5 not working with liquibase-maven-plugin

I'm using Spring Boot Starter 1.4.2.RELEASE + Hibernate 5 + Hibernate Spatial + Liquibase 3.5.3 + Liquibase Hibernate 5 (liquibase-hibernate5 3.6) + PostgreSQL and I can't make work the liquibase:diff
1
votes
1answers
22 views

Eliminate circular JSON in Java Spring Many to Many Relationship

I have a Spring application with 2 Entities that have a Many-to-Many relationship. There are Students and Groups. A student can be part of many groups and a group can have many students. Student Mode