Solved

Java Derby with Squirrel SQL

Posted on 2007-03-26
5
997 Views
Last Modified: 2011-10-03
I am using jre 1.6, java db 10.1.3.1, squirrel sql 2.4.1
I follow this instruction
http://db.apache.org/derby/integrate/SQuirreL_Derby.html#Configuring+SQuirreL+for+the+Derby+Embedded+JDBC+Driver
to set my driver (my driver is at C:\Sun\SDK\javadb\lib\derby.jar)

But I keep getting
org.apache.derby.iapi.services.context.ShutdownException:

followed is the stack trace:
org.apache.derby.iapi.services.context.ShutdownException:
      at org.apache.derby.iapi.services.context.ContextService.getFactory(Unknown Source)
      at org.apache.derby.jdbc.InternalDriver.<init>(Unknown Source)
      at org.apache.derby.jdbc.Driver20.<init>(Unknown Source)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
      at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at java.lang.Class.newInstance0(Unknown Source)
      at java.lang.Class.newInstance(Unknown Source)
      at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.registerSQLDriver(SQLDriverManager.java:75)
      at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager$MyDriverListener.propertyChange(SQLDriverManager.java:191)
      at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
      at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
      at net.sourceforge.squirrel_sql.fw.util.PropertyChangeReporter.firePropertyChange(PropertyChangeReporter.java:63)
      at net.sourceforge.squirrel_sql.fw.sql.SQLDriver.setJarFileNames(SQLDriver.java:281)
      at net.sourceforge.squirrel_sql.client.gui.db.DriverInternalFrame.applyFromDialog(DriverInternalFrame.java:253)
      at net.sourceforge.squirrel_sql.client.gui.db.DriverInternalFrame.performOk(DriverInternalFrame.java:230)
      at net.sourceforge.squirrel_sql.client.gui.db.DriverInternalFrame.access$200(DriverInternalFrame.java:60)
      at net.sourceforge.squirrel_sql.client.gui.db.DriverInternalFrame$3.actionPerformed(DriverInternalFrame.java:382)
      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 net.sourceforge.squirrel_sql.client.Application$1.dispatchEvent(Application.java:168)
      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)


What is the likely to be the problem? Any input  is welcome:)
0
Comment
Question by:william007
  • 2
5 Comments
 
LVL 30

Expert Comment

by:mayankeagle
ID: 18793587
I *think* its to do with your default Java version and classpath.
0
 
LVL 9

Accepted Solution

by:
william007 earned 0 total points
ID: 18806492
I manage get it to work now, but does not really know what crucial step that I make to make it work. I am using NetBeans IDE 5.5. Last step I make is, open the runtime tab, right click on the Java DB(network), and click "connect using", enter my user name and pasword, click on OK. After that I try to connect using Squirrel SQL, and it works.

Since I have not changed my classpath and install a new java version(I am using jdk 1.6), hence I suspect this is not the problem.

Since I have managed to get it work, I would like to closed this question by refunding.  Thanks for the assistance.
0
 
LVL 30

Expert Comment

by:mayankeagle
ID: 18813492
>>  click "connect using", enter my user name and pasword, click on OK.

That's the reason - the authenticaiton being used earlier was incorrect
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Creating and Managing Databases with phpMyAdmin in cPanel.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now