Posts Tagged ‘jdbc’

Making your Rails app work on Java

September 26th, 2009

So you’ve written a Rails app and you want to show it off to your boss at work because you know that it will impress them. Problem is that your company only uses Java and won’t consider it for their production environment if it can’t be deployed under a JVM. Let’s go:

  1. Install JRuby http://jruby.org
  2. Install the required gems for Ruby on Rails to work with JRuby
  3. jgem install mongrel activerecord-jdbcsqlite3-adapter rails
  4. Install the gems particular to your application
  5. jruby -S rake gems:install
  6. Update your database.xml file, prefixing your adapter with jdbc
  7. development:
      adapter: jdbcsqlite3
      database: db/development.sqlite3
      pool: 5
      timeout: 5000
  8. Start your JVM
  9. jruby script/server
  10. Demonstrate
  11. Sit back and wait for promotion

Some notes on whats going on above:

Getting Oracle XE to work with SpringFramework JDBC Template

July 30th, 2009

Ever get this error when using Oracle XE with SpringFramework JDBC Template?

SORA-12519, TNS:no appropriate service handler found

You can get around it by executing the following commands:

ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE;
ALTER SYSTEM SET SESSIONS=100 SCOPE=SPFILE;

Then stop and start database (Oracle XE service) and you’re good to go!

Remember:

  • needs to be capitals,
  • needs to have both entries
  • stop and start the database (oracle XE service)

Got this from the following two resources:

http://en.newinstance.it/2007/06/01/ora-12519-tnsno-appropriate-service-handler-found/
http://forum.springsource.org/showthread.php?p=133267