Monday, January 24, 2011

Fix Squirrel-SQL Install on Windows 7 64-bit

I wanted to evaluate the latest SquirrelSQL client on a Windows 7 64-bit desktop, so I downloaded the latest 3.2.1 version from the Squirrel-SQL SourceForge web site, and attempted to install the JAR file.

Once I had the squirrel-sql-3.2.1-install.jar, I simply tried to execute it in order to install Squirrel-SQL, but I quickly encountered some errors and issues preventing me from installing it.

Solving this particular bug...
So, what is causing this and how to fix this error?  Turns out you need to install the JAR file with administrator privileges.  But, Windows does not give you an easy "run JAR as administrator" or "install JAR as administrator" option from Windows Explorer.  So, here is what you need to do:
  • open up an administrator command prompt
  • navigate to the directory you have the squirrel-sql-3.2.1-install.jar file in
  • execute this command: java -jar squirrel-sql-3.2.1-install.jar
  • you should now step through the install... I installed it to: C:\Program Files\squirrel-sql-3.2.1
  • but,...
  • at the end of the install you may see the following error, which oddly enough does not seem to prevent Squirrel-SQL from working:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.izforge.izpack.panels.ShortcutPanel.isValidated(Unknown Source)
at com.izforge.izpack.installer.IzPanel.panelValidated(Unknown Source)
at com.izforge.izpack.installer.InstallerFrame.navigateNext(Unknown Source)
at com.izforge.izpack.installer.InstallerFrame.navigateNext(Unknown Source)
at com.izforge.izpack.installer.InstallerFrame$NavigationHandler.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Don't you just love such informative messages?!  NOT!

Running SquirrelSQL Now...
That stack-trace aside,at least Squirrel is working enough for me to evaluate it as a universal SQL-client now (I am first trying it with SQL-Server 2008R2; connected just fine).

To run it, you should be able to simple double-click (from Windows Explorer) the file: squirrel-sql.bat (in the C:\Program Files\squirrel-sql-3.2.1 directory it was installed to)

It has some nice features for data-scripting and other things... time to start playing with it.  I hope this helps someone else get past the issues with installing on 64-bit Windows 7 (and, here's hoping a better installer comes out in future releases).

1 comments:

Anonymous said...

That just saved me a lot of time, thanks for sharing.