ffi woe

gem install pkg/process_shared-0.0.5.gem
Fetching: ffi-1.0.11.gem (100%)
Building native extensions. This could take a while…
ERROR: Error installing pkg/process_shared-0.0.5.gem:
ERROR: Failed to build gem native extension.

/home/rdp/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
checking for ffi.h… no
checking for ffi.h in /usr/local/include…

Gem files will remain installed in /home/rdp/.rvm/gems/ruby-1.9.2-p290/gems/ffi-1.0.11 for inspection.
Results logged to /home/rdp/.rvm/gems/ruby-1.9.2-p290/gems/ffi-1.0.11/ext/ffi_c/gem_make.out

might have meant “you’re installing ffi gem from two separate processes which collided” {?}

hibernate woe

org.h2.jdbc.JdbcSQLException: Table “ALL_SEQUENCES” not found; SQL statement:
This meant (for me) that I was specifying this dialect in the hibernate.cfg.xml

oracle.jdbc.driver.OracleDriver

org.hibernate.dialect.Oracle10gDialect

but then not overriding it [fully] with my Configuration#setProperty stuff.
The fix was to make sure to call configure before setproperty, like

cfg.configure();// reads from hibernate.cfg.xml
cfg.setProperty(“hibernate.dialect”, “org.hibernate.dialect.H2Dialect”); // overrides it
sf = cfg.buildSessionFactory();

hibernate override hibernate.cfg.xml

Here’s an example.

Configuration cfg = new Configuration(); // automagically sucks in hibernate.cfg.xml I guess…
cfg.configure();
cfg.setProperty(“connection.driver_class”, “org.h2.Driver”);
cfg.setProperty(“hibernate.connection.driver_class”, “org.h2.Driver”);
cfg.setProperty(“hibernate.connection.url”, “jdbc:h2:mem:db1;DB_CLOSE_DELAY=-1″);
cfg.setProperty(“hibernate.connection.username”, “sa”);
cfg.setProperty(“hibernate.connection.password”, “”);
cfg.setProperty(“hibernate.hbm2ddl.auto”, “create”); // recreate each time…
cfg.setProperty(“hbm2ddl.auto”, “create”); // recreate each time…
cfg.setProperty(“hibernate.dialect”, “org.hibernate.dialect.H2Dialect”);
sf = cfg.buildSessionFactory();

the key is to call configure *first* then override parameters.