Running Derby as a server on Linux using JDK11

孤街浪徒 提交于 2020-06-28 08:35:22

问题


I am at my wits end!

  • I have a minimal install of Ubuntu Server 18.04 and OpenJDK 11 (headless).
  • Downloaded, to a local folder are the java 9+ binaries for Derby (db-derby-10.15.2.0-bin)

Path and Environment settings are all correct!

When I start the server startNetworkServer -h 0.0.0.0, I get an error when doing a simple connect using the ij command line tool

ij> connect 'jdbc:derby://localhost:1527/dbname;create=true';
ERROR XJ041: DERBY SQL error: ERRORCODE: 40000, SQLSTATE: XJ041, SQLERRMC: Failed to create database 'dbname', see the next exception for details.::SQLSTATE: XBM01::SQLSTATE: XJ001

The derby.log file makes reference to:

java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getenv.SOURCE_DATE_EPOCH")

Looking further into this error, I learned that I somehow need a security.profile. I found this website that seemed to be the answers to my problems. https://www.javacodegeeks.com/2020/04/apache-derby-database-jvm-security-policy.html

Following these pretty straight-forward instructions, I get:

java.security.AccessControlException: access denied
org.apache.derby.shared.common.security.SystemPermission( "engine", "usederbyinternals" )

来源:https://stackoverflow.com/questions/61602659/running-derby-as-a-server-on-linux-using-jdk11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!