Prev: how to record screen acrtions programatically?
Next: Build A Home Internet Business For Extra Income Stream
From: Tom Anderson on 3 Apr 2010 09:31 Hi all, Derby aka JavaDB is included in JDK 1.6, right? So what's happening here: $ java -version java version "1.6.0_16" Java(TM) SE Runtime Environment (build 1.6.0_16-b01) Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing) $ javap org.apache.derby.jdbc.EmbeddedDriver ERROR:Could not find org.apache.derby.jdbc.EmbeddedDriver Am i looking for the wrong driver class? Or do i have to include some special jar on the classpath? I searched the entire JDK installation for a mention of EmbeddedDriver, and there was none. Do i have some special version of 1.6 which lacks Derby? I have whatever came with Eeebuntu 3, which is basically Ubuntu 9.04. I haven't used Derby since before 1.6, so i have no positive control for how this should work. Anyway, since it looked like Derby would be a separate download for me, i went with H2 instead :). tom -- It's never too late to change the future.
From: markspace on 3 Apr 2010 10:13 Tom Anderson wrote: > Am i looking for the wrong driver class? Or do i have to include some > special jar on the classpath? I think you do. It should be in the /db directory in the JDK's main directory. http://weblogs.java.net/blog/forsini/archive/2006/06/java_db_is_now.html
From: Lew on 3 Apr 2010 13:23 Tom Anderson wrote: > Derby aka JavaDB is included in JDK 1.6, right? So what's happening here: > > $ java -version > java version "1.6.0_16" > Java(TM) SE Runtime Environment (build 1.6.0_16-b01) > Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing) > $ javap org.apache.derby.jdbc.EmbeddedDriver > ERROR:Could not find org.apache.derby.jdbc.EmbeddedDriver What's happening there is that you didn't include Derby in the classpath. I have Derby, which came with the 1.6.0_18 download but had also come with my earlier 1.6 downloads, and get the same exact result from that command that you do. OTOH, when I command $ javap -classpath /opt/java/java/db/lib/derby.jar \ org.apache.derby.jdbc.EmbeddedDriver I get back: public class org.apache.derby.jdbc.EmbeddedDriver extends java.lang.Object implements java.sql.Driver{ public org.apache.derby.jdbc.EmbeddedDriver(); public boolean acceptsURL(java.lang.String) throws java.sql.SQLException; public java.sql.Connection connect(java.lang.String, java.util.Properties) throws java.sql.SQLException; public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String, java.util.Properties) throws java.sql.SQLException; public int getMajorVersion(); public int getMinorVersion(); public boolean jdbcCompliant(); static void boot(); static {}; } Ergo I conclude you have Derby, too, and that it came with your JDK download. > Am i [sic] looking for the wrong driver class? Or do i [sic] have to include some > special jar on the classpath? I searched the entire JDK installation for Apparently not the *entire* installation. > a mention of EmbeddedDriver, and there was none. Do i [sic] have some special > version of 1.6 which lacks Derby? I have whatever came with Eeebuntu 3, > which is basically Ubuntu 9.04. > > I haven't used Derby since before 1.6, so i have no positive control for > how this should work. > > Anyway, since it looked like Derby would be a separate download for me, > i [sic] went with H2 instead :). It's too bad your reason wasn't valid, at least not based on the information you provided here. -- Lew
From: John B. Matthews on 3 Apr 2010 15:02 In article <alpine.DEB.1.10.1004031423290.29735(a)urchin.earth.li>, Tom Anderson <twic(a)urchin.earth.li> wrote: > Derby aka JavaDB is included in JDK 1.6, right? So what's happening here: > > $ java -version > java version "1.6.0_16" > Java(TM) SE Runtime Environment (build 1.6.0_16-b01) > Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing) > $ javap org.apache.derby.jdbc.EmbeddedDriver > ERROR:Could not find org.apache.derby.jdbc.EmbeddedDriver > > Am i looking for the wrong driver class? Or do i have to include some > special jar on the classpath? I searched the entire JDK installation > for a mention of EmbeddedDriver, and there was none. Do i have some > special version of 1.6 which lacks Derby? I have whatever came with > Eeebuntu 3, which is basically Ubuntu 9.04. It's missing from Apple's distribution: $ find /System/Library/Frameworks/JavaVM.framework -iname \*derby\* I use the one in NetBeans: /Applications/NetBeans/glassfish-v2.1/javadb/lib/ or a more recent version in /opt/derby. > I haven't used Derby since before 1.6, so i have no positive control > for how this should work. > > Anyway, since it looked like Derby would be a separate download for me, i > went with H2 instead :). H2 makes a decent JPA repository, too. -- John B. Matthews trashgod at gmail dot com <http://sites.google.com/site/drjohnbmatthews>
From: Roedy Green on 3 Apr 2010 15:50
On Sat, 3 Apr 2010 14:31:46 +0100, Tom Anderson <twic(a)urchin.earth.li> wrote, quoted or indirectly quoted someone who said : > >I haven't used Derby since before 1.6, so i have no positive control for >how this should work. see http://mindprod.com/jgloss/jdbc.html#CONNECTING for sample code to connect to various SQL engines including Derby. My two Derby examples are for windows. I would hope Mac would be identical or very similar. -- Roedy Green Canadian Mind Products http://mindprod.com By 2009, computers will disappear. Displays will be written directly onto our retinas by devices in our eyeglasses and contact lenses. ~ Ray Kurzweil (born: 1948-02-12 age: 62) |