On Dec 28, 8:30 am, greymatter <[email protected]> wrote: > I'm trying to embed HSQL into an application written in JRuby using > Sequel, but I'm not having much luck. My first question is should I > be able to do this? And if so, why isn't the driver being found when > I'm explicitly requiring it? > > This simple code... > > require 'sequel' > require 'C:/sw/hsqldb/lib/hsqldb.jar' > > $transientdb = Sequel.connect('jdbc:hsqldb:mem:testmem') if > $transientdb == nil > $permanentdb = Sequel.connect('jdbc:hsqldb:file:testfile') if > $permanentdb == nil > puts $transientdb.inspect > puts $permanentdb.inspect > > class Call < Sequel::Model($transientdb[:calls]) > set_schema do > primary_key :id > varchar :name > end > end > > Results in this output... > > #<Sequel::JDBC::Database: "jdbc:hsqldb:mem:testmem"> > #<Sequel::JDBC::Database: "jdbc:hsqldb:file:testfile"> > java/sql/DriverManager.java:602:in `getConnection': > java.sql.SQLException: No suitable driver found for > jdbc:hsqldb:mem:testmem (NativeException)
This error appears to be originating from outside of Sequel. Sequel just passes the JDBC connection string directly to getConnection (which is raising the error). On a hunch, try referencing the java HSQL connection class after requiring the jar, that may fix things. If that doesn't work, can you see if you can get HSQL working outside of Sequel? If so, it would be a lot easier to determine if Sequel is doing something incorrectly. Jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
