Prev: how to record screen acrtions programatically?
Next: Build A Home Internet Business For Extra Income Stream
From: John B. Matthews on 4 Apr 2010 22:43 In article <nospam-8651CF.15020803042010(a)news.aioe.org>, "John B. Matthews" <nospam(a)nospam.invalid> wrote: > 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\* Correction: Thanks to Tom's helpful reminder concerning `locate`, I see that Apple's 1.6 update puts Derby in /usr/share/java along with ant, junit, maven, etc. [...] -- John B. Matthews trashgod at gmail dot com <http://sites.google.com/site/drjohnbmatthews>
From: Tom Anderson on 5 Apr 2010 09:15 On Sun, 4 Apr 2010, Arne Vajh?j wrote: > On 04-04-2010 20:02, Tom Anderson wrote: >> See my response to Mark. There's still no sign of Derby on my machine. >> My reason was apparently valid. >> >> According to this rather antique blog post: >> >> http://blogs.sun.com/FrancoisOrsini/entry/ubuntu_users_gets_java_db >> >> Ubuntu decided to make Derby a separate package. Digging around in my >> package info, it seems that this is still the case, and i don't have it >> installed. And that i can't install it through the package manager, >> because of some funky Ubunutu version conflict lameness. Oh joy. > > That is pretty nasty of them. People that have installed Java expect > to have a complete Java. > > I don't think SUN should have bundled Derby, but they did and > tampering with the Java distribution is just bad. Strongly agreed. I want to use Java, not DebianJava. I don't want to have to go and start a thread on a newsgroup to double-check the fact that something that should work doesn't. Now i've wasted you guys' time as well as my own! > It may even be a violation of the license and/or trademark. I doubt that - neither Debian nor Ubuntu are that stupid. tom -- Big Bang. No god. Fadeout. End. -- Stephen Baxter
From: Tom Anderson on 5 Apr 2010 10:09 On Sun, 4 Apr 2010, Arne Vajh?j wrote: > On 04-04-2010 20:12, Lew wrote: >> I hear good things about H2. > > ;ALLOW_LITERALS=NONE in the connection URL certainly is nice ! H2 supports the rather useful MERGE INTO command, which apart from the first word looks identical to INSERT INTO, and means something like "INSERT INTO unless a row with that primary key already exists, in which case UPDATE". This is useful for implementing something with semantics like Map.put, where a put can either create a new record or replace an old one. I thought this was actually standard, since SQL:2003 defines a MERGE INTO command, but on looking more closely, i see that SQL:2003's version is different, being more complicated and less useful. H2's version isn't even a minimal subset of the SQL:2003 one, AFAICT. In H2, i say: MERGE INTO table (key, value) VALUES (?, ?) Whereas in SQL:2003 (as realised by Oracle, at least), i'd have to say: MERGE INTO table USING table ON (key = ?) WHEN MATCHED THEN UPDATE SET value = ? WHEN NOT MATCHED THEN INSERT (key, value) VALUES (?, ?) And i'd have to give my key and value twice in the parameters, unless i wanted to use some kind of nonstandard (?) variable mechanism inside the query. The SQL:2003 version is much more flexible, of course, and there are all sorts of extra conditions you can add to it. MySQL has yet another syntax for this, which looks like: INSERT INTO table (key, value) VALUES (?, ?) ON DUPLICATE KEY UPDATE value = VALUES(value) As far as i can see, Derby has no way to do insert-or-update in a single query. Anyway, argh, looks like i'm going to have to add a facility for database-specific SQL for the insert operation if i want this to be portable. I'd really like to avoid having to fall back to running multiple queries to probe the database for the existence of the key and then do UPDATE or INSERT accordingly. tom -- Big Bang. No god. Fadeout. End. -- Stephen Baxter
From: Paul Cager on 6 Apr 2010 07:17 On Apr 5, 1:31 am, Arne Vajhøj <a...(a)vajhoej.dk> wrote: > On 04-04-2010 20:02, Tom Anderson wrote: > > Ubuntu decided to make Derby a separate package. Digging around in my > > package info, it seems that this is still the case, and i don't have it > > installed. And that i can't install it through the package manager, > > because of some funky Ubunutu version conflict lameness. Oh joy. > > That is pretty nasty of them. People that have installed Java expect > to have a complete Java. My guess is that it is more likely to be a mistake than malice. The sun-java6-jdk package has a "Suggests" dependency for "sun-java6-demo, sun-java6-doc, sun-java6-source". Maybe they simply forgot to add a dependency for javadb. (I'm looking at Debian rather than Ubuntu, by the way).
From: John B. Matthews on 6 Apr 2010 15:04
In article <2c1aaeaa-062e-468b-a47c-86a505f612af(a)u22g2000yqf.googlegroups.com>, Paul Cager <paul.cager(a)googlemail.com> wrote: > On Apr 5, 1:31 am, Arne Vajhøj <a...(a)vajhoej.dk> wrote: > > On 04-04-2010 20:02, Tom Anderson wrote: > > > Ubuntu decided to make Derby a separate package. Digging around in my > > > package info, it seems that this is still the case, and i don't have it > > > installed. And that i can't install it through the package manager, > > > because of some funky Ubunutu version conflict lameness. Oh joy. > > > > That is pretty nasty of them. People that have installed Java expect > > to have a complete Java. > > My guess is that it is more likely to be a mistake than malice. The > sun-java6-jdk package has a "Suggests" dependency for "sun-java6-demo, > sun-java6-doc, sun-java6-source". Maybe they simply forgot to add a > dependency for javadb. > > (I'm looking at Debian rather than Ubuntu, by the way). Interesting. Checking Ubuntu 9.10, Karmic Koala: $ apt-cache search javadb sun-java6-javadb - Java(TM) DB, Sun Microsystems' distribution of Apache Derby sun-javadb-client - Java DB client sun-javadb-common - Java DB common files sun-javadb-core - Java DB core sun-javadb-demo - Java DB demo sun-javadb-doc - Java DB documentation sun-javadb-javadoc - Java DB javadoc -- John B. Matthews trashgod at gmail dot com <http://sites.google.com/site/drjohnbmatthews> |