<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>derby-user@db.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/db-derby-user/"/>
<id>http://mail-archives.apache.org/mod_mbox/db-derby-user/</id>
<updated>2009-12-06T01:26:20Z</updated>
<entry>
<title>Re: Question concerning stored procedures</title>
<author><name>Rick Hillegas &lt;Richard.Hillegas@Sun.COM&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3c4B17C021.6040208@sun.com%3e"/>
<id>urn:uuid:%3c4B17C021-6040208@sun-com%3e</id>
<updated>2009-12-03T13:41:53Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi Oliver,

Here is an old email thread on this topic: 
http://old.nabble.com/SQL-functions%2C-procedures-and-PSM---a-possible-approach-to1047689.html#a1047689

I think that the short answer to your question is that no-one has 
volunteered to implement the standard SQL procedural language. There is 
very little pressure to start this very big project because the 
alternative Derby approach (writing a Java static method) seems to 
satisfy our users.

Personally, I believe that Java is a better procedural language than SQL 
for several reasons: Java is more expressive, more portable, easier to 
debug, and backed by a larger ecosystem of re-usable code.

However, you are welcome to build SQL/PSM support into Derby. I believe 
that the community would welcome such a contribution.

Hope this helps,
-Rick



Oliver Böhme wrote:
&gt; Hello,
&gt;
&gt; why can't I create "normal" SQL stored procedures for a Derby DB?
&gt; I thought building a string like "create procedure name as select * from ..." and pass
it to Statement.execute (or .executeUpdate) would work but it doesn't.
&gt; Instead of this I can only declare those cryptic java stored procedures...
&gt;
&gt; Am I missing some point or what is the reason for that?
&gt;
&gt; Regards
&gt; ___________________________________________________________
&gt; Preisknaller: WEB.DE DSL Flatrate für nur 16,99 Euro/mtl.! 
&gt; http://produkte.web.de/go/02/
&gt;
&gt;   



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Different DB behavior loaded from JAR vs. file system</title>
<author><name>Kristian Waagan &lt;Kristian.Waagan@Sun.COM&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3c4B17B097.1070006@Sun.COM%3e"/>
<id>urn:uuid:%3c4B17B097-1070006@Sun-COM%3e</id>
<updated>2009-12-03T12:35:35Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
malesch wrote:
&gt; I checked again, altough I was quite sure, I only connect as the user
&gt; "app" (I have no other users).
&gt; In every case "values CURRENT_USER" always return "APP" and the second
&gt; query always the
&gt; schema name "APP" with the corresponding "table name".
&gt;
&gt; I realized that I previously wrote nonsense because not tables are
&gt; missing (what would lead to
&gt; a user problem) but rows in a table...
&gt;   

Did you shut down the database properly before jarring it up?
I'm not sure what happens with a JAR database if there are unprocessed 
transaction logs in the log directory, but since access is read-only a 
guess would be that the logs are simply ignored.

If the logs are there, but not processed when the db is in a jar, they 
will be processed on start-up when you unzip the JAR and connect to the 
database.

To make sure the database is in a clean state before you jar it up, shut 
it down properly: 'jdbc:derby:mydb;shutdown=true'


Regards,
-- 
Kristian

&gt;
&gt;
&gt; Kathey Marsden wrote:
&gt;   
&gt;&gt; malesch wrote:
&gt;&gt;     
&gt;&gt;&gt; . I realized that
&gt;&gt;&gt; in my demo with the extracted DB (on the file system) the expected
&gt;&gt;&gt; tables didn't show up (like in the JAR case). Disappointed I opened the
&gt;&gt;&gt; same DB with SquirellSQL and, surprise, the tables were there again.
&gt;&gt;&gt; After this opening with SquirellSQL my demo programm showed again the
&gt;&gt;&gt; previously missing tables.
&gt;&gt;&gt;
&gt;&gt;&gt;   
&gt;&gt;&gt;       
&gt;&gt; I know this was suggested before and perhaps you checked already, but
&gt;&gt; it sounds a lot like you are not connecting with the same user each
&gt;&gt; time.  The schema for the table creation will match the user name.  A
&gt;&gt; couple of queries to get your bearings:
&gt;&gt;
&gt;&gt; values CURRENT_USER
&gt;&gt;
&gt;&gt; select schemaname, tablename  from sys.sysschemas s, sys.systables t
&gt;&gt; where NOT tablename like  'SYS%' and s.schemaid  = t.schemaid;
&gt;&gt;
&gt;&gt; If your table schema and user don't match you can either log in as the
&gt;&gt; matching user or select with the fully qualified name e.g.
&gt;&gt;
&gt;&gt; select * from kathey.t;
&gt;&gt;
&gt;&gt;
&gt;&gt;     
&gt;
&gt;   



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Different DB behavior loaded from JAR vs. file system</title>
<author><name>malesch &lt;malesch@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3c4B17AD77.4060004@gmail.com%3e"/>
<id>urn:uuid:%3c4B17AD77-4060004@gmail-com%3e</id>
<updated>2009-12-03T12:22:15Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I checked again, altough I was quite sure, I only connect as the user
"app" (I have no other users).
In every case "values CURRENT_USER" always return "APP" and the second
query always the
schema name "APP" with the corresponding "table name".

I realized that I previously wrote nonsense because not tables are
missing (what would lead to
a user problem) but rows in a table...



Kathey Marsden wrote:
&gt; malesch wrote:
&gt;&gt; . I realized that
&gt;&gt; in my demo with the extracted DB (on the file system) the expected
&gt;&gt; tables didn't show up (like in the JAR case). Disappointed I opened the
&gt;&gt; same DB with SquirellSQL and, surprise, the tables were there again.
&gt;&gt; After this opening with SquirellSQL my demo programm showed again the
&gt;&gt; previously missing tables.
&gt;&gt;
&gt;&gt;   
&gt; I know this was suggested before and perhaps you checked already, but
&gt; it sounds a lot like you are not connecting with the same user each
&gt; time.  The schema for the table creation will match the user name.  A
&gt; couple of queries to get your bearings:
&gt;
&gt; values CURRENT_USER
&gt;
&gt; select schemaname, tablename  from sys.sysschemas s, sys.systables t
&gt; where NOT tablename like  'SYS%' and s.schemaid  = t.schemaid;
&gt;
&gt; If your table schema and user don't match you can either log in as the
&gt; matching user or select with the fully qualified name e.g.
&gt;
&gt; select * from kathey.t;
&gt;
&gt;



</pre>
</div>
</content>
</entry>
<entry>
<title>Question concerning stored procedures</title>
<author><name>=?iso-8859-15?Q?Oliver_B=F6hme?= &lt;Boehme.Oliver@web.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3c1516223340@web.de%3e"/>
<id>urn:uuid:%3c1516223340@web-de%3e</id>
<updated>2009-12-03T09:38:02Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello,

why can't I create "normal" SQL stored procedures for a Derby DB?
I thought building a string like "create procedure name as select * from ..." and pass it
to Statement.execute (or .executeUpdate) would work but it doesn't.
Instead of this I can only declare those cryptic java stored procedures...

Am I missing some point or what is the reason for that?

Regards
___________________________________________________________
Preisknaller: WEB.DE DSL Flatrate für nur 16,99 Euro/mtl.! 
http://produkte.web.de/go/02/



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Different DB behavior loaded from JAR vs. file system</title>
<author><name>Kathey Marsden &lt;kmarsdenderby@sbcglobal.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3c4B16A460.1090900@sbcglobal.net%3e"/>
<id>urn:uuid:%3c4B16A460-1090900@sbcglobal-net%3e</id>
<updated>2009-12-02T17:31:12Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
malesch wrote:
&gt; . I realized that
&gt; in my demo with the extracted DB (on the file system) the expected
&gt; tables didn't show up (like in the JAR case). Disappointed I opened the
&gt; same DB with SquirellSQL and, surprise, the tables were there again.
&gt; After this opening with SquirellSQL my demo programm showed again the
&gt; previously missing tables.
&gt;
&gt;   
I know this was suggested before and perhaps you checked already, but it 
sounds a lot like you are not connecting with the same user each time.  
The schema for the table creation will match the user name.  A couple of 
queries to get your bearings:

 values CURRENT_USER

 select schemaname, tablename  from sys.sysschemas s, sys.systables t 
where NOT tablename like  'SYS%' and s.schemaid  = t.schemaid;

If your table schema and user don't match you can either log in as the 
matching user or select with the fully qualified name e.g.

 select * from kathey.t;




</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Different DB behavior loaded from JAR vs. file system</title>
<author><name>malesch &lt;malesch@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3c4B169EED.5080609@gmail.com%3e"/>
<id>urn:uuid:%3c4B169EED-5080609@gmail-com%3e</id>
<updated>2009-12-02T17:07:57Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi Dag

I connect to my DB with the same user name with the default schema APP
and, what I forgot to mention last time, the DB is encrypted.

Now while creating a little program to demonstrate the effect I stumbled
over something pointing to a possible explanation :-). I realized that
in my demo with the extracted DB (on the file system) the expected
tables didn't show up (like in the JAR case). Disappointed I opened the
same DB with SquirellSQL and, surprise, the tables were there again.
After this opening with SquirellSQL my demo programm showed again the
previously missing tables.

Is there some transaction log which is not commited and what would be
the reason for this (simply not properly commiting/closing the DB?)

Greetings,
marcus


Dag H. Wanvik wrote:
&gt; malesch &lt;malesch@gmail.com&gt; writes:
&gt; 
&gt;&gt; I am seeing some very strange behavior with my Derby DB
&gt;&gt; (version 10.4.2.0 and 10.5.3.0).
&gt;&gt;
&gt;&gt; If I load my DB from a JAR file, I am missing some table
&gt;&gt; entries, that are existing if I extract the DB from the
&gt;&gt; same JAR file and load it from the file system.
&gt;&gt;
&gt;&gt; How can I understand this behavior, is there an
&gt;&gt; explanation for this?
&gt; 
&gt; That seems weird. Are you connecting with the same user name (or none)
&gt; in the two scenarios? Occasionally we see users miss some tables
&gt; because they end up in an unexpected schema; the default schema is the
&gt; user name (or "APP" if not provided).
&gt; 
&gt; If this is not the issue, are you able to provide a repro for it?
&gt; 
&gt; Thanks,
&gt; Dag



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Reclaim deleted tablespace ?</title>
<author><name>bruehlicke &lt;bruehlicke@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3c6ac05c90912020730q2d20e0b6l2e1b04d84fca5eaf@mail.gmail.com%3e"/>
<id>urn:uuid:%3c6ac05c90912020730q2d20e0b6l2e1b04d84fca5eaf@mail-gmail-com%3e</id>
<updated>2009-12-02T15:30:37Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Excellent !  Any command which will do it on a DB base an not just
table by table

