This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes ORA-01009: missing mandatory parameter and line endings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "ORA-01009: missing mandatory parameter and line endings" Watch "ORA-01009: missing mandatory parameter and line endings" New topic

ORA-01009: missing mandatory parameter and line endings

Terry Mullett

Joined: Feb 21, 2003
Posts: 26
I've spotted a couple of other ORA-01009 related messages here but none quite with quite these symptoms. Has anyone else seen this?
Using jdk1.3 and classes12_01, if I create either a Statement or a PreparedStatement from a string read in from a file, I get ORA-01009 if the file had windows line endings. If I save the file back out with Unix line endings, there's no problem. This is not a fix, however, since in many (enough) cases, CVS will checkout files with Windows line endings on a Windows box, no matter how I happened to save the file. I guess I could set up a file type for this and call it binary for CVS's sake, but it's not really a CVS problem so I'd prefer not to go that way. Has anyone else encountered this or seen a way to make the driver forgiving of line endings?
BTW, the error doesn't occur when createStatement is called, but on the first time you call next() on the result set.
Peter den Haan
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Are they read from the file using a Java application? If so, are you using Readers or InputStreams? What stops you from stripping out or converting the line endings?
- Peter
I agree. Here's the link:
subject: ORA-01009: missing mandatory parameter and line endings
It's not a secret anymore!