无法在Windows上通过网络创建Derby数据库,错误40000 / XJ041 / XBM02?

时间:2015-05-09 22:47:01

标签: derby javadb

我在the tutorial here

上对这个记录的示例尝试了几种变体
ij version 10.10
ij> connect 'jdbc:derby://localhost:1527/MyDbTest;create=true';
ERROR XJ041: DERBY SQL error: ERRORCODE: 40000, SQLSTATE: XJ041, SQLERRMC: Failed to create database 'MyDbTest', see the
 next exception for details.::SQLSTATE: XBM02
ij> connect 'jdbc:derby://localhost:1527/c:\temp\MyDbTest;create=true';
ERROR XJ041: DERBY SQL error: ERRORCODE: 40000, SQLSTATE: XJ041, SQLERRMC: Failed to create database 'c:\temp\MyDbTest',
 see the next exception for details.::SQLSTATE: XBM02
ij> connect 'jdbc:derby://localhost:1527/c:/temp/MyDbTest;create=true';
ERROR XJ041: DERBY SQL error: ERRORCODE: 40000, SQLSTATE: XJ041, SQLERRMC: Failed to create database 'c:/temp/MyDbTest',
 see the next exception for details.::SQLSTATE: XBM02
ij> connect 'jdbc:derby://localhost:1527/file://c:/temp/MyDbTest;create=true';
ERROR 08001: No suitable driver found for jdbc:derby://localhost:1527/file://c:/temp/MyDbTest;create=true
ij> connect 'jdbc:derby://localhost:1527/MyDbTest;create=false';
ERROR 08004: The connection was refused because the database MyDbTest;create=false was not found.
ij> connect 'jdbc:derby://localhost:1527/MyDbTest;create=true';
ERROR XJ041: DERBY SQL error: ERRORCODE: 40000, SQLSTATE: XJ041, SQLERRMC: Failed to create database 'MyDbTest', see the
 next exception for details.::SQLSTATE: XBM02
ij>

2 个答案:

答案 0 :(得分:1)

之前我有同样的错误,因为Db已经存在。

答案 1 :(得分:0)

当derby无法写入磁盘时,会出现这种类型的问题。使用管理员重新启动命令提示符。希望这个问题能解决。