On 05/21/2014 07:01 AM, rsjay1976 . wrote:
Hi All,
When trying to replicate the Derby 5219 by running harness i am getting
the "Could not locate lang\supersimple.sql' issue.. I am attaching the
trace
With Regards
jayaram
C:\Derby\trunk>set
CLASSPATH="C:\Derby\trunk\jars\sane\derbyrun.jar;C:\Derby\tru
If you look at the source code for RunTest, you'll notice that it (for
reasons I don't know) uses Class.getResourceAsStream(String) to load the
sql-script file.
The javadoc for this method states:
"Before delegation, an absolute resource name is constructed from the
given resource name using this algorithm:
If the name begins with a '/' ('\u002f'), then the absolute name of
the resource is the portion of the name following the '/'.
Otherwise, the absolute name is of the following form:
modified_package_name/name
Where the modified_package_name is the package name of this object
with '/' substituted for '.' ('\u002e'). "
So unlike an FileIntputStream it will NOT accept a Windows-style path
(lang\supersimple.sql) but only a Unix-style path
(lang/supersimple.sql), even when running on Windows.
HTH
--
Regards,
Dyre