开发环境 IBM RAD 8.5、Websphere 8.5、JSF 2.0 JPA
当我尝试在我的 JSF2.0 应用程序中连接数据库时出现以下错误
There were errors initializing your configuration: <openjpa-2.2.1-SNAPSHOT-r422266:1325904 fatal user error> org.apache.openjpa.util.UserException: A connection could not be obtained for driver class "org.apache.derby.jdbc.EmbeddedDriver" and URL "jdbc:derby:F:\TrainingDB;create=true". You may have specified an invalid URL.
persistence.xml 文件如下
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="TrainingJPA">
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<class>com.ewt.traningjpa.entity.EmpTbl</class>
<properties>
<property name="openjpa.ConnectionDriverName" value="org.apache.derby.jdbc.EmbeddedDriver"/>
<property name="openjpa.ConnectionURL" value="jdbc:derby:F:\TrainingDB;create=true"/>
</properties>
</persistence-unit>
</persistence>
我使用 RAD 8.5 中可用的数据库开发选项创建了连接
我确定 URL 是正确的。此错误的其他可能原因是什么。
TIA