|
So this was working and I'm not sure what's magically changed to cause it to not work, but I have custom type handlers that convert some DB data to special Enums. What's happening now is what's described in http://code.google.com/p/mybatis/issues/detail?id=570.
I.e., it's trying to use MyBatis's default Enum type handler instead of my registered one. How do I go about fixing this? I see the two lines in the bug detail, but have no idea where to make them or even what type of object "config" is. Thanks. |
|
Hi Adam, the issue you linked was of a user that was setting up
MyBatis using the API in the wrong order. If you are using XML then this is not your case. Could you fill and issue and write an small test (http://code.google.com/p/mybatis/wiki/Test) to show up the problem? 2012/5/1 icfantv <[hidden email]>: > So this was working and I'm not sure what's magically changed to cause it to > not work, but I have custom type handlers that convert some DB data to > special Enums. What's happening now is what's described in > http://code.google.com/p/mybatis/issues/detail?id=570. > > I.e., it's trying to use MyBatis's default Enum type handler instead of my > registered one. How do I go about fixing this? I see the two lines in the > bug detail, but have no idea where to make them or even what type of object > "config" is. > > Thanks. > > -- > View this message in context: http://mybatis-user.963551.n3.nabble.com/MyBatis-ignoring-custom-type-hander-for-Enum-tp3952202.html > Sent from the mybatis-user mailing list archive at Nabble.com. |
|
I am using XML. All configuration is in Spring and a separate mybatis-config file.
So this is weird. It runs fine when actually deployed in my web container, but my functional tests fail with that error. This is REALLY weird because my functional test code is using the same Spring services and same service methods as my functional tests. In fact, I'm using the exact same mybatis-config.xml and applicationConfig.xml files for both test and production. Could it be possible that how I'm constructing my functional tests is somehow wrong with respect to mybatis? On Tuesday, May 1, 2012 12:37:52 AM UTC-6, Eduardo wrote: Hi Adam, the issue you linked was of a user that was setting up |
|
Hi Adam, that sound weird indeed. Unfortunately I do not know what can
be happening. Please consider isolating the problem and submitting an issue so I can have a look at it 2012/5/1 Adam Gordon <[hidden email]>: > I am using XML. All configuration is in Spring and a separate > mybatis-config file. > > So this is weird. It runs fine when actually deployed in my web container, > but my functional tests fail with that error. This is REALLY weird because > my functional test code is using the same Spring services and same service > methods as my functional tests. In fact, I'm using the exact same > mybatis-config.xml and applicationConfig.xml files for both test and > production. > > Could it be possible that how I'm constructing my functional tests is > somehow wrong with respect to mybatis? > > > On Tuesday, May 1, 2012 12:37:52 AM UTC-6, Eduardo wrote: >> >> Hi Adam, the issue you linked was of a user that was setting up >> MyBatis using the API in the wrong order. If you are using XML then >> this is not your case. >> >> Could you fill and issue and write an small test >> (http://code.google.com/p/mybatis/wiki/Test) to show up the problem? >> >> 2012/5/1 icfantv: >> > So this was working and I'm not sure what's magically changed to cause >> > it to >> > not work, but I have custom type handlers that convert some DB data to >> > special Enums. What's happening now is what's described in >> > http://code.google.com/p/mybatis/issues/detail?id=570. >> > >> > I.e., it's trying to use MyBatis's default Enum type handler instead of >> > my >> > registered one. How do I go about fixing this? I see the two lines in >> > the >> > bug detail, but have no idea where to make them or even what type of >> > object >> > "config" is. >> > >> > Thanks. >> > >> > -- >> > View this message in context: >> > http://mybatis-user.963551.n3.nabble.com/MyBatis-ignoring-custom-type-hander-for-Enum-tp3952202.html >> > Sent from the mybatis-user mailing list archive at Nabble.com. |
|
I've been down this road before, unfortunately. I spend an hour setting up an isolated example only to not be able to reproduce the problem and given the time crunch I'm under at work I don't have the bandwidth to do this right now.
Is there an approved way of doing a functional test of a Spring service using mybatis/mybatis-spring? I suspect the problem is how Maven is loading stuff for running its functional tests because as I mentioned, it's not a problem in production. Thanks. On Tuesday, May 1, 2012 2:09:28 PM UTC-6, Eduardo wrote: Hi Adam, that sound weird indeed. Unfortunately I do not know what can |
|
After setting up a test project, and doing a line-by-line debug comparison we determined that someone removed the configLocation from the test Spring application context's sqlSessionFactoryBean definitions. oi. Many hours of my life I will never get back.
|
| Powered by Nabble | Edit this page |
