Mar 22

Written by: Paul Rony
3/22/2006 10:47 PM 

While working on a component that will allow the SplendidCRM installation utility to update an existing database, we ran across an obscure Oracle bug.  Here is the error:

            PLS-00103: Encountered the symbol "" when expecting one of the following:     return


The error prevented all of our functions in Oracle to compile fine, but be marked as Invalid.  This had a cascading effect of causing our views in Oracle to generate an compiler error stating that a dependent function was invalid.


After hours of research and experimentation, we narrowed the problem down to the use of the carriage-return line-feed pair (CRLF) that is common to text files used on the Windows platform.  Whereas the rest of the world generally treats the CRLF pair as whitespace, Oracle does not.


The solution was to simply replace CRLF with LF before creating executing the scripts in Oracle.