-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: ORA-12705-error when using dbLink in Oracle
PostPosted: Wed Feb 01, 2006 4:39 am 
Newbie

Joined: Thu Jan 12, 2006 8:31 am
Posts: 4
Can anybody help me with the following problem:
We have an oracle database called DWS with a dblink to another oracle database DCP. We don't have any problem reading data from the DWS-database, but reading from DCP doesn't work. We always get the following error:

java.sql.SQLException: ORA-12705: invalid or unknown NLS parameter value specified
ORA-02063: preceding line from DCP

We get the same result using synonyms.
Strange thing: when we execute the same query in Toad there is no problem reading the dblink-query

Query: "select * from tcp710@dcp.world"

We use Eclipse 3.1.1

[b]Hibernate version:[/b]
Hibernate 3.0.5

[b]Full stack trace of any exception that occurs:[/b]
09:08:29 DEBUG [main]: opening JDBC connection
09:08:29 DEBUG [main]: total checked-out connections: 0
09:08:29 DEBUG [main]: using pooled JDBC connection, pool size: 0
09:08:29 DEBUG [main]: current autocommit status: false
09:08:29 DEBUG [main]: SQL query: select ibody from APPLICATION.TCP710 where ibody = '6566403'
09:08:29 DEBUG [main]: about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
09:08:29 DEBUG [main]: select ibody from APPLICATION.TCP710 where ibody = '6566403'
Hibernate: select ibody from APPLICATION.TCP710 where ibody = '6566403'
09:08:29 DEBUG [main]: preparing statement
09:08:31 DEBUG [main]: about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
09:08:31 DEBUG [main]: closing statement
09:08:31 DEBUG [main]: could not execute query [select ibody from APPLICATION.TCP710 where ibody = '6566403']
java.sql.SQLException: ORA-12705: invalid or unknown NLS parameter value specified
ORA-02063: preceding line from DCP

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:880)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2516)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2850)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:537)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:120)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1272)
at org.hibernate.loader.Loader.doQuery(Loader.java:391)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
at org.hibernate.loader.Loader.doList(Loader.java:1593)
at org.hibernate.loader.Loader.list(Loader.java:1577)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:112)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1414)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:153)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:603)
at com.volvocars.vcc.cws.data.OrderDao.getByBodyNumber(OrderDao.java:58)
at com.volvocars.vcc.cws.data.test.TestOrderDao.testGetByBodyNumber(TestOrderDao.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
09:08:31 WARN [main]: SQL Error: 12705, SQLState: 72000
09:08:31 ERROR [main]: ORA-12705: invalid or unknown NLS parameter value specified
ORA-02063: preceding line from DCP

09:08:31 ERROR [main]: class com.volvocars.vcc.cws.data.OrderDao
org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:1596)
at org.hibernate.loader.Loader.list(Loader.java:1577)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:112)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1414)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:153)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:603)
at com.volvocars.vcc.cws.data.OrderDao.getByBodyNumber(OrderDao.java:58)
at com.volvocars.vcc.cws.data.test.TestOrderDao.testGetByBodyNumber(TestOrderDao.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.sql.SQLException: ORA-12705: invalid or unknown NLS parameter value specified
ORA-02063: preceding line from DCP

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:880)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2516)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2850)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:537)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:120)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1272)
at org.hibernate.loader.Loader.doQuery(Loader.java:391)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
at org.hibernate.loader.Loader.doList(Loader.java:1593)
... 20 more
09:08:31 DEBUG [main]: rollback
09:08:31 DEBUG [main]: before transaction completion
09:08:31 DEBUG [main]: before transaction completion
09:08:31 DEBUG [main]: rolled back JDBC Connection
09:08:31 DEBUG [main]: after transaction completion
09:08:31 DEBUG [main]: after transaction completion
09:08:31 DEBUG [main]: - rollback
09:08:31 DEBUG [main]: closing session
09:08:31 DEBUG [main]: closing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
09:08:31 DEBUG [main]: returning connection to pool, pool size: 1
09:08:31 DEBUG [main]: after transaction completion
09:08:31 DEBUG [main]: after transaction completion
09:08:31 DEBUG [main]: - connection closed

[b]Name and version of the database you are using:[/b]
Oracle 8.1.7


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 03, 2006 3:40 am 
Newbie

Joined: Thu Jan 12, 2006 8:31 am
Posts: 4
I've found the solution myself.

My settings in Windows weren't the same as the NLS-parameters of the database. After changing these, everything works.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.