Sometimes I hate springboot for different kind of hidden things. You just copy sample with dozens different annotations and then it doesn’t work and you have no any idea what is wrong ’cause you don’t see any logs about that So shortly – if you try to configure test suite for SpringBoot pay attention you [...]
Andriy Andrunevchyn
If you got such error on jdbc request java.lang.AssertionError at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.setObject(SQLServerPreparedStatement.java:1693) at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.setObjectNoType(SQLServerPreparedStatement.java:1530) at [...]
Andriy Andrunevchyn
I found out interesting thing – when you debug your app with active connection to Mongo it could cause unexpected issue at least if use spring mongo data What I noticed If you remove all data from collection you will not be able insert any new record to that collection Sometimes getAll method could return […]
Andriy Andrunevchyn
Spent some time to figure out why i cannot add properties on app context. Config was pretty trivial <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="properties" ref="configproperties" /> </bean> <bean id="configproperties" [...]
Andriy Andrunevchyn
I reinstalled my OS so that mongo either. When I deploy project, following error appeared in log Exception in thread "main" org.springframework.data.mongodb.CannotGetMongoDbConnectionException: Failed to authenticate to database [xxx], username = [xxx], password = [x*******x] I spend few hours adding user in robomongo and directly [...]
Andriy Andrunevchyn
Today we’ve got such exception org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation quick investigation on Spring sources led us to issue with json serialization. We use jackson for converting from object to json behind the scene For Spring 3.x we configured <dependency> [...]
Andriy Andrunevchyn
Вирішив поколупатись із Spring Boot і Spring Data Jpa і знайшов цікаву штуку. По дефолту у спрінга стоїть якийсь супероптимальний неймінг spring.jpa.hibernate.naming_strategy: org.hibernate.cfg.ImprovedNamingStrategy який використовує SNAKE_CASE і цей неймінг такий “ядучий” що навіть, якщо ви вказуєте явно camelCase назву для [...]
Andriy Andrunevchyn
Цікаву багу(особливість?) знайшов у mongo/spring-data-mongo Коли зберігаєш пустий ArrayList на зразок //value = new ArrayList(); mongoTemplate.save(new CacheElement(key, value), collectionName); То при вичитці монго повертає HashSet і відповідно кидає помилку java.lang.ClassCastException: java.util.HashSet cannot be cast to [...]
Andriy Andrunevchyn
Recent Comments