B-)

On Tue, Dec 1, 2009 at 8:52 PM, Bryan Pendleton
&lt;bpendleton@amberpoint.com&gt; wrote:
&gt;&gt; Is there any specific command to be run to claim the space deleted ?
&gt;
&gt; Not a command, but a built-in system procedure:
&gt; http://db.apache.org/derby/docs/10.5/ref/rrefaltertablecompress.html
&gt;
&gt; thanks,
&gt;
&gt; bryan
&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Reclaim deleted tablespace ?</title>
<author><name>Bryan Pendleton &lt;bpendleton@amberpoint.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3c4B15D658.5070806@amberpoint.com%3e"/>
<id>urn:uuid:%3c4B15D658-5070806@amberpoint-com%3e</id>
<updated>2009-12-02T02:52:08Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; Is there any specific command to be run to claim the space deleted ?

Not a command, but a built-in system procedure:
http://db.apache.org/derby/docs/10.5/ref/rrefaltertablecompress.html

thanks,

bryan



</pre>
</div>
</content>
</entry>
<entry>
<title>Reclaim deleted tablespace ?</title>
<author><name>bruehlicke &lt;bruehlicke@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3c6ac05c90912011843i353caf14kb0e5bb8557244ee5@mail.gmail.com%3e"/>
<id>urn:uuid:%3c6ac05c90912011843i353caf14kb0e5bb8557244ee5@mail-gmail-com%3e</id>
<updated>2009-12-02T02:43:01Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I may not have read all docs, but after I run a cascading delete on
200 megs of row data and I check the folder size on disk nothing has
changed ?

Is there any specific command to be run to claim the space deleted ?

Thanx
B-)


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Hello</title>
<author><name>velimzo &lt;velimzo@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3c26597029.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26597029-post@talk-nabble-com%3e</id>
<updated>2009-12-01T18:48:14Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Thanks people, you saved my life...CLASSPATH was my problem... 



Bryan Pendleton wrote:
&gt; 
&gt;&gt; When I try to run WwdEmbedded.java there is an error that looks like
&gt;&gt; this:
&gt;&gt; -----------------------------------------------------------------------
&gt;&gt; C:\Documents and Settings\Zoran\Desktop\DERBYTUTOR&gt;java WwdEmbedded
&gt;&gt; Exception in thread "main" java.lang.NoClassDefFoundError: WwdEmbedded
&gt; 
&gt; I suspect this is because you didn't set your CLASSPATH environment
&gt; variable
&gt; carefully, to include "." in the classpath. See step (1) of the
&gt; instructions at:
&gt; http://db.apache.org/derby/docs/dev/getstart/twwdactivity3_Setup.html
&gt; and ensure that you have done:
&gt; 
&gt;    set CLASSPATH=%DERBY_HOME%\lib\derby.jar;.
&gt; 
&gt; thanks,
&gt; 
&gt; bryan
&gt; 
&gt; 
&gt; 
&gt; 
&gt; 

-- 
View this message in context: http://old.nabble.com/Hello-tp26595406p26597029.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Different DB behavior loaded from JAR vs. file system</title>
<author><name>Dag.Wanvik@Sun.COM (Dag H. Wanvik)</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3cx1oxiqcq1rmv.fsf@sun.com%3e"/>
<id>urn:uuid:%3cx1oxiqcq1rmv-fsf@sun-com%3e</id>
<updated>2009-12-01T18:22:16Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
malesch &lt;malesch@gmail.com&gt; writes:

&gt; I am seeing some very strange behavior with my Derby DB
&gt; (version 10.4.2.0 and 10.5.3.0).
&gt;
&gt; If I load my DB from a JAR file, I am missing some table
&gt; entries, that are existing if I extract the DB from the
&gt; same JAR file and load it from the file system.
&gt;
&gt; How can I understand this behavior, is there an
&gt; explanation for this?

That seems weird. Are you connecting with the same user name (or none)
in the two scenarios? Occasionally we see users miss some tables
because they end up in an unexpected schema; the default schema is the
user name (or "APP" if not provided).

If this is not the issue, are you able to provide a repro for it?

Thanks,
Dag


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Hello</title>
<author><name>Kim Haase &lt;Camilla.Haase@Sun.COM&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3c4B155993.5040702@Sun.COM%3e"/>
<id>urn:uuid:%3c4B155993-5040702@Sun-COM%3e</id>
<updated>2009-12-01T17:59:47Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
This error can happen if you do not have the current directory in your 
classpath. Did you follow all the instructions in the "Setting up your 
environment" section, including "Manually setting the CLASSPATH 
environment variable"?

Kim Haase

On 12/01/09 12:51, velimzo wrote:
&gt; I am new in Derby. 
&gt; 
&gt; Here is my problem:
&gt; I am following "Getting Started With Java DB" instructions.
&gt; Problem occures when I try to follow instructions for "Run a JDBC program
&gt; using the embedded driver".
&gt; I compiled successfully WwdEmbedded.java, not following instructions but
&gt; with a command javac *.java
&gt; When I try to run WwdEmbedded.java there is an error that looks like this:
&gt; -----------------------------------------------------------------------
&gt; C:\Documents and Settings\Zoran\Desktop\DERBYTUTOR&gt;java WwdEmbedded
&gt; Exception in thread "main" java.lang.NoClassDefFoundError: WwdEmbedded
&gt; Caused by: java.lang.ClassNotFoundException: WwdEmbedded
&gt;         at java.net.URLClassLoader$1.run(Unknown Source)
&gt;         at java.security.AccessController.doPrivileged(Native Method)
&gt;         at java.net.URLClassLoader.findClass(Unknown Source)
&gt;         at java.lang.ClassLoader.loadClass(Unknown Source)
&gt;         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
&gt;         at java.lang.ClassLoader.loadClass(Unknown Source)
&gt;         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
&gt; Could not find the main class: WwdEmbedded.  Program will exit.
&gt; -------------------------------------------------------------------------
&gt; My version of Java is : Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
&gt; Version of Derby is : Derby 10.5.3.0
&gt; Operating System : Windows XP sp3
&gt; 
&gt; I am thankful on every answer...


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Hello</title>
<author><name>Bryan Pendleton &lt;bpendleton@amberpoint.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3c4B155980.7090509@amberpoint.com%3e"/>
<id>urn:uuid:%3c4B155980-7090509@amberpoint-com%3e</id>
<updated>2009-12-01T17:59:28Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; When I try to run WwdEmbedded.java there is an error that looks like this:
&gt; -----------------------------------------------------------------------
&gt; C:\Documents and Settings\Zoran\Desktop\DERBYTUTOR&gt;java WwdEmbedded
&gt; Exception in thread "main" java.lang.NoClassDefFoundError: WwdEmbedded

I suspect this is because you didn't set your CLASSPATH environment variable
carefully, to include "." in the classpath. See step (1) of the instructions at:
http://db.apache.org/derby/docs/dev/getstart/twwdactivity3_Setup.html
and ensure that you have done:

   set CLASSPATH=%DERBY_HOME%\lib\derby.jar;.

thanks,

bryan





</pre>
</div>
</content>
</entry>
<entry>
<title>Hello</title>
<author><name>velimzo &lt;velimzo@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3c26595406.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26595406-post@talk-nabble-com%3e</id>
<updated>2009-12-01T17:51:46Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

I am new in Derby. 

Here is my problem:
I am following "Getting Started With Java DB" instructions.
Problem occures when I try to follow instructions for "Run a JDBC program
using the embedded driver".
I compiled successfully WwdEmbedded.java, not following instructions but
with a command javac *.java
When I try to run WwdEmbedded.java there is an error that looks like this:
-----------------------------------------------------------------------
C:\Documents and Settings\Zoran\Desktop\DERBYTUTOR&gt;java WwdEmbedded
Exception in thread "main" java.lang.NoClassDefFoundError: WwdEmbedded
Caused by: java.lang.ClassNotFoundException: WwdEmbedded
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: WwdEmbedded.  Program will exit.
-------------------------------------------------------------------------
My version of Java is : Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Version of Derby is : Derby 10.5.3.0
Operating System : Windows XP sp3

I am thankful on every answer...
-- 
View this message in context: http://old.nabble.com/Hello-tp26595406p26595406.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.



</pre>
</div>
</content>
</entry>
<entry>
<title>Different DB behavior loaded from JAR vs. file system</title>
<author><name>malesch &lt;malesch@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3c4B1546CD.3010907@gmail.com%3e"/>
<id>urn:uuid:%3c4B1546CD-3010907@gmail-com%3e</id>
<updated>2009-12-01T16:39:41Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I am seeing some very strange behavior with my Derby DB
(version 10.4.2.0 and 10.5.3.0).

If I load my DB from a JAR file, I am missing some table
entries, that are existing if I extract the DB from the
same JAR file and load it from the file system.

How can I understand this behavior, is there an
explanation for this?

Thanks a lot!


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: setting encryptionKey attribute in jdbc url</title>
<author><name>George H &lt;george.dma@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3cde07811a0912010138h7eb2cb39y25bd11a091d5263@mail.gmail.com%3e"/>
<id>urn:uuid:%3cde07811a0912010138h7eb2cb39y25bd11a091d5263@mail-gmail-com%3e</id>
<updated>2009-12-01T09:38:11Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Thank you Francois, this helped me.
--
George H
george.dma@gmail.com


On Tue, Dec 1, 2009 at 11:25 AM, Francois Orsini
&lt;francois.orsini@gmail.com&gt;wrote:

