阅读背景:

如何从.script文件初始化数据源期间让HSQLDB发出错误消息?

来源:互联网 

I am working on a Java application that will use some Hibernate (annotated by JPA) classes, backed by a HSQLDB datasource (DBCP BasicDataSource). I am trying to manually tweak the HSQLDB ".script" file (which I can't for the life of me find the authoritative name for by web searching/reading the docs; it's only mentioned in passing) to rapidly add some new in-memory tables for testing. The problem is, any errors that occur when HSQLDB is running this script don't seem to be reported or logged anywhere. For instance, if I have an INSERT statement within that .script (a very common usage scenario to set up an initial dataset), and there is a problem with it (like incorrect date format, incorrect number of columns, etc.), nothing is ever reported, and there is no exception. I only notice later on when the HQL query I construct in the test case throws an exception due to a NULL result, which the program is not expecting since the data set should be initialized properly at that point.I am working on a Java application that will us




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: