Questions tagged [spring-mybatis]

527 questions
0
votes
1 answer

Transaction management doesn't appear to work on Spring Tests

I expect the data to be written to the database after the method with @Transactional is completed. Is this a valid assumption for my JUnit test when using a HSQL database. I am using HSQL db for development and Oracle for my deployed application.…
jimmy
  • 165
  • 1
  • 6
  • 18
0
votes
1 answer

Configuring mybatis to print out sql failed in a web project

I am using:spring 4.2.3+MyBatis 3.4,and want configure mybatis to print out sql. Configurations are below: **web.xml** ...
Alex Luya
  • 9,412
  • 15
  • 59
  • 91
0
votes
1 answer

Javers and MyBatis integration help needed

I'm having issues trying to get MyBatis and Javers (with Spring) integrated and working. I've followed instructions at http://javers.org/documentation/spring-integration/ and gotten the Aspect setup, and annotated my entity class and registered it…
Drizzt321
  • 993
  • 13
  • 27
0
votes
3 answers

Get the data which is inserted using @Transactional in the same transaction

I am inserting the data in one method(has @Transactional(propagation = Propagation.Required)) but in the other method(has @Transactional(propagation = Propagation.Required)) if I try to get the same data it is giving null. Both methods are wrote in…
Prasanna Kumar H A
  • 3,341
  • 6
  • 24
  • 52
0
votes
1 answer

Performance issue while inserting 2000 records using mybatis(3.2.8 version)

I am trying to insert 2000 records in Employee table in batch (using mybatis). My requirements are: 1. To log the error if any of the record fails to insert. 2. To continue with the insertion even if any one of the record fails. 3. Rollback should…
0
votes
1 answer

Mybatis sqlsession unable to rollback

I'm working in Spring project, using mybatis 3 and oracle 11g. I tried to rollback transactions when errors happen. However, rollback seems not to be working. Source code bellow: ApplicationContext.xml
Tran Tam
  • 699
  • 3
  • 14
  • 27
0
votes
0 answers

Update using foreach and hashmap in mybatis

I have written a query in myBatis as below. The issue in the below query is that. The value of col3 is the last value inserted in the Map which is passed to the query. It is not the value for the corresponding key.
mike
  • 11
  • 1
  • 4
0
votes
0 answers

Is it possible to set Cache at session that is unique for each user in mybatis

@Autowired @Qualifier("dashbSqlSessionFactory") private SqlSessionFactoryBean dashbSqlSessionFactory; @RequestMapping(value = "/clearcache", method = RequestMethod.POST) public @ResponseBody void clearCache() throws…
Srinivas Gadilli
  • 342
  • 6
  • 25
0
votes
1 answer

angularjs two way data binding with spring ,mybatis and restful services

i am developing an angulatJS application with CURD operations. here in my application i will create,edit and delete records ! i can able to do that but i was not able to bind the data in model, for that i need restart the browser to see the…
ajay
  • 7
  • 2
  • 8
0
votes
1 answer

Why List is not working in case of mybatis with java?

My service code here public HashMap syncEmployees(Long updatedAt, String userId) { HashMap outputMap = new LinkedHashMap(); **List** outputEmployee =…
Sameer Kazi
  • 17,129
  • 2
  • 34
  • 46
0
votes
1 answer

Vaadin7 with mybatis and Spring

i am new to Vaadin and Mybatis-Spring. My UI class could not invoke the Service class using the @Autowired annotation. I have appended @Service for the service class. My…
Menaga
  • 105
  • 1
  • 3
  • 10
0
votes
1 answer

Mybatis not able to perform query and map to apt Model class

I have a model class which only holds foreign keys to two other tables. Like this : CREATE TABLE `ToolOSRelation` ( `toolType` varchar(100) NOT NULL DEFAULT '', `OSName` varchar(50) NOT NULL DEFAULT '', PRIMARY KEY (`toolType`,`OSName`), …
0
votes
1 answer

MyBatis Inner query

In my code base, we have a MyBatis query like below, INSERT INTO TABLE_A( ID, NAME, VERSION ) VALUES ( #id#, #name#, (select NVL(max(version), 0 ) + 1 from SAE_PROC_SETTING where name =…
user184794
  • 1,036
  • 9
  • 15
0
votes
0 answers

SpringMVC and Mybatis can't run 'insert'

When I click submit in localhost:8080/myregister.jsp(controller: localhost:8080/user/register),it gets: Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):…
0
votes
1 answer

spring mybatis with mysql occur "Cannot create PoolableConnectionFactory (FUNCTION java_blog.getdate does not exist) " when select data

code: my java domain: User public class User { private long id; private String loginName; private String passWord; private String name; private String email; private String url; private Timestamp registerDate; private int status; private…
Atlas
  • 31
  • 6