&gt; Hi George,
&gt;
&gt; It should be ok to use it - it seems to be similar to the UnicodeConverter
&gt; class found here:
&gt; http://java.sun.com/docs/books/tutorial/i18n/text/string.html
&gt;
&gt; http://java.sun.com/docs/books/tutorial/i18n/text/examples/UnicodeFormatter.java
&gt;
&gt; Cheers,
&gt;
&gt; --Francois
&gt;
&gt;
&gt; On Tue, Dec 1, 2009 at 1:12 AM, George H &lt;george.dma@gmail.com&gt; wrote:
&gt;
&gt;&gt; I seem to have a problem converting the byte array to a string using
&gt;&gt; normal java String class.
&gt;&gt; I read that the key uses a X.509 spec which is encoded in utf-8
&gt;&gt;
&gt;&gt; I also wrote a hex string builder as well and the results are different.
&gt;&gt;
&gt;&gt; KeyGenerator keyGen = KeyGenerator.getInstance("Blowfish", "SunJCE");
&gt;&gt;
&gt;&gt; keyGen.init(256);
&gt;&gt; SecretKey key = keyGen.generateKey();
&gt;&gt; System.out.println(toHexString(key.getEncoded()));
&gt;&gt; System.out.println(new String(key.getEncoded(), "utf8"));
&gt;&gt;
&gt;&gt; private static final char[] HEX_CHARS = {'0', '1', '2' ,'3', '4', '5',
&gt;&gt; '6', '7', '8', '9','a', 'b', 'c', 'd', 'e', 'f'};
&gt;&gt;
&gt;&gt; private String toHexString(byte[] bytes)
&gt;&gt; {
&gt;&gt;     StringBuilder sb = new StringBuilder();
&gt;&gt;     int high = 0;
&gt;&gt;     int low = 0;
&gt;&gt;     for(int i = 0; i &lt; bytes.length; i++) {
&gt;&gt;         high = ((bytes[i] &amp; 0xF0) &gt;&gt; 4);
&gt;&gt;         low = (bytes[i] &amp; 0x0F);
&gt;&gt;         sb.append(HEX_CHARS[high]);
&gt;&gt;         sb.append(HEX_CHARS[low]);
&gt;&gt;     }
&gt;&gt;
&gt;&gt;     return sb.toString();
&gt;&gt; }
&gt;&gt;
&gt;&gt; The results look like this
&gt;&gt; 4a63ea27b46504660cc3c6c2f22de1a35f3eabdc468cc6e64928b369c8ff1681
&gt;&gt; Jcï¿½'ï¿½e f ï¿½ï¿½ï¿½ï¿½-ï¿½_&gt;ï¿½ï¿½Fï¿½ï¿½ï¿½I(ï¿½iï¿½ï¿½ ï¿½
&gt;&gt;
&gt;&gt; Sorry to trouble you about this as this is not really Derby related.. but
&gt;&gt; is that toHexString method ok to use? or is there an easier way to convert
&gt;&gt; the bytes using String class, because I can't seem to get anywhere with it.
&gt;&gt;
&gt;&gt;
&gt;&gt; Thanks.
&gt;&gt; --
&gt;&gt; George H
&gt;&gt; george.dma@gmail.com
&gt;&gt;
&gt;&gt;
&gt;&gt; On Tue, Dec 1, 2009 at 10:41 AM, Francois Orsini &lt;
&gt;&gt; francois.orsini@gmail.com&gt; wrote:
&gt;&gt;
&gt;&gt;&gt; Hi George,
&gt;&gt;&gt;
&gt;&gt;&gt; key.getEncoded() returns a byte array that is a textual representation of
&gt;&gt;&gt; the external key in Hex.
&gt;&gt;&gt;
&gt;&gt;&gt; Just Stringify the byte array and set it to the 'encryptedKey' JDBC
&gt;&gt;&gt; connection URL attribute - that should work.
&gt;&gt;&gt;
&gt;&gt;&gt; Cheers,
&gt;&gt;&gt;
&gt;&gt;&gt; --Francois
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt; On Mon, Nov 30, 2009 at 10:45 PM, George H &lt;george.dma@gmail.com&gt; wrote:
&gt;&gt;&gt;
&gt;&gt;&gt;&gt; Hi,
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; I am trying to create an embedded derby db using an encryption key that
&gt;&gt;&gt;&gt; I generate before hand. I've read the derby v10.5.3.0 ref guide and the
&gt;&gt;&gt;&gt; developer guide and I still have one question that lingers in my mind.
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; In the JDBC url where I have to specify the encryption key attribute how
&gt;&gt;&gt;&gt; do we get the key in string form? In the docs they use examples (Dev guide
&gt;&gt;&gt;&gt; page 114 (PDF)) where the key looks like a letters and numbers and in most
&gt;&gt;&gt;&gt; cases just numbers.
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; Now when I generate my key like
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; KeyGenerator keyGen = KeyGenerator.getInstance("AES")
&gt;&gt;&gt;&gt; keyGen.init(256);
&gt;&gt;&gt;&gt; SecretKey key = keyGen.generateKey();
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; I only have the method   key.getEncoded() that I can use which returns
&gt;&gt;&gt;&gt; an array of bytes. I wonder how I can give this key to derby in the jdbc
url
&gt;&gt;&gt;&gt; ? Do I have to convert the byte array to a HEX string ? or to decimals? I
&gt;&gt;&gt;&gt; don't know. If someone could help me out on this specific part it would be
&gt;&gt;&gt;&gt; great.
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; Thanks
&gt;&gt;&gt;&gt; --
&gt;&gt;&gt;&gt; George H
&gt;&gt;&gt;&gt; george.dma@gmail.com
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: setting encryptionKey attribute in jdbc url</title>
<author><name>Francois Orsini &lt;francois.orsini@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3c7921d3e40912010125y73c5d55fp7599e4dac322bab6@mail.gmail.com%3e"/>
<id>urn:uuid:%3c7921d3e40912010125y73c5d55fp7599e4dac322bab6@mail-gmail-com%3e</id>
<updated>2009-12-01T09:25:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi George,

It should be ok to use it - it seems to be similar to the UnicodeConverter
class found here:
http://java.sun.com/docs/books/tutorial/i18n/text/string.html
http://java.sun.com/docs/books/tutorial/i18n/text/examples/UnicodeFormatter.java

Cheers,

--Francois

On Tue, Dec 1, 2009 at 1:12 AM, George H &lt;george.dma@gmail.com&gt; wrote:

&gt; I seem to have a problem converting the byte array to a string using normal
&gt; java String class.
&gt; I read that the key uses a X.509 spec which is encoded in utf-8
&gt;
&gt; I also wrote a hex string builder as well and the results are different.
&gt;
&gt; KeyGenerator keyGen = KeyGenerator.getInstance("Blowfish", "SunJCE");
&gt;
&gt; keyGen.init(256);
&gt; SecretKey key = keyGen.generateKey();
&gt; System.out.println(toHexString(key.getEncoded()));
&gt; System.out.println(new String(key.getEncoded(), "utf8"));
&gt;
&gt; private static final char[] HEX_CHARS = {'0', '1', '2' ,'3', '4', '5', '6',
&gt; '7', '8', '9','a', 'b', 'c', 'd', 'e', 'f'};
&gt;
&gt; private String toHexString(byte[] bytes)
&gt; {
&gt;     StringBuilder sb = new StringBuilder();
&gt;     int high = 0;
&gt;     int low = 0;
&gt;     for(int i = 0; i &lt; bytes.length; i++) {
&gt;         high = ((bytes[i] &amp; 0xF0) &gt;&gt; 4);
&gt;         low = (bytes[i] &amp; 0x0F);
&gt;         sb.append(HEX_CHARS[high]);
&gt;         sb.append(HEX_CHARS[low]);
&gt;     }
&gt;
&gt;     return sb.toString();
&gt; }
&gt;
&gt; The results look like this
&gt; 4a63ea27b46504660cc3c6c2f22de1a35f3eabdc468cc6e64928b369c8ff1681
&gt; Jcï¿½'ï¿½e f ï¿½ï¿½ï¿½ï¿½-ï¿½_&gt;ï¿½ï¿½Fï¿½ï¿½ï¿½I(ï¿½iï¿½ï¿½ ï¿½
&gt;
&gt; Sorry to trouble you about this as this is not really Derby related.. but
&gt; is that toHexString method ok to use? or is there an easier way to convert
&gt; the bytes using String class, because I can't seem to get anywhere with it.
&gt;
&gt;
&gt; Thanks.
&gt; --
&gt; George H
&gt; george.dma@gmail.com
&gt;
&gt;
&gt; On Tue, Dec 1, 2009 at 10:41 AM, Francois Orsini &lt;
&gt; francois.orsini@gmail.com&gt; wrote:
&gt;
&gt;&gt; Hi George,
&gt;&gt;
&gt;&gt; key.getEncoded() returns a byte array that is a textual representation of
&gt;&gt; the external key in Hex.
&gt;&gt;
&gt;&gt; Just Stringify the byte array and set it to the 'encryptedKey' JDBC
&gt;&gt; connection URL attribute - that should work.
&gt;&gt;
&gt;&gt; Cheers,
&gt;&gt;
&gt;&gt; --Francois
&gt;&gt;
&gt;&gt;
&gt;&gt; On Mon, Nov 30, 2009 at 10:45 PM, George H &lt;george.dma@gmail.com&gt; wrote:
&gt;&gt;
&gt;&gt;&gt; Hi,
&gt;&gt;&gt;
&gt;&gt;&gt; I am trying to create an embedded derby db using an encryption key that I
&gt;&gt;&gt; generate before hand. I've read the derby v10.5.3.0 ref guide and the
&gt;&gt;&gt; developer guide and I still have one question that lingers in my mind.
&gt;&gt;&gt;
&gt;&gt;&gt; In the JDBC url where I have to specify the encryption key attribute how
&gt;&gt;&gt; do we get the key in string form? In the docs they use examples (Dev guide
&gt;&gt;&gt; page 114 (PDF)) where the key looks like a letters and numbers and in most
&gt;&gt;&gt; cases just numbers.
&gt;&gt;&gt;
&gt;&gt;&gt; Now when I generate my key like
&gt;&gt;&gt;
&gt;&gt;&gt; KeyGenerator keyGen = KeyGenerator.getInstance("AES")
&gt;&gt;&gt; keyGen.init(256);
&gt;&gt;&gt; SecretKey key = keyGen.generateKey();
&gt;&gt;&gt;
&gt;&gt;&gt; I only have the method   key.getEncoded() that I can use which returns an
&gt;&gt;&gt; array of bytes. I wonder how I can give this key to derby in the jdbc url ?
&gt;&gt;&gt; Do I have to convert the byte array to a HEX string ? or to decimals? I
&gt;&gt;&gt; don't know. If someone could help me out on this specific part it would be
&gt;&gt;&gt; great.
&gt;&gt;&gt;
&gt;&gt;&gt; Thanks
&gt;&gt;&gt; --
&gt;&gt;&gt; George H
&gt;&gt;&gt; george.dma@gmail.com
&gt;&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: setting encryptionKey attribute in jdbc url</title>
<author><name>George H &lt;george.dma@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3cde07811a0912010112w279a815i54c51bf320d32c50@mail.gmail.com%3e"/>
<id>urn:uuid:%3cde07811a0912010112w279a815i54c51bf320d32c50@mail-gmail-com%3e</id>
<updated>2009-12-01T09:12:37Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I seem to have a problem converting the byte array to a string using normal
java String class.
I read that the key uses a X.509 spec which is encoded in utf-8

