spring-mybatis Questions

2

Solved

I'm using mybatis-spring 1.2.3 together with Spring4 to create a web application. The main data storage is MySQL in production environment, but I also use in-memory database H2 in unit testing. My...
Selah asked 10/11, 2015 at 9:44

5

Solved

I have a simple spring-boot-mybatis app (keep in mind, please). Mybatis is logging SQL queries only in case of failure (on excepions). Tell me please, how to force it to log all SQL query to consol...
Transmittance asked 6/12, 2016 at 17:18

9

Solved

I had the following error messages thrown when registering the mapper classes on my server startup, [artifact:mvn] 2016-05-07 11:39:21,708 [ERROR] org.mybatis.spring.mapper.MapperFactoryBean - Err...
Emylee asked 7/5, 2016 at 7:31

5

I am using MyBatis with an Oracle 11g R2 database. I am using MyBatis 3.3 with ojdbc6 12.1.0.2. My issue is whenever I tried to insert an object that is null I get the following. org.springframe...
Diplopod asked 18/8, 2015 at 19:40

3

Solved

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 sam...
Harlin asked 21/3, 2016 at 13:43

1

I am using MyBatis Spring Boot Starter version 2.1.3. Ever since moving to Spring Boot 2.2.7 (I've also tried 2.2.8 and 2.3.1 with the same results), I've had a problem using the MockBean annotatio...
Digestion asked 16/6, 2020 at 13:27

5

I am trying to use Spring Data JPA with MyBatis. Since there isnt a Vendor Adapter for MyBatis, what is the alternative here? <bean id="entityManagerFactory" class="org.springframework.orm.jpa...
Stope asked 11/11, 2015 at 14:42

1

Solved

I would like to understand why is spring-data-jdbc providing integration to MyBatis. What problem is it solving? How is spring-data-jdbc complimenting MyBatis. Is it just a question of conform...
Capital asked 23/5, 2019 at 10:46

1

Solved

I have a mybatis mapper file xml with complex queries lot of where clauses with conditions. Is there any way I can create possible queries combination? I want to run explain on all these queries ...
Aryanize asked 6/9, 2018 at 5:50

1

Solved

I'm aware that all spring steps need to have a reader, a writer, and optionally a processor. So even though my step only needs a writer, I am also fibbing a reader that does nothing but make spring...
Slangy asked 2/2, 2018 at 20:51

1

I am using Spring MVC with Spring-Mybatis for performing basic CRUD operations using Annotations(@Insert, @Select etc) and getting this following exception org.apache.ibatis.binding.BindingExcept...
Bunce asked 2/11, 2015 at 13:41

2

Solved

what is the difference between TransactionManagementType.CONTAINER and TransactionManagementType.BEAN as Im using TransactionManagementType.CONTAINER in all of my EJBs and when ever the multiple i...

2

I have spring-boot app with mybatis as my ORM. I also use sqlserver 2012. I consider following scenario: void foo () { set current datasource as Datasource D1 (connected to database D1) do so...
Jackiejackinoffice asked 30/3, 2017 at 13:5

3

Solved

The goal is to rollback all/any transactions in case of failure. But this doesn't work as expected. We use Spring MVC + JMS + Service + Mybatis. In the logs, the JMS is set to rollback, but the ro...
Oration asked 7/3, 2017 at 14:51

4

Solved

I've been using Spring with MyBatis and it's been working really well for a single database. I ran into difficulties when trying to add another database (see reproducible example on Github). I'm u...
Schuman asked 23/3, 2016 at 17:11

2

Solved

I want to create a method to dynamically create tables just passing the table name as a variable. I have defined my xml mapper <mapper namespace="com.mappers.TableCreatorMapper"> <cache ...
Sorenson asked 28/8, 2015 at 12:17

2

Solved

I'm using MyBatis with second level cache activated via <cache/> in xml mapper files. Suppose I want to interact with the underlying DB/DataSource decoupled from MyBatis, for instance via d...
Sweyn asked 13/1, 2016 at 14:27

1

Solved

I'm facing the following exception when using Java 8 (1.8.0_60), Spring 4.2.1 and MyBatis 3.3.0 Sep 29, 2015 11:02:58 AM org.springframework.context.annotation.AnnotationConfigApplicationContext p...
Bubbly asked 28/9, 2015 at 18:14

1

Solved

I have an insert statement in MyBatis using Oracle 11g R2 on the backend with the Oracle ojdbc6 driver. I am repeatedly getting java.sql.SQLSyntaxErrorException: ORA-01745: invalid host/bind var...
Academician asked 18/8, 2015 at 20:24

1

Solved

I loop a collection, and only when the item of the collection is not null, then it will be inserted into the DB, the snippet code like that: <foreach collection="ids" item="id" separator=","&gt...
Mneme asked 5/8, 2015 at 3:26

2

Solved

Today I was preparing an example using Spring Boot and using MyBatis for the data access communication next to Spring-MyBatis. Here is the relevant project configuration (using maven): src/main/ja...
Nuthouse asked 15/5, 2015 at 7:15
1

© 2022 - 2024 — McMap. All rights reserved.