开发者

Problem on persistence Unit and Oracle NLS

I have this persistence unit:

<?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>

I get this error when I try to insert on Oracle database:

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

In my server I don´t have Oracle client.. I think it's the problem but is there any solution t开发者_如何学编程hat I don't need to use Oracle client ?

Thank you for your answers


To my knowledge, your server doesn't need the Oracle client on it to run using the thin client driver.

However, the Oracle driver appears to be looking for NLS data files. classes12.jar (for Java 1.2-1.3), ojdbc14.jar (for Java 1.4), ojdbc5.jar (for Java 5) or ojdbc6.jar (for Java 6) may or may not have them depending on the version.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