This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Ora 01858 through java code

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!