Questions tagged [spring-mybatis]
527 questions
0
votes
1 answer
Java exception when using Spring with MyBatis
i'm getting exception after getting into httpInvoker, it looks like this:
INFO: Initializing Spring FrameworkServlet 'httpInvoker' pro 23, 2015
4:34:04 PM org.apache.catalina.core.ApplicationContext log SEVERE:
StandardWrapper.Throwable…

DarioBB
- 663
- 2
- 8
- 29
0
votes
0 answers
Spring does not scan and register managed beans; @AutoWired injects nothing and #{SpringManagedBean} is unavailable in EL
Spring does not scan and register managed beans in spring boot application.
I don't know how to configure for Spring Boot + JSF + MyBatic application.
Application.java
@Configuration
@ComponentScan(basePackages={""})
@EnableAutoConfiguration
public…

Zaw Than oo
- 9,651
- 13
- 83
- 131
0
votes
1 answer
Which correct versions should I be using with Spring 4.1.6?
I'm not even sure if this is a version incompatibility, but based on my searches seems to be something like that.
Well, I'm upgrading some plugins on my project and it seems to be some version issue because with the old versions, everything works as…

Igor
- 1,397
- 3
- 24
- 56
0
votes
2 answers
Mapping data from database to JSON in Java Rest Web Service using MyBatis
I have to return a JSON formatted object, after fetching the data from the database.
Sample database is as below:
I want the JSON returned value to be as:
{
"Name": "Mark",
"Address": {
"Adr1": "123 Avenue",
"Adr2":…

Arnab
- 63
- 3
- 14
0
votes
1 answer
MyBatis Spring integration with Jetty, Map Config XML configuration not found
I am creating a new Spring application which has Jetty integrated and includes MyBatis through the usual MyBatis-Spring project.
So the application is a standalone java application (meaning no WebContent or WEB-INF folders), and I am starting it…

abdelrahman-sinno
- 1,157
- 1
- 12
- 33
0
votes
1 answer
mybatis-spring java annotation for multiple datasources
I can use the following code to configure multiple mybatis datasources in spring. What is the way to do it in mybatis-spring using java annotations and configuration (No xml)?
public class DataSourceSqlSessionFactory {
private Logger logger =…

user1003385
- 39
- 1
- 5
0
votes
1 answer
On closing transaction, Oracle DB Link doesn't update the database
I have some insert operations under the database "A". Next, I have an operation with the database "A" which connect with the database "B" using Oracle DB Link to update into the second one. When the method execution finish, all the operations over…

viczap
- 194
- 2
- 12
0
votes
1 answer
Return primary key on insert does not work myBatis-Spring
I have the following table and sequence
CREATE TABLE teacher
(
teacher_id serial NOT NULL,
teacher_name character varying(50),
CONSTRAINT teacher_pkey PRIMARY KEY (teacher_id)
)
CREATE SEQUENCE teacher_teacher_id_seq
INCREMENT 1
MINVALUE…

Khaino
- 3,774
- 1
- 27
- 36
0
votes
1 answer
myBatis 3 query from tables without relationship
I got 2 tables:
Table StatementDetails with columns:
private String detailId;
private BigDecimal tranxlogid;
private String statementId;
Table transLog with columns:
private BigDecimal tranxlogid;
private Date…

Tran Tam
- 699
- 3
- 14
- 27
0
votes
0 answers
Is there a way to get the DatabaseMetaData object from a Mybatis connection?
In other words I want an equivalent of this for Mybatis
DatabaseMetaData metadata = connection.getMetaData();

Yonoss
- 1,242
- 5
- 25
- 41
0
votes
1 answer
How to concat a number type in a select sql in Mybatis?
I want to select a result according to the search number parameter,for example, if I pass 7, I want the sql statement like select * from student where DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= date(CREATETIME),Now in Mybatis,I try to write like…

flower
- 2,212
- 3
- 29
- 44
0
votes
0 answers
Spring Boot 1.2.5.RELEASE & Spring Security 4.0.2.RELEASE - How to load configuration file before security context initialization?
I'm facing a problem with Spring: I'm migrating from Spring Security ver. 3.2.7.RELEASE to 4.0.2.RELEASE. Everything was working fine in older version, however a problem occured when it came to loading DataSource.
Let me describe the…
0
votes
1 answer
Returning joda DateTime outside of a class
I am having some trouble figuring out how to return a single DateTime from a SQL query using mybatis:
The relevant part of my interface:
DateTime getMinActual(@Param("IDs") List IDs);
The relevant part of my mapper xml:

mrkb80
- 581
- 2
- 8
- 25
0
votes
3 answers
mybatis spring application getting - org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
I know this question has been asked several times but none of the answers helped me.Hence I am asking it again. I read that this error occurs when interface class/package name is different than mapper xml's class/package. I am using the same…

user911
- 1,509
- 6
- 26
- 52
0
votes
1 answer
Understanding AsyncItemWriter in Spring Batch, and when is the chunk being written with MyBatis?
In the following, are my writes being commited to the database 1000 at a time -- because my commit interval in my Spring Batch job is set at 1000? The MyBatis SqlSessionFactory is defined as a BATCH execution:

Tim Schumacher
- 321
- 3
- 19