0

我有这个持久性单元:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.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_1_0.xsd">
 <persistence-unit name="HIAEWebservice">
 <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
 <class>alsc.ws.persistence.InCareAdmission</class>
 <class>alsc.ws.persistence.InCareCancelSchedule</class>
 <class>alsc.ws.persistence.InCareSchedule</class>
  <properties>
   <property name="eclipselink.jdbc.driver" value="oracle.jdbc.OracleDriver" />
   <property name="eclipselink.jdbc.url" value="jdbc:oracle:thin:@192.168.163.67:1521:EMRPPROD" />
   <!-- I work in this example without user / password.-->
   <property name="eclipselink.jdbc.user" value="interface_hiae" />
   <property name="eclipselink.jdbc.password" value="interpprod" />
  </properties>
 </persistence-unit>
</persistence>

当我尝试在 Oracle 数据库上插入时出现此错误:

ORA-00604: error occurred at recursive SQL level 1 
ORA-12705: Cannot access NLS data files or invalid environment specified

在我的服务器中,我没有 Oracle 客户端。我认为这是问题所在,但有没有我不需要使用 Oracle 客户端的解决方案?

谢谢您的回答

4

1 回答 1

0

据我所知,您的服务器不需要 Oracle 客户端即可使用瘦客户端驱动程序运行。

但是,Oracle 驱动程序似乎正在寻找 NLS 数据文件。 classes12.jar(对于 Java 1.2-1.3)、ojdbc14.jar(对于 Java 1.4)、ojdbc5.jar(对于 Java 5)或ojdbc6.jar(对于 Java 6)可能有也可能没有,具体取决于版本。

For the ones that have them as a separate download on Oracle's JDBC driver download page, have them named nls_charset11.jar, nls_charset12.jar, or orai18n.jar depending on the Oracle version and Java version.

于 2010-07-12T20:10:34.197 回答