I also wrote a hex string builder as well and the results are different.

KeyGenerator keyGen = KeyGenerator.getInstance("Blowfish", "SunJCE");
keyGen.init(256);
SecretKey key = keyGen.generateKey();
System.out.println(toHexString(key.getEncoded()));
System.out.println(new String(key.getEncoded(), "utf8"));

private static final char[] HEX_CHARS = {'0', '1', '2' ,'3', '4', '5', '6',
'7', '8', '9','a', 'b', 'c', 'd', 'e', 'f'};

private String toHexString(byte[] bytes)
{
    StringBuilder sb = new StringBuilder();
    int high = 0;
    int low = 0;
    for(int i = 0; i &lt; bytes.length; i++) {
        high = ((bytes[i] &amp; 0xF0) &gt;&gt; 4);
        low = (bytes[i] &amp; 0x0F);
        sb.append(HEX_CHARS[high]);
        sb.append(HEX_CHARS[low]);
    }

    return sb.toString();
}

The results look like this
4a63ea27b46504660cc3c6c2f22de1a35f3eabdc468cc6e64928b369c8ff1681
Jcï¿½'ï¿½e f ï¿½ï¿½ï¿½ï¿½-ï¿½_&gt;ï¿½ï¿½Fï¿½ï¿½ï¿½I(ï¿½iï¿½ï¿½ ï¿½

Sorry to trouble you about this as this is not really Derby related.. but is
that toHexString method ok to use? or is there an easier way to convert the
bytes using String class, because I can't seem to get anywhere with it.

Thanks.
--
George H
george.dma@gmail.com


On Tue, Dec 1, 2009 at 10:41 AM, Francois Orsini
&lt;francois.orsini@gmail.com&gt;wrote:

&gt; Hi George,
&gt;
&gt; key.getEncoded() returns a byte array that is a textual representation of
&gt; the external key in Hex.
&gt;
&gt; Just Stringify the byte array and set it to the 'encryptedKey' JDBC
&gt; connection URL attribute - that should work.
&gt;
&gt; Cheers,
&gt;
&gt; --Francois
&gt;
&gt;
&gt; On Mon, Nov 30, 2009 at 10:45 PM, George H &lt;george.dma@gmail.com&gt; wrote:
&gt;
&gt;&gt; Hi,
&gt;&gt;
&gt;&gt; I am trying to create an embedded derby db using an encryption key that I
&gt;&gt; generate before hand. I've read the derby v10.5.3.0 ref guide and the
&gt;&gt; developer guide and I still have one question that lingers in my mind.
&gt;&gt;
&gt;&gt; In the JDBC url where I have to specify the encryption key attribute how
&gt;&gt; do we get the key in string form? In the docs they use examples (Dev guide
&gt;&gt; page 114 (PDF)) where the key looks like a letters and numbers and in most
&gt;&gt; cases just numbers.
&gt;&gt;
&gt;&gt; Now when I generate my key like
&gt;&gt;
&gt;&gt; KeyGenerator keyGen = KeyGenerator.getInstance("AES")
&gt;&gt; keyGen.init(256);
&gt;&gt; SecretKey key = keyGen.generateKey();
&gt;&gt;
&gt;&gt; I only have the method   key.getEncoded() that I can use which returns an
&gt;&gt; array of bytes. I wonder how I can give this key to derby in the jdbc url ?
&gt;&gt; Do I have to convert the byte array to a HEX string ? or to decimals? I
&gt;&gt; don't know. If someone could help me out on this specific part it would be
&gt;&gt; great.
&gt;&gt;
&gt;&gt; Thanks
&gt;&gt; --
&gt;&gt; George H
&gt;&gt; george.dma@gmail.com
&gt;&gt;
&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: setting encryptionKey attribute in jdbc url</title>
<author><name>Francois Orsini &lt;francois.orsini@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3c7921d3e40912010041u5b8e1d40s2377f1effd6bbc54@mail.gmail.com%3e"/>
<id>urn:uuid:%3c7921d3e40912010041u5b8e1d40s2377f1effd6bbc54@mail-gmail-com%3e</id>
<updated>2009-12-01T08:41:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi George,

key.getEncoded() returns a byte array that is a textual representation of
the external key in Hex.

Just Stringify the byte array and set it to the 'encryptedKey' JDBC
connection URL attribute - that should work.

Cheers,

--Francois

On Mon, Nov 30, 2009 at 10:45 PM, George H &lt;george.dma@gmail.com&gt; wrote:

&gt; Hi,
&gt;
&gt; I am trying to create an embedded derby db using an encryption key that I
&gt; generate before hand. I've read the derby v10.5.3.0 ref guide and the
&gt; developer guide and I still have one question that lingers in my mind.
&gt;
&gt; In the JDBC url where I have to specify the encryption key attribute how do
&gt; we get the key in string form? In the docs they use examples (Dev guide page
&gt; 114 (PDF)) where the key looks like a letters and numbers and in most cases
&gt; just numbers.
&gt;
&gt; Now when I generate my key like
&gt;
&gt; KeyGenerator keyGen = KeyGenerator.getInstance("AES")
&gt; keyGen.init(256);
&gt; SecretKey key = keyGen.generateKey();
&gt;
&gt; I only have the method   key.getEncoded() that I can use which returns an
&gt; array of bytes. I wonder how I can give this key to derby in the jdbc url ?
&gt; Do I have to convert the byte array to a HEX string ? or to decimals? I
&gt; don't know. If someone could help me out on this specific part it would be
&gt; great.
&gt;
&gt; Thanks
&gt; --
&gt; George H
&gt; george.dma@gmail.com
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>setting encryptionKey attribute in jdbc url</title>
<author><name>George H &lt;george.dma@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3cde07811a0911302245s16347d17l3c4881f3cf6e4273@mail.gmail.com%3e"/>
<id>urn:uuid:%3cde07811a0911302245s16347d17l3c4881f3cf6e4273@mail-gmail-com%3e</id>
<updated>2009-12-01T06:45:13Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,

I am trying to create an embedded derby db using an encryption key that I
generate before hand. I've read the derby v10.5.3.0 ref guide and the
developer guide and I still have one question that lingers in my mind.

In the JDBC url where I have to specify the encryption key attribute how do
we get the key in string form? In the docs they use examples (Dev guide page
114 (PDF)) where the key looks like a letters and numbers and in most cases
just numbers.

Now when I generate my key like

KeyGenerator keyGen = KeyGenerator.getInstance("AES")
keyGen.init(256);
SecretKey key = keyGen.generateKey();

I only have the method   key.getEncoded() that I can use which returns an
array of bytes. I wonder how I can give this key to derby in the jdbc url ?
Do I have to convert the byte array to a HEX string ? or to decimals? I
don't know. If someone could help me out on this specific part it would be
great.

Thanks
--
George H
george.dma@gmail.com


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: help</title>
<author><name>Bryan Pendleton &lt;bpendleton@amberpoint.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200912.mbox/%3c4B146745.1040009@amberpoint.com%3e"/>
<id>urn:uuid:%3c4B146745-1040009@amberpoint-com%3e</id>
<updated>2009-12-01T00:45:57Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; I am following "*Getting Started With Java DB*" instructions.
&gt; Problem occures when I try to follow instructions for "*Run a JDBC 
&gt; program using the embedded driver*".

Hi, Sorry about this. We just fixed these docs in the trunk, so the
docs will be better in the next release.

&gt; When I try to compile *WwdEmbedded.java* there is an error that looks 
&gt; like this:
&gt; 
&gt; --------------------------------------------------------------
&gt; *WwdEmbedded.java:80: cannot find symbol
&gt; symbol  : variable WwdUtils

To avoid this problem, simply compile both classes at the same time:

   javac WwdEmbedded.java WwdUtils.java

thanks,

bryan




</pre>
</div>
</content>
</entry>
<entry>
<title>help</title>
<author><name>&quot;velimzo&quot; &lt;velimzo@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3c8F0793533EA448459E847409B62265C0@zoranf4119c20e%3e"/>
<id>urn:uuid:%3c8F0793533EA448459E847409B62265C0@zoranf4119c20e%3e</id>
<updated>2009-11-30T20:37:01Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I am new in Derby. 

Here is my problem:
I am following "Getting Started With Java DB" instructions.
Problem occures when I try to follow instructions for "Run a JDBC program using the embedded
driver".
When I try to compile WwdEmbedded.java there is an error that looks like this:

--------------------------------------------------------------
WwdEmbedded.java:80: cannot find symbol
symbol  : variable WwdUtils
location: class WwdEmbedded
             if (! WwdUtils.wwdChk4Table(conn))
                   ^
WwdEmbedded.java:92: cannot find symbol
symbol  : variable WwdUtils
location: class WwdEmbedded
                answer = WwdUtils.getWishItem();
                         ^
2 errors
--------------------------------------------------------------

My version of Java is : Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Version of Derby is : Derby 10.4.2.1
Operating System : Windows XP sp3

------------------------------------------------------------------------------------------------------------------
I am thankful on every answer...

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Derby + PHP ?</title>
<author><name>Dan Farrell &lt;dan@danf.us&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3c20091130124011.0f7bdc2b@napoleon.spore.ath.cx%3e"/>
<id>urn:uuid:%3c20091130124011-0f7bdc2b@napoleon-spore-ath-cx%3e</id>
<updated>2009-11-30T18:40:11Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I guess I shouldn't have responded to this directly after waking up.
ODBC-JDBC Sounds like a feasible solution.  I'm going to give it a try.

Thanks much.

On Mon, 30 Nov 2009 07:21:45 -0600
Dan Farrell &lt;dan@danf.us&gt; wrote:

&gt; Hi, and thank you.  My understanding was that I still needed the DB2
&gt; stuff behind odbc. Was I mistaken? I know jdbc works well,  but I
&gt; haven't been able to get my odbc_connect to succeed. Can anyone
&gt; please help me find the proper odbc connection syntax and backend to
&gt; connect to a Derby network server from PHP?
&gt; 
&gt; Thanks again!
&gt; 
&gt; Sylvain Leroux &lt;sylvain@chicoree.fr&gt; wrote:
&gt; 
&gt; &gt;Hi Dan,
&gt; &gt;
&gt; &gt;
&gt; &gt;I don't know if Derby is still compatible with DB2-CLI.
&gt; &gt;
&gt; &gt;Anyway, if it is no longer the case, as an alternative you may use
&gt; &gt;an ODBC-JDBC gateway. Since PHP has support for ODBC, this should
&gt; &gt;work.
&gt; &gt;
&gt; &gt;
&gt; &gt;Please, keep us up to date!
&gt; &gt;Sylvain.
&gt; &gt;
&gt; &gt;
&gt; &gt;Dan Farrell a Ã©crit :
&gt; &gt;&gt; Hi All,
&gt; &gt;&gt; 
&gt; &gt;&gt; i would like to connect to a Derby DB With PHP.  It seems that to
&gt; &gt;&gt; do so I will need the ibm db2 module for PHP.  To build that, in
&gt; &gt;&gt; turn,  I will need db2 header and library files.  But for the life
&gt; &gt;&gt; of me, I can't find a suitable download for these files anywhere.
&gt; &gt;&gt; Many of the links seem to have vanished from IBM's site, but there
&gt; &gt;&gt; are no such links at the Apache Derby site either, from what I can
&gt; &gt;&gt; tell.  
&gt; &gt;&gt; 
&gt; &gt;&gt; Can anyone help me figure out where I can obtain IBM's Client
&gt; &gt;&gt; Driver package so that I can build the db2 module for PHP and
&gt; &gt;&gt; connect to my Derby Database?  
&gt; &gt;&gt; 
&gt; &gt;&gt; Or is there some better solution that doesn't require IBM
&gt; &gt;&gt; libraries? 
&gt; &gt;&gt; 
&gt; &gt;&gt; Thank you very much, I'm stumbling in the dark.  
&gt; &gt;&gt; 
&gt; &gt;&gt; Sincerely, 
&gt; &gt;&gt; 
&gt; &gt;&gt; 	Dan Farrell
&gt; &gt;&gt; 
&gt; &gt;&gt; 
&gt; &gt;
&gt; &gt;
&gt; &gt;-- 
&gt; &gt;sylvain@chicoree.fr
&gt; &gt;http://www.chicoree.fr
&gt; &gt;



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Derby + PHP ?</title>
<author><name>Kathey Marsden &lt;kmarsdenderby@sbcglobal.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3c4B13FBED.1060906@sbcglobal.net%3e"/>
<id>urn:uuid:%3c4B13FBED-1060906@sbcglobal-net%3e</id>
<updated>2009-11-30T17:07:57Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Rick Hillegas wrote:
&gt; Hi Dan,
&gt;
&gt; In addition, see the following page for a number of ODBC drivers which 
&gt; work with Derby: 
&gt; http://wiki.apache.org/db-derby/UsesOfDerby#Products_By_Type
The DB2 Runtime client has not been supported with Derby for some time, 
so I removed it from this page to avoid confusion.



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Derby--Embedded</title>
<author><name>Donald McLean &lt;dmclean62@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3c5627810d0911300826y444f7f9cj8df18adf864cefe1@mail.gmail.com%3e"/>
<id>urn:uuid:%3c5627810d0911300826y444f7f9cj8df18adf864cefe1@mail-gmail-com%3e</id>
<updated>2009-11-30T16:26:35Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Oracle and other databases (including Derby server mode) - the DB runs
as a separate process and the application talks to it over a network
connection. Embedded databases such as Derby the database runs inside
your application, the database is on a local disk and the application
objects talk directly to the DBMS objects via method calls.

Actually doing the embedding basically requires two things:

1. including derby.jar in your classpath

2. connecting to the database using a URL that specifies a local file

Otherwise - what Rick said - the Derby documentation is pretty
straightforward and useful.

Donald

On Mon, Nov 30, 2009 at 10:50 AM, 120113698 &lt;120113698@qq.com&gt; wrote:
&gt; How can I embed the Derby-Database to a Desktop Java Application?
&gt; and what is the deffirence between using Oracle Database in Deaktop Java
&gt; Apps and using derby in desktop java apps?
-- 
Family photographs are a critical legacy for
ourselves and our descendants. Protect that
legacy with a digital backup and recovery plan.

Join the photo preservation advocacy Facebook group:
http://www.facebook.com/home.php?ref=logo#/group.php?gid=148274709288


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Derby--Embedded</title>
<author><name>Rick Hillegas &lt;Richard.Hillegas@Sun.COM&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3c4B13F106.9090907@sun.com%3e"/>
<id>urn:uuid:%3c4B13F106-9090907@sun-com%3e</id>
<updated>2009-11-30T16:21:26Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
120113698 wrote:
&gt; How can I embed the Derby-Database to a Desktop Java Application?
&gt; and what is the deffirence between using Oracle Database in Deaktop 
&gt; Java Apps and using derby in desktop java apps?
&gt;  
&gt; 2009-11-30
&gt; 120113698
Hello,

The Getting Started Guide explains how to embed Derby in a desktop 
application: http://db.apache.org/derby/docs/10.5/getstart/


Regards,
-Rick


</pre>
</div>
</content>
</entry>
<entry>
<title>Derby--Embedded</title>
<author><name>&quot;120113698&quot; &lt;120113698@qq.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3c200911302350089810482@qq.com%3e"/>
<id>urn:uuid:%3c200911302350089810482@qq-com%3e</id>
<updated>2009-11-30T15:50:11Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
How can I embed the Derby-Database to a Desktop Java Application?
and what is the deffirence between using Oracle Database in Deaktop Java Apps and using derby
in desktop java apps?

2009-11-30 



120113698 


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Derby + PHP ?</title>
<author><name>Rick Hillegas &lt;Richard.Hillegas@Sun.COM&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3c4B13D8E6.2020303@sun.com%3e"/>
<id>urn:uuid:%3c4B13D8E6-2020303@sun-com%3e</id>
<updated>2009-11-30T14:38:30Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi Dan,

The following old blog may give you some pointers: 
http://coffeecode.net/archives/16-Apache-Derby-tutorial-OSCON-2005-materials.html

In addition, see the following page for a number of ODBC drivers which 
work with Derby: 
http://wiki.apache.org/db-derby/UsesOfDerby#Products_By_Type

Hope this helps,
-Rick

Dan Farrell wrote:
&gt; Hi All,
&gt;
&gt; i would like to connect to a Derby DB With PHP.  It seems that to do
&gt; so I will need the ibm db2 module for PHP.  To build that, in turn,  I
&gt; will need db2 header and library files.  But for the life of me, I
&gt; can't find a suitable download for these files anywhere.  Many of the
&gt; links seem to have vanished from IBM's site, but there are no such
&gt; links at the Apache Derby site either, from what I can tell.  
&gt;
&gt; Can anyone help me figure out where I can obtain IBM's Client Driver
&gt; package so that I can build the db2 module for PHP and connect to my
&gt; Derby Database?  
&gt;
&gt; Or is there some better solution that doesn't require IBM libraries? 
&gt;
&gt; Thank you very much, I'm stumbling in the dark.  
&gt;
&gt; Sincerely, 
&gt;
&gt; 	Dan Farrell
&gt;   



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Derby + PHP ?</title>
<author><name>Dan Farrell &lt;dan@danf.us&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3c00eqwwlxnj6hp70go3kdghir.1259586931541@email.android.com%3e"/>
<id>urn:uuid:%3c00eqwwlxnj6hp70go3kdghir-1259586931541@email-android-com%3e</id>
<updated>2009-11-30T13:21:45Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi, and thank you.  My understanding was that I still needed the DB2 stuff behind odbc. Was
I mistaken? 
I know jdbc works well,  but I haven't been able to get my odbc_connect to succeed. Can anyone
please help me find the proper odbc connection syntax and backend to connect to a Derby network
server from PHP?

Thanks again!

Sylvain Leroux &lt;sylvain@chicoree.fr&gt; wrote:

&gt;Hi Dan,
&gt;
&gt;
&gt;I don't know if Derby is still compatible with DB2-CLI.
&gt;
&gt;Anyway, if it is no longer the case, as an alternative you may use an ODBC-JDBC 
&gt;gateway. Since PHP has support for ODBC, this should work.
&gt;
&gt;
&gt;Please, keep us up to date!
&gt;Sylvain.
&gt;
&gt;
&gt;Dan Farrell a Ã©crit :
&gt;&gt; Hi All,
&gt;&gt; 
&gt;&gt; i would like to connect to a Derby DB With PHP.  It seems that to do
&gt;&gt; so I will need the ibm db2 module for PHP.  To build that, in turn,  I
&gt;&gt; will need db2 header and library files.  But for the life of me, I
&gt;&gt; can't find a suitable download for these files anywhere.  Many of the
&gt;&gt; links seem to have vanished from IBM's site, but there are no such
&gt;&gt; links at the Apache Derby site either, from what I can tell.  
&gt;&gt; 
&gt;&gt; Can anyone help me figure out where I can obtain IBM's Client Driver
&gt;&gt; package so that I can build the db2 module for PHP and connect to my
&gt;&gt; Derby Database?  
&gt;&gt; 
&gt;&gt; Or is there some better solution that doesn't require IBM libraries? 
&gt;&gt; 
&gt;&gt; Thank you very much, I'm stumbling in the dark.  
&gt;&gt; 
&gt;&gt; Sincerely, 
&gt;&gt; 
&gt;&gt; 	Dan Farrell
&gt;&gt; 
&gt;&gt; 
&gt;
&gt;
&gt;-- 
&gt;sylvain@chicoree.fr
&gt;http://www.chicoree.fr
&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Derby + PHP ?</title>
<author><name>Sylvain Leroux &lt;sylvain@chicoree.fr&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3c4B13B2D3.4010203@chicoree.fr%3e"/>
<id>urn:uuid:%3c4B13B2D3-4010203@chicoree-fr%3e</id>
<updated>2009-11-30T11:56:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi Dan,


I don't know if Derby is still compatible with DB2-CLI.

Anyway, if it is no longer the case, as an alternative you may use an ODBC-JDBC 
gateway. Since PHP has support for ODBC, this should work.


Please, keep us up to date!
Sylvain.


Dan Farrell a écrit :
&gt; Hi All,
&gt; 
&gt; i would like to connect to a Derby DB With PHP.  It seems that to do
&gt; so I will need the ibm db2 module for PHP.  To build that, in turn,  I
&gt; will need db2 header and library files.  But for the life of me, I
&gt; can't find a suitable download for these files anywhere.  Many of the
&gt; links seem to have vanished from IBM's site, but there are no such
&gt; links at the Apache Derby site either, from what I can tell.  
&gt; 
&gt; Can anyone help me figure out where I can obtain IBM's Client Driver
&gt; package so that I can build the db2 module for PHP and connect to my
&gt; Derby Database?  
&gt; 
&gt; Or is there some better solution that doesn't require IBM libraries? 
&gt; 
&gt; Thank you very much, I'm stumbling in the dark.  
&gt; 
&gt; Sincerely, 
&gt; 
&gt; 	Dan Farrell
&gt; 
&gt; 


-- 
sylvain@chicoree.fr
http://www.chicoree.fr



</pre>
</div>
</content>
</entry>
<entry>
<title>Derby + PHP ?</title>
<author><name>Dan Farrell &lt;dan@danf.us&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3c20091129230303.0e47898c@napoleon.spore.ath.cx%3e"/>
<id>urn:uuid:%3c20091129230303-0e47898c@napoleon-spore-ath-cx%3e</id>
<updated>2009-11-30T05:03:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi All,

i would like to connect to a Derby DB With PHP.  It seems that to do
so I will need the ibm db2 module for PHP.  To build that, in turn,  I
will need db2 header and library files.  But for the life of me, I
can't find a suitable download for these files anywhere.  Many of the
links seem to have vanished from IBM's site, but there are no such
links at the Apache Derby site either, from what I can tell.  

Can anyone help me figure out where I can obtain IBM's Client Driver
package so that I can build the db2 module for PHP and connect to my
Derby Database?  

Or is there some better solution that doesn't require IBM libraries? 

Thank you very much, I'm stumbling in the dark.  

Sincerely, 

	Dan Farrell


</pre>
</div>
</content>
</entry>
<entry>
<title>AUTO: Benjamin Parees/Raleigh/IBM is out of the office. (returning 11/30/2009)</title>
<author><name>Benjamin Parees &lt;bparees@us.ibm.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3cOF9FF1436B.3A79FFC3-ON8725767D.001B9D50-8725767D.001B9D51@us.ibm.com%3e"/>
<id>urn:uuid:%3cOF9FF1436B-3A79FFC3-ON8725767D-001B9D50-8725767D-001B9D51@us-ibm-com%3e</id>
<updated>2009-11-29T05:01:37Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: quoted-printable



I am out of the office until 11/30/2009.




Note: This is an automated response to your message  "derby-user Digest=
 29
Nov 2009 04:05:09 -0000 Issue 964" sent on 11/28/09 21:05:09.

This is the only notification you will receive while this person is awa=
y.=


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: AW: AW: AW: OOM with millions of weakly-referenced Derby objects</title>
<author><name>=?UTF-8?Q?Peter_Ondru=C5=A1ka?= &lt;peter.ondruska@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3c4d2670740911270822s4d023bc8s139993b1821c8583@mail.gmail.com%3e"/>
<id>urn:uuid:%3c4d2670740911270822s4d023bc8s139993b1821c8583@mail-gmail-com%3e</id>
<updated>2009-11-27T16:22:25Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I develop on Windows and deploy to AIX 5.3 using Java 6 (_17 on Windows) and
SR4
http://www.ibm.com/developerworks/java/jdk/aix/j664/Java6_64.fixinfo.html and
never encountered anything unusual.

On Fri, Nov 27, 2009 at 4:30 PM, &lt;Malte.Kempff@de.equens.com&gt; wrote:

&gt; Hi Dag,
&gt; Thanks for your effort. The problem is as far I understand a special
&gt; behavoiour on AIX Java Mashine. Does anybody of the developing or testing
&gt; people got access on something like that?
&gt;
&gt;
&gt; -----UrsprÃ¼ngliche Nachricht-----
&gt; Von: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM]
&gt; Gesendet: Freitag, 27. November 2009 16:15
&gt; An: Derby Discussion
&gt; Betreff: Re: AW: AW: AW: OOM with millions of weakly-referenced Derby
&gt; objects
&gt;
&gt;
&gt; Hi Malte,
&gt;
&gt; Malte.Kempff@de.equens.com writes:
&gt;
&gt;
&gt; &gt; Hi Dag, The problem in my case is, that I don't have access to any
&gt; &gt; AIX-Computer, and that is really a pity, because I cannot
&gt; &gt; reconstruct the scenario on my own and watch it with my own eyes.
&gt; &gt; That all happened on a production system and the provider denies
&gt; &gt; trying it out again.  But attached you can find the SQL-script
&gt; &gt; without being UTF8.  So that Problem should occur in the same way
&gt; &gt; used on AIX (5.3) BTW: is there a way to be kind of independent of
&gt; &gt; the input format?
&gt;
&gt; I converted the script you enclosed to UTF-8 and ran it through ij
&gt; without any problems.
&gt;
&gt; I also tried to run it with the enclosed program, and it gave me no
&gt; errors when the inout file was encoded with UTF-8 (Comments had
&gt; non-ASCII German character), and it printed no errors on my
&gt; OpenSolaris system (I don't have access to AIX).
&gt;
&gt; In any case, should you see this problem again, please feel free to
&gt; file a bug report(*), preferably with a repro and/or logs.
&gt;
&gt; As for independence of the input format, since runScript requires that
&gt; you specify the encoding, you could do some encoding auto-detect logic
&gt; on the script, I guess..
&gt;
&gt; (*) http://db.apache.org/derby/DerbyBugGuidelines.html
&gt;
&gt; Hope this helps,
&gt; Dag
&gt;
&gt;
&gt; import org.apache.derby.tools.ij;
&gt; import java.sql.*;
&gt; import java.io.*;
&gt;
&gt; public class Foo {
&gt;
&gt;    public Foo() {};
&gt;
&gt;    static public void main(String[] args)
&gt;            throws SQLException,
&gt;                   UnsupportedEncodingException,
&gt;                   FileNotFoundException,
&gt;                   ClassNotFoundException {
&gt;        Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
&gt;        Connection c =
&gt; DriverManager.getConnection("jdbc:derby:wombat;create=true");
&gt;
&gt;        FileInputStream fs = new FileInputStream(args[0]);
&gt;
&gt;        int errs = ij.runScript(c,
&gt;                                fs,
&gt;                                "UTF-8",
&gt;                                System.out,
&gt;                                "UTF-8");
&gt;
&gt;        System.out.println("\n\nerrs=" + errs);
&gt;        c.close();
&gt;    }
&gt; }
&gt;
&gt;
&gt;
&gt;
&gt; &gt;
&gt; &gt; Malte
&gt; &gt;
&gt; &gt; -----UrsprÃ¼ngliche Nachricht-----
&gt; &gt; Von: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM]
&gt; &gt; Gesendet: Freitag, 27. November 2009 01:19
&gt; &gt; An: Derby Discussion
&gt; &gt; Betreff: Re: AW: AW: OOM with millions of weakly-referenced Derby objects
&gt; &gt;
&gt; &gt; Malte.Kempff@de.equens.com writes:
&gt; &gt;
&gt; &gt;&gt; Yes this is the API I am reffering to.  Well actually it says that,
&gt; &gt;&gt; but in my case it did not do it.  It needed a long time, several
&gt; &gt;&gt; minutes. Reason as it turned later out, after getting the output in
&gt; &gt;&gt; a file a lot of IOExcceptions. I never got those on windows nor on
&gt; &gt;&gt; Solaris. Thr original logic of the routine calling the runScript
&gt; &gt;&gt; Method was asking for the return code but either it never hit this
&gt; &gt;&gt; if statement and crashed somewhere within ij without giving the
&gt; &gt;&gt; Exception to the caller or ij gave something like 0 so the output
&gt; &gt;&gt; never was given to the logger.  So there is something phony with
&gt; &gt;&gt; ij.runScript using it with AIX 5.3 and a SQL-Script not coded UTF8
&gt; &gt;&gt; but declaring in the parameters as UTF8. Of course that is a fault
&gt; &gt;&gt; by my own, but it should tel me about it.
&gt; &gt;
&gt; &gt; I looked at the implementation for runScript in
&gt; &gt; org.apache.derby.impl.tools.ij.utilMain#runScriptGuts and it does seem
&gt; &gt; to catch exceptions, count them and return them. Are you able to
&gt; &gt; provide a repro script showing that 0 or -1 is returned from runScript
&gt; &gt; for the failing scenario?
&gt; &gt;
&gt; &gt; Thanks,
&gt; &gt; Dag
&gt; &gt;
&gt; &gt;&gt;
&gt; &gt;&gt;
&gt; &gt;&gt;
&gt; &gt;&gt; -----UrsprÃ¼ngliche Nachricht-----
&gt; &gt;&gt; Von: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM]
&gt; &gt;&gt; Gesendet: Freitag, 20. November 2009 19:54
&gt; &gt;&gt; An: Derby Discussion
&gt; &gt;&gt; Betreff: Re: AW: OOM with millions of weakly-referenced Derby objects
&gt; &gt;&gt;
&gt; &gt;&gt; Malte.Kempff@de.equens.com writes:
&gt; &gt;&gt;
&gt; &gt;&gt;&gt; In other words I would count that situation as not nice behaviour of
&gt; ij, since the return code should have been given as I would suppose it
&gt; looking at the method signature.
&gt; &gt;&gt;
&gt; &gt;&gt; Is this the API signature you are referring to?
&gt; &gt;&gt;
&gt; &gt;&gt;
&gt; http://db.apache.org/derby/docs/10.5/publishedapi/jdbc4/org/apache/derby/tools/ij.html#runScript(java.sql.Connection,%20java.io.InputStream,%20java.lang.String,%20java.io.OutputStream,%20java.lang.String)
&gt; &gt;&gt;
&gt; &gt;&gt; It says:
&gt; &gt;&gt;
&gt; &gt;&gt; Returns:h
&gt; &gt;&gt;     Number of SQLExceptions thrown during the execution, -1 if not
&gt; &gt;&gt;     known.
&gt; &gt;&gt;
&gt; &gt;&gt; If so, are you seeing 0 or -1 returned here?
&gt; &gt;&gt;
&gt; &gt;&gt; Dag
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Problem with escaping of strings</title>
<author><name>Sven Skrabal &lt;radiation.uc@gmx.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3c4B0FF2BC.5020604@gmx.net%3e"/>
<id>urn:uuid:%3c4B0FF2BC-5020604@gmx-net%3e</id>
<updated>2009-11-27T15:39:40Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Ok, seems I have found the problem in the Netbeans IDE. If I execute the
SQL in Java code everything works perfect. So I've written a small SQL
importer for my data ;) I think that Netbeans escapes every data so its
impossible to import that data with the 'SQL Command' tabs.

Sven Skrabal schrieb:
&gt; Hi all,
&gt;
&gt; I'm trying to import data exported via PhpMyAdmin from MySQL. Now my SQL
&gt; Statements contain special characters like \r\n. Apache Derby seems to
&gt; filter them out. If I import that data I just get this characters
&gt; interpreted as normal text. So what I get is a string containing all
&gt; data without the  correct newlines. How can I tell Apache Derby to
&gt; interpret this text as special charaters?
&gt;
&gt; Example:
&gt; INSERT INTO test (test) VALUES ('test\r\ntest');
&gt;
&gt; The column's datatype is LONG VARCHAR. I used the 'Services' tab in
&gt; Netbeans IDE to import this data. A lot of research on google and the
&gt; reference manual didn't help. Please help :-)
&gt;
&gt; Greetings
&gt; Sven S.
&gt;
&gt;
&gt;   



</pre>
</div>
</content>
</entry>
<entry>
<title>AW: AW: AW: AW: OOM with millions of weakly-referenced Derby objects</title>
<author><name>&lt;Malte.Kempff@de.equens.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3c0773A3CE9DAC7B42B8F564C52805678D02647E87@EVS01.INTERN.INTERPAY.NL%3e"/>
<id>urn:uuid:%3c0773A3CE9DAC7B42B8F564C52805678D02647E87@EVS01-INTERN-INTERPAY-NL%3e</id>
<updated>2009-11-27T15:30:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi Dag,
Thanks for your effort. The problem is as far I understand a special behavoiour on AIX Java
Mashine. Does anybody of the developing or testing people got access on something like that?


-----Ursprüngliche Nachricht-----
Von: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM] 
Gesendet: Freitag, 27. November 2009 16:15
An: Derby Discussion
Betreff: Re: AW: AW: AW: OOM with millions of weakly-referenced Derby objects


Hi Malte,

Malte.Kempff@de.equens.com writes:


&gt; Hi Dag, The problem in my case is, that I don't have access to any
&gt; AIX-Computer, and that is really a pity, because I cannot
&gt; reconstruct the scenario on my own and watch it with my own eyes.
&gt; That all happened on a production system and the provider denies
&gt; trying it out again.  But attached you can find the SQL-script
&gt; without being UTF8.  So that Problem should occur in the same way
&gt; used on AIX (5.3) BTW: is there a way to be kind of independent of
&gt; the input format?

I converted the script you enclosed to UTF-8 and ran it through ij
without any problems. 

I also tried to run it with the enclosed program, and it gave me no
errors when the inout file was encoded with UTF-8 (Comments had
non-ASCII German character), and it printed no errors on my
OpenSolaris system (I don't have access to AIX).

In any case, should you see this problem again, please feel free to
file a bug report(*), preferably with a repro and/or logs.

As for independence of the input format, since runScript requires that
you specify the encoding, you could do some encoding auto-detect logic
on the script, I guess..

(*) http://db.apache.org/derby/DerbyBugGuidelines.html

Hope this helps,
Dag


import org.apache.derby.tools.ij;
import java.sql.*;
import java.io.*;

public class Foo {

    public Foo() {};

    static public void main(String[] args)
            throws SQLException,
                   UnsupportedEncodingException,
                   FileNotFoundException,
                   ClassNotFoundException {
        Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
        Connection c = DriverManager.getConnection("jdbc:derby:wombat;create=true");

        FileInputStream fs = new FileInputStream(args[0]);

        int errs = ij.runScript(c,
                                fs,
                                "UTF-8",
                                System.out,
                                "UTF-8");

        System.out.println("\n\nerrs=" + errs);
        c.close();
    }
}




&gt;
&gt; Malte
&gt;
&gt; -----Ursprüngliche Nachricht-----
&gt; Von: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM] 
&gt; Gesendet: Freitag, 27. November 2009 01:19
&gt; An: Derby Discussion
&gt; Betreff: Re: AW: AW: OOM with millions of weakly-referenced Derby objects
&gt;
&gt; Malte.Kempff@de.equens.com writes:
&gt;
&gt;&gt; Yes this is the API I am reffering to.  Well actually it says that,
&gt;&gt; but in my case it did not do it.  It needed a long time, several
&gt;&gt; minutes. Reason as it turned later out, after getting the output in
&gt;&gt; a file a lot of IOExcceptions. I never got those on windows nor on
&gt;&gt; Solaris. Thr original logic of the routine calling the runScript
&gt;&gt; Method was asking for the return code but either it never hit this
&gt;&gt; if statement and crashed somewhere within ij without giving the
&gt;&gt; Exception to the caller or ij gave something like 0 so the output
&gt;&gt; never was given to the logger.  So there is something phony with
&gt;&gt; ij.runScript using it with AIX 5.3 and a SQL-Script not coded UTF8
&gt;&gt; but declaring in the parameters as UTF8. Of course that is a fault
&gt;&gt; by my own, but it should tel me about it.
&gt;
&gt; I looked at the implementation for runScript in
&gt; org.apache.derby.impl.tools.ij.utilMain#runScriptGuts and it does seem
&gt; to catch exceptions, count them and return them. Are you able to
&gt; provide a repro script showing that 0 or -1 is returned from runScript
&gt; for the failing scenario? 
&gt;
&gt; Thanks,
&gt; Dag
&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; -----Ursprüngliche Nachricht-----
&gt;&gt; Von: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM] 
&gt;&gt; Gesendet: Freitag, 20. November 2009 19:54
&gt;&gt; An: Derby Discussion
&gt;&gt; Betreff: Re: AW: OOM with millions of weakly-referenced Derby objects
&gt;&gt;
&gt;&gt; Malte.Kempff@de.equens.com writes:
&gt;&gt;
&gt;&gt;&gt; In other words I would count that situation as not nice behaviour of ij, since
the return code should have been given as I would suppose it looking at the method signature.
&gt;&gt;
&gt;&gt; Is this the API signature you are referring to?
&gt;&gt;
&gt;&gt; http://db.apache.org/derby/docs/10.5/publishedapi/jdbc4/org/apache/derby/tools/ij.html#runScript(java.sql.Connection,%20java.io.InputStream,%20java.lang.String,%20java.io.OutputStream,%20java.lang.String)
&gt;&gt;
&gt;&gt; It says:
&gt;&gt;
&gt;&gt; Returns:h
&gt;&gt;     Number of SQLExceptions thrown during the execution, -1 if not
&gt;&gt;     known. 
&gt;&gt;
&gt;&gt; If so, are you seeing 0 or -1 returned here?
&gt;&gt;
&gt;&gt; Dag


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: AW: AW: AW: OOM with millions of weakly-referenced Derby objects</title>
<author><name>Dag.Wanvik@Sun.COM (Dag H. Wanvik)</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3cx1ox7htcgfsp.fsf@sun.com%3e"/>
<id>urn:uuid:%3cx1ox7htcgfsp-fsf@sun-com%3e</id>
<updated>2009-11-27T15:15:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hi Malte,

Malte.Kempff@de.equens.com writes:


&gt; Hi Dag, The problem in my case is, that I don't have access to any
&gt; AIX-Computer, and that is really a pity, because I cannot
&gt; reconstruct the scenario on my own and watch it with my own eyes.
&gt; That all happened on a production system and the provider denies
&gt; trying it out again.  But attached you can find the SQL-script
&gt; without being UTF8.  So that Problem should occur in the same way
&gt; used on AIX (5.3) BTW: is there a way to be kind of independent of
&gt; the input format?

I converted the script you enclosed to UTF-8 and ran it through ij
without any problems. 

I also tried to run it with the enclosed program, and it gave me no
errors when the inout file was encoded with UTF-8 (Comments had
non-ASCII German character), and it printed no errors on my
OpenSolaris system (I don't have access to AIX).

In any case, should you see this problem again, please feel free to
file a bug report(*), preferably with a repro and/or logs.

As for independence of the input format, since runScript requires that
you specify the encoding, you could do some encoding auto-detect logic
on the script, I guess..

(*) http://db.apache.org/derby/DerbyBugGuidelines.html

Hope this helps,
Dag


import org.apache.derby.tools.ij;
import java.sql.*;
import java.io.*;

public class Foo {

    public Foo() {};

    static public void main(String[] args)
            throws SQLException,
                   UnsupportedEncodingException,
                   FileNotFoundException,
                   ClassNotFoundException {
        Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
        Connection c = DriverManager.getConnection("jdbc:derby:wombat;create=true");

        FileInputStream fs = new FileInputStream(args[0]);

        int errs = ij.runScript(c,
                                fs,
                                "UTF-8",
                                System.out,
                                "UTF-8");

        System.out.println("\n\nerrs=" + errs);
        c.close();
    }
}




&gt;
&gt; Malte
&gt;
&gt; -----Ursprüngliche Nachricht-----
&gt; Von: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM] 
&gt; Gesendet: Freitag, 27. November 2009 01:19
&gt; An: Derby Discussion
&gt; Betreff: Re: AW: AW: OOM with millions of weakly-referenced Derby objects
&gt;
&gt; Malte.Kempff@de.equens.com writes:
&gt;
&gt;&gt; Yes this is the API I am reffering to.  Well actually it says that,
&gt;&gt; but in my case it did not do it.  It needed a long time, several
&gt;&gt; minutes. Reason as it turned later out, after getting the output in
&gt;&gt; a file a lot of IOExcceptions. I never got those on windows nor on
&gt;&gt; Solaris. Thr original logic of the routine calling the runScript
&gt;&gt; Method was asking for the return code but either it never hit this
&gt;&gt; if statement and crashed somewhere within ij without giving the
&gt;&gt; Exception to the caller or ij gave something like 0 so the output
&gt;&gt; never was given to the logger.  So there is something phony with
&gt;&gt; ij.runScript using it with AIX 5.3 and a SQL-Script not coded UTF8
&gt;&gt; but declaring in the parameters as UTF8. Of course that is a fault
&gt;&gt; by my own, but it should tel me about it.
&gt;
&gt; I looked at the implementation for runScript in
&gt; org.apache.derby.impl.tools.ij.utilMain#runScriptGuts and it does seem
&gt; to catch exceptions, count them and return them. Are you able to
&gt; provide a repro script showing that 0 or -1 is returned from runScript
&gt; for the failing scenario? 
&gt;
&gt; Thanks,
&gt; Dag
&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; -----Ursprüngliche Nachricht-----
&gt;&gt; Von: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM] 
&gt;&gt; Gesendet: Freitag, 20. November 2009 19:54
&gt;&gt; An: Derby Discussion
&gt;&gt; Betreff: Re: AW: OOM with millions of weakly-referenced Derby objects
&gt;&gt;
&gt;&gt; Malte.Kempff@de.equens.com writes:
&gt;&gt;
&gt;&gt;&gt; In other words I would count that situation as not nice behaviour of ij, since
the return code should have been given as I would suppose it looking at the method signature.
&gt;&gt;
&gt;&gt; Is this the API signature you are referring to?
&gt;&gt;
&gt;&gt; http://db.apache.org/derby/docs/10.5/publishedapi/jdbc4/org/apache/derby/tools/ij.html#runScript(java.sql.Connection,%20java.io.InputStream,%20java.lang.String,%20java.io.OutputStream,%20java.lang.String)
&gt;&gt;
&gt;&gt; It says:
&gt;&gt;
&gt;&gt; Returns:h
&gt;&gt;     Number of SQLExceptions thrown during the execution, -1 if not
&gt;&gt;     known. 
&gt;&gt;
&gt;&gt; If so, are you seeing 0 or -1 returned here?
&gt;&gt;
&gt;&gt; Dag


</pre>
</div>
</content>
</entry>
<entry>
<title>AW: AW: AW: OOM with millions of weakly-referenced Derby objects</title>
<author><name>&lt;Malte.Kempff@de.equens.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3c0773A3CE9DAC7B42B8F564C52805678D02647E72@EVS01.INTERN.INTERPAY.NL%3e"/>
<id>urn:uuid:%3c0773A3CE9DAC7B42B8F564C52805678D02647E72@EVS01-INTERN-INTERPAY-NL%3e</id>
<updated>2009-11-27T14:11:54Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi Dag,
The problem in my case is, that I don't have access to any AIX-Computer, and that is really
a pity, because I cannot reconstruct the scenario on my own and watch it with my own eyes.
That all happened on a production system and the provider denies trying it out again.
But attached you can find the SQL-script without being UTF8.
So that Problem should occur in the same way used on AIX (5.3)
BTW: is there a way to be kind of independent of the input format?

Malte

-----Ursprüngliche Nachricht-----
Von: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM] 
Gesendet: Freitag, 27. November 2009 01:19
An: Derby Discussion
Betreff: Re: AW: AW: OOM with millions of weakly-referenced Derby objects

Malte.Kempff@de.equens.com writes:

&gt; Yes this is the API I am reffering to.  Well actually it says that,
&gt; but in my case it did not do it.  It needed a long time, several
&gt; minutes. Reason as it turned later out, after getting the output in
&gt; a file a lot of IOExcceptions. I never got those on windows nor on
&gt; Solaris. Thr original logic of the routine calling the runScript
&gt; Method was asking for the return code but either it never hit this
&gt; if statement and crashed somewhere within ij without giving the
&gt; Exception to the caller or ij gave something like 0 so the output
&gt; never was given to the logger.  So there is something phony with
&gt; ij.runScript using it with AIX 5.3 and a SQL-Script not coded UTF8
&gt; but declaring in the parameters as UTF8. Of course that is a fault
&gt; by my own, but it should tel me about it.

I looked at the implementation for runScript in
org.apache.derby.impl.tools.ij.utilMain#runScriptGuts and it does seem
to catch exceptions, count them and return them. Are you able to
provide a repro script showing that 0 or -1 is returned from runScript
for the failing scenario? 

Thanks,
Dag

&gt;
&gt;
&gt;
&gt; -----Ursprüngliche Nachricht-----
&gt; Von: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM] 
&gt; Gesendet: Freitag, 20. November 2009 19:54
&gt; An: Derby Discussion
&gt; Betreff: Re: AW: OOM with millions of weakly-referenced Derby objects
&gt;
&gt; Malte.Kempff@de.equens.com writes:
&gt;
&gt;&gt; In other words I would count that situation as not nice behaviour of ij, since the
return code should have been given as I would suppose it looking at the method signature.
&gt;
&gt; Is this the API signature you are referring to?
&gt;
&gt; http://db.apache.org/derby/docs/10.5/publishedapi/jdbc4/org/apache/derby/tools/ij.html#runScript(java.sql.Connection,%20java.io.InputStream,%20java.lang.String,%20java.io.OutputStream,%20java.lang.String)
&gt;
&gt; It says:
&gt;
&gt; Returns:
&gt;     Number of SQLExceptions thrown during the execution, -1 if not
&gt;     known. 
&gt;
&gt; If so, are you seeing 0 or -1 returned here?
&gt;
&gt; Dag
&gt;

-- 
Dag H. Wanvik, staff engineer
Sun Microsystems, Java Core and Desktop - Java DB/Derby
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43496/+47 73842196, Fax:  +47 73842101
Sun IM: dw136674, Yahoo IM: dag_h_wanvik


</pre>
</div>
</content>
</entry>
<entry>
<title>Problem with escaping of strings</title>
<author><name>Sven Skrabal &lt;radiation.uc@gmx.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3c4B0FD79F.6080902@gmx.net%3e"/>
<id>urn:uuid:%3c4B0FD79F-6080902@gmx-net%3e</id>
<updated>2009-11-27T13:43:59Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi all,

I'm trying to import data exported via PhpMyAdmin from MySQL. Now my SQL
Statements contain special characters like \r\n. Apache Derby seems to
filter them out. If I import that data I just get this characters
interpreted as normal text. So what I get is a string containing all
data without the  correct newlines. How can I tell Apache Derby to
interpret this text as special charaters?

Example:
INSERT INTO test (test) VALUES ('test\r\ntest');

The column's datatype is LONG VARCHAR. I used the 'Services' tab in
Netbeans IDE to import this data. A lot of research on google and the
reference manual didn't help. Please help :-)

Greetings
Sven S.




</pre>
</div>
</content>
</entry>
<entry>
<title>Re: AW: AW: OOM with millions of weakly-referenced Derby objects</title>
<author><name>Dag.Wanvik@Sun.COM (Dag H. Wanvik)</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3cx1oxr5rkzuon.fsf@sun.com%3e"/>
<id>urn:uuid:%3cx1oxr5rkzuon-fsf@sun-com%3e</id>
<updated>2009-11-27T00:18:48Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Malte.Kempff@de.equens.com writes:

&gt; Yes this is the API I am reffering to.  Well actually it says that,
&gt; but in my case it did not do it.  It needed a long time, several
&gt; minutes. Reason as it turned later out, after getting the output in
&gt; a file a lot of IOExcceptions. I never got those on windows nor on
&gt; Solaris. Thr original logic of the routine calling the runScript
&gt; Method was asking for the return code but either it never hit this
&gt; if statement and crashed somewhere within ij without giving the
&gt; Exception to the caller or ij gave something like 0 so the output
&gt; never was given to the logger.  So there is something phony with
&gt; ij.runScript using it with AIX 5.3 and a SQL-Script not coded UTF8
&gt; but declaring in the parameters as UTF8. Of course that is a fault
&gt; by my own, but it should tel me about it.

I looked at the implementation for runScript in
org.apache.derby.impl.tools.ij.utilMain#runScriptGuts and it does seem
to catch exceptions, count them and return them. Are you able to
provide a repro script showing that 0 or -1 is returned from runScript
for the failing scenario? 

Thanks,
Dag

&gt;
&gt;
&gt;
&gt; -----Ursprüngliche Nachricht-----
&gt; Von: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM] 
&gt; Gesendet: Freitag, 20. November 2009 19:54
&gt; An: Derby Discussion
&gt; Betreff: Re: AW: OOM with millions of weakly-referenced Derby objects
&gt;
&gt; Malte.Kempff@de.equens.com writes:
&gt;
&gt;&gt; In other words I would count that situation as not nice behaviour of ij, since the
return code should have been given as I would suppose it looking at the method signature.
&gt;
&gt; Is this the API signature you are referring to?
&gt;
&gt; http://db.apache.org/derby/docs/10.5/publishedapi/jdbc4/org/apache/derby/tools/ij.html#runScript(java.sql.Connection,%20java.io.InputStream,%20java.lang.String,%20java.io.OutputStream,%20java.lang.String)
&gt;
&gt; It says:
&gt;
&gt; Returns:
&gt;     Number of SQLExceptions thrown during the execution, -1 if not
&gt;     known. 
&gt;
&gt; If so, are you seeing 0 or -1 returned here?
&gt;
&gt; Dag
&gt;

-- 
Dag H. Wanvik, staff engineer
Sun Microsystems, Java Core and Desktop - Java DB/Derby
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43496/+47 73842196, Fax:  +47 73842101
Sun IM: dw136674, Yahoo IM: dag_h_wanvik


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Plans for a 10.5.3.1?</title>
<author><name>Kathey Marsden &lt;kmarsdenderby@sbcglobal.net&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/db-derby-user/200911.mbox/%3c4B0EA7B8.9070708@sbcglobal.net%3e"/>
<id>urn:uuid:%3c4B0EA7B8-9070708@sbcglobal-net%3e</id>
<updated>2009-11-26T16:07:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Matt Doran wrote:
&gt; Hi guys,
&gt;
&gt; It's 3 months since 10.5.3.0 and there appears to be a few nice fixes 
&gt; lined up for a 10.5.3.1 (see link below).   Are there any plans for 
&gt; rolling this release?
&gt;
&gt; https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&amp;pid=10594&amp;fixfor=12314182

&gt; &lt;https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&amp;pid=10594&amp;fixfor=12314182&gt;

&gt;
I have not heard of any plans for  an immediate release, but if you want 
to build it yourself to take advantage of the fixes, there should be no 
upgrade issues associated with using it or upgrading to the next release 
and we would appreciate the early feedback.

Thanks

Kathey





</pre>
</div>
</content>
</entry>
</feed>
