Questions tagged [spring-mybatis]
527 questions
0
votes
1 answer
how to use 'select' in 'case when then' in mysql?
my mysql table is like this:
id value
1 10
2 20
3 30
4 40
5 50
there are two args:start and end,
what i want is like this:
when start=end, the result is 0
when start>end, the result is 'sum(value) where id<=start…

Boli-CS
- 550
- 1
- 5
- 14
0
votes
1 answer
MyBatis ORA-01745: invalid host/bind variable name
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 variable name
However I don't see what is causing the…

greyfox
- 6,426
- 23
- 68
- 114
0
votes
1 answer
ZonedDateTime in mybatis property map for insert to MS-SQL
I have a class (call it class A) that contains as an attribute a sub-class (call it class B).
So
public class Request {
private User user;
private ZonedDateTime requestTime;
//getters,setters
}
public class User {
private Integer…

mrkb80
- 581
- 2
- 8
- 25
0
votes
1 answer
mybatis:Attribute "resource" must be declared for element type "mapper"
Can someone tells me what's wrong with? I spent more than 2days to debug but i still cannot.Is there anything obvious wrong with this setup please. I followed a tutorial form the web.
Exception in thread "main"…

Dorian Tchinda Mouafo
- 1
- 2
- 6
0
votes
2 answers
PropertyPlaceholderConfigurers loading after parameterized DataSource bean
At the top of my application context I declare a PropertyPlaceholderConfigurer
...
...
Later on I declare a datasource bean parameterized by…

Daniel Lawry
- 85
- 5
0
votes
2 answers
How to import springConfig.xml into web xml
I am currently create a spring mvc eclipse project direct from spring mvc template in eclipse. I use mybatis api for dao crud. When i test the crud mybatis crud using junit there is not error. but when i try to use it with real controller there is…

chetra tep
- 189
- 5
- 20
0
votes
1 answer
Spring MVC with Mybatis crud : Error fail to load ApplicationContext when testing with Junit
I got error when I try to use mybatis crud with spring mvc 4. I use spring mvc project in eclipse/spring tool.I create spring mvc project directly not from maven project
Directories
mybatisConfig.xml

chetra tep
- 189
- 5
- 20
0
votes
1 answer
Is there a way to get the current executor type?
I'm trying to make a batch insert with the for each method, I get an exception telling me that I cannot change the running executor type.
This is very strange as I have an SQL session so defined:

Phate
- 6,066
- 15
- 73
- 138
-1
votes
1 answer
mysql query date erro
Why is the difference between the time of the database query and the result 13 hours?

YX_Rows
- 1
-1
votes
1 answer
Equals() returns false on 'Y' but returns true on 'Yes'
I'm doing an if statement in mybatis, and returns false even when the param is "Y", but returns true when the param is "Yes", why is this?

Rivaldo
- 33
- 5
-1
votes
1 answer
Mybatis property mapper error for List of objects in pojo class : spring Boot/mybatis
Please help : Issue description in below image URL, Issue description in below image URL, even setting property to cost/margin/retail or currentday also not working in mapper interface, Let me know, if i need to follow anything else?
[1]:…

Code Rockstar
- 9
- 3
-1
votes
1 answer
MyBatis map-underscore-to-camel-case not working
I am using MyBatis 2.0.0 and have problem: I have a userId and status field that need to retrieve data so I'm using Mybatis for it.
but when I try to get the data the MyBatis don't work and I keep getting the same error.
I've tried to add the lines…

nadav3200
- 11
- 1
- 5
-1
votes
1 answer
How to log connection info with Mybatis
When i have a error on a database connection, i need to log it (with Database name and username that tried to connect to the db, don't need to log the password), I use Sprig-Mybatis on my aplication.
Any ideas how to do that?
Best Regards

vmfesta
- 159
- 1
- 1
- 9
-1
votes
1 answer
caused by com.mysql.jdbc.exceptions.jdbc4.mysqlsyntaxerrorexception unknown column
I use springboot + mybatis and run with the SpringJUnit4ClassRunner, use the default database h2, and the scripts:
create table sql:
create TABLE IF NOT EXISTS `test_company` (
`id` bigint unsigned not null auto_increment,
`pid` …

Jarvis
- 371
- 1
- 10
- 22
-1
votes
2 answers
Nullpointer in a @Mock (mocking final static Hashtable) with Powermock
I have an application (Spring MVC 4 + Hibernate/JPA + MySQL + Maven integration example using annotations), integrating Spring with Hibernate using annotation based configuration.
I have this controller:
public class AndroidBackController {
…

Joaquim Maria Puyal i Ortiga
- 37
- 1
- 8