我使用H2数据库的DBMS从远程计算机,所以我启用了从浏览器远程访问如下:连接有一个远程数据库
webAllowOthers=true
但是当我试图从我的Java应用程序连接到服务器我得到这个错误从H2:
remote connections to this server are not allowed
截图:
而且也已经寻找到的代码分析仪(错误代码:9011 7):
REMOTE_CONNECTION_NOT_ALLOWED = 90117
与代码90117的错误尝试从另一台机器连接到TCP服务器,如果远程连接不允许时被抛出。要允许远程连接,使用选项-tcpAllowOthers在启动TCP服务器:
的Java org.h2.tools.Server -TCP -tcpAllowOthers
或者,从应用程序启动服务器时,使用: Server server = Server.createTcpServer(“ - tcpAllowOthers”); server.start();
我不明白如何激活tcpAllowOthers,它不.h2.server.properties存在吗?
+1快速反应,答案已经在http://www.h2database.com/html/tutorial.html#console_settings,:-) – 2012-03-23 11:35:02