Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [golo-dev] Can apparently not import java.sql.DriverManager

Hello,

I forgot the import statement works differently than Java.

DriverManager (including loading of the JDBC drivers) works fine when doing "import java.sql"

It's still a bug that the script silently crashes with the noted import statement, I guess.

Kind regards,
Vincent

On Sat, Feb 10, 2018, at 1:47 PM, Vincent wrote:
> Hello,
> 
> Wanted to write a script that converts the content of an old Derby 
> database to CouchDB JSON documents and wanted to use Golo for this.
> 
> However I encounter some strange behavior. When importing the 
> java.sql.DriverManager class, the program quits without writing anything 
> to the console.
> 
> Smallest script to reproduce (tried on Golo 3.2.0):
> 
> ===
> 
> module wut
> 
> import java.sql.DriverManager 
> 
> function main = |args| {
>     println("??!!")
> } 
> 
> ===
> 
> When running the script above (using the golo golo --files XXX.golo) 
> command , nothing is printed to the console when the program exits. 
> 
> I assume DriverManager is doing some magic to the classpath to add the 
> database drivers (I use golo's handy shebang command to automatically 
> load my JDBC driver which is in the "libs" subdir of my script), perhaps 
> that is causing some problems, but it would have been nice to at least 
> see an exception of some sort.
> 
> Best regards,
> Vincent


Back to the top