mybatis / old-google-code-issues

Automatically exported from code.google.com/p/mybatis
2 stars 4 forks source link

Should the namespace be the same as the real class name(Case Sensitivity)? #398

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the MyBatis are you using?
MyBatis3.0.5

Please describe the problem.  Unit tests are best!
Assume that, a class named "com.chorola.test.User".In the sql mapper xml 
file,use the namespace attribute with the value "com.chorola.test.User",
it works well,but "com.chorola.test.user" it failed and give more info as below:
Exception in thread "main" java.lang.NoClassDefFoundError: 
com/chorola/test/user (wrong name: com/chorola/test/user).

What is the expected output? What do you see instead?
In normal,it should work well,but it failed instead.

Original issue reported on code.google.com by YuanyiC...@gmail.com on 17 Sep 2011 at 8:05

GoogleCodeExporter commented 9 years ago
In java, class names are case sensitive. It would be really difficult to find a 
class out of a namespace if their cases do not match. Java will allow you to 
have two classes with the same name and different case in the same package.

Original comment by eduardo.macarron on 19 Sep 2011 at 6:37