mybatis / mybatipse

Eclipse plugin adding support for MyBatis SQL Mapper Framework.
Eclipse Public License 1.0
333 stars 92 forks source link

typeHandler for interface gives a Class/TypeAlias not found error. #71

Closed rsprinkle closed 5 years ago

rsprinkle commented 7 years ago

The validator give a "Class/TypeAlias 'java.sql.Blob' not found." for the following declaration:

<typeHandler javaType="java.sql.Blob" jdbcType="BLOB" handler="EMBlobHandler" />

The declaration works fine in MyBatis. I believe the problem is that the validator is expecting a concrete class. I get an identical error for "java.sql.Clob".

harawata commented 7 years ago

Hi,

I couldn't reproduce it. MyBatipse does not check if it is an interface or a concrete class. It seems that your Eclipse could not find these classes in the project's classpath, for some reason. If cleaning the project didn't help, try creating a new workspace, please.

kazuki43zoo commented 7 years ago

@rsprinkle Could you confirm @harawata 's comment?

kenjdavidson commented 5 years ago

I also have this error, it happens on every typeAlias and typeHandler. The classes are definitely found, as the Mybatis functionality works for both. It's just the Mybatis XML validation that seems to not find the class.

In my particular instance, the project is setup like this: MainProject (pom = pom)

The Mybatis configuration is found in Project_common/src/resources while the types specified are found in Project_model. I was planning on looking into this issue myself, if I have time and do it, I will update accordingly.

harawata commented 5 years ago

@kenjdavidson , It's quite possible that the plugin does not support multi-module project. It would be great if you could take a look. Thank you!

kenjdavidson commented 5 years ago

I couldn't replicate the original issue either.

With regards to my issue, it looks like the person on my team just had their build path configured incorrectly so the error was actually correct. I should have noticed it the first time I looked by it was Friday.

Can probably close this.

harawata commented 5 years ago

Thanks for the follow-up! It's been a while with no reply from the reporter, so let's close.