我在Tomcat的context.xml中有以下代码:
maxActive="1" maxIdle="2" maxWait="2"
username="demo" password="demo"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@localhost:1521:orcl"/>
我在web.xml中有这个代码:
Oracle Datasource example
ds/OracleDS
javax.sql.DataSource
Container
我在persistence.xml中编写了代码,如:
oracle.toplink.essentials.PersistenceProvider
java:ds/OracleDS
我不懂java:d??s / OracleDS, ds / OracleDS< / res-ref-name>.错误是:
javax.persistence.PersistenceException: Exception [TOPLINK-7060] (Oracle TopLink Essentials - 2.0 (Build b40-rc (03/21/2007))): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: Cannot acquire data source [java:ds/OracleDS].
Internal Exception: javax.naming.NamingException: This context must be accessed through a java: URL