This is probably not the best answer for you, but if you look at this forum entry, you can see the problem.
http://forum.hibernate.org/viewtopic.ph ... d6709fa6ad
The basic problem is that the hibernate dialect does not have a column type mapped. I am not too familair with MySQL specific dialect (and maybe sql advanced features), but I would think your issue is with the 'file' syntax. I am assuming this is some sort of type. If this is correct, did you try running the query as a native sql query instead of a named query? I am not sure if the spring template does this or not (since I don't use spring).