object - relational mapping problem in Hibernate with Spring
Hello everyone. I have the following exception when mapping object - relational transaction in Hibernate configured with Spring: Code: INFO: Loaded JDBC driver: org.postgresql.Driver Exception in...
View ArticleJPA configuration - picks up wrong datasource
I have application A that calls library B. Each has its own database, datasource, jpa configuration, persistence unit and dao. All the names are unique to A. What happens: - A creates its tables in B's...
View ArticleMethod name query derivation on findAll with a sort clause
Hello, I have a Maven build on a Spring Data JPA project with some integration tests against the MySQL database. I have a query to sort all records of a table. The following works fine and the...
View ArticleAccess page.hasPreviousPage() in using Spring EL in a Web page?
org.springframework.data.domain.Page has two methods which would be useful for creating a paginator component in a Web page: hasPreviousPage() and hasNextPage(). However, if I am using Thymeleaf, and I...
View ArticleRepositoryFactorySupport.invoke(MethodInvocation) should call proceed?
Hi, I've been in the debugging an issue with exception translation. I discovered that the code which invokes repository methods when acting as part of an interceptor chain doesn't call...
View ArticleJdbcTemplate using nested queries
It has been a while since I developed a JDBC application. Is there a way for me to create a subquery for I am receiving a column unknown on my subquery? For example: select A.CUST_ID, A.NAME, A.AGE...
View ArticleDataSourceTransactionManager Locking mechanism
Hello, Recently I started to get DeadLock Exceptions from my MySQL database. This lead me to deeper locking mechanism investigation, but I failed to find proper info on how DataSourceTransactionManager...
View ArticleCDI Integration: Generics
I'm trying to implement a crud controller using a generic repository interface like this: Code: public interface ProjetoRepository extends JpaRepository<Projeto, Integer>, Serializable { } public...
View ArticleNoSuchMethodError: Using spring-data-mongodb (version 1.1.1)
Here are the dependencies: Code: <dependency> Â Â <groupId>org.springframework.data</groupId> Â Â <artifactId>spring-data-mongodb</artifactId>...
View Articlewhy TransactionTemplate doesnt support rollback rules
Code: RuleBasedTransactionAttribute rules = new RuleBasedTransactionAttribute(); rules.getRollbackRules().add(new NoRollbackRuleAttribute(RuntimeException.class)); Â TransactionTemplate...
View ArticleTransaction Management Over RMI (Weblogic)
Hi guys, I have a problem and I need some help to solve it: It could be possible to propagate the current transaction over RMI to another module in the same instance server? The application uses Spring...
View ArticleJtaTransactionManager no rollback after failed commit during "flush"
Update: I was testing it with Bitronix TM and it rollbacks perfectly, so the issue is in JBoss TM (arjuna) or in my configuration. Update 2 : It looks like transactions are not global, I've tried...
View ArticleReloading embedded database
Hello All, Look for advice/suggestion to our current issue. Overview: We have implemented something of a service bus where a server receives requests and delegates the request to respective modules...
View ArticleDebug connections to mysql from spring application
Hi, Our Spring application has jackrabbit content repository. It runs quartz based crons. It uses hibernate underneath. We are seeing the following exception in the logs. 2013-06-05 12:12:27,616...
View ArticleWhy can't we write a findAllOrderByStuff method derivation ?
Hi, Since we can have a findBy...OrderByStuff method derivation, why can't we have a similar findAllOrderByStuff for a finder with no where clause. Passing a Sort to an implementation is of course a...
View ArticlePotential conflict between sorting in the derivation method name and a Page...
Hello, I have a query derivation method with the name: public Page<Admin> findByFirstnameStartingWithOrLastnameStartingWithO rderByLastnameAscFirstnameAsc(String searchTerm, Pageable page); The...
View ArticleUpdate @Query not updating ?
Hi, I have an update query: Code: @Modifying @Transactional @Query("UPDATE Admin SET firstname = :firstname, lastname = :lastname, login = :login, superAdmin = :superAdmin, preferenceAdmin =...
View ArticleNo unique bean of type [javax.sql.DataSource] is defined
Hi all. I've done an app using spring and it works ok on Eclipse. With no errors on server startup. My problem is when y deploy on Tomcat 6 in my test environment. I have 4 data sources defined in...
View ArticleCould not create query metamodel for method
Hi, I have an error with Spring Data unable to parse my method name derivation query: Code: public Page<AdminModule> findByAdminOrderByModule(Admin admin, Pageable page); The data model is: Code:...
View Articlemultilpe persistence units with spring-data-jpa will not deploy to JBoss AS...
As documented in JIRA tickets for both Spring Data JPA and JBoss - any app which includes the spring-data-jpa library will not deploy to JBoss 7.1 or later The Problem: 1. JBoss validates all...
View Article