File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Ora 01858 through java code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Ora 01858 through java code " Watch "Ora 01858 through java code " New topic
Author

Ora 01858 through java code

Gopalan Srinivasa
Greenhorn

Joined: Mar 19, 2002
Posts: 1
In a very peculiar condition the following code gives ora-01858(a non-numeric character was found where a numeric was expected) in one environment whereas it doesnt give in other environment.
In Environment 1
DEBUG - %%%%%%%% sbSQLDetailsMbrLp==select TB_TRS_LP.MKT_BID_RATE, PUBLISH_DT from TB_TRS_LP where TB_TRS_LP.SWIFT_CCY_CODE='HKD' and TB_TRS_LP.TENOR='O/N' and TO_DATE(TB_TRS_LP.PUBLISH_DT,'dd/MM/YYYY hh:mi:ss AM') <= TO_DATE('', 'dd/MM/YYYY hh:mi:ss AM') AND BKG_CODE='SIN' ORDER BY PUBLISH_DT DESC
ERROR - Exception: java.sql.SQLException: ORA-01858: a non-numeric character was found where a numeric was expected
ERROR - Exception: com.pbg.eplatform.exception.CDBException: Problem occured in DAO(CShowCustomerInterestRateDAO) due to SQLException!
Exception Raised - ORA-01858: a non-numeric character was found where a numeric was expected
In Environment 2 this goes perfectly fine. We are using Weblogic JDBC. If we execute the same query outside java code, the sql does nt throw any errors.
Any known issues or anybody who have come across this problem. please throw some light.
The oracle versions between environment 1 and 2 are as follows.

In Environment 1
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle8i Enterprise Edition Release 8.1.7.2.0 - Production
PL/SQL Release 8.1.7.2.0 - Production
CORE 8.1.7.0.0 Production
TNS for Solaris: Version 8.1.7.2.0 - Production
NLSRTL Version 3.4.1.0.0 - Production
SQL>
In Environment 2
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
PL/SQL Release 8.1.7.0.0 - Production
CORE 8.1.7.0.0 Production
TNS for 32-bit Windows: Version 8.1.7.0.0 - Production
NLSRTL Version 3.4.1.0.0 - Production
SQL>
 
wood burning stoves
 
subject: Ora 01858 through java code