Re: Embedded - can it be multi-user?

2011-07-03 Thread Bryan Pendleton
Now, I was using the SQuirreL SQL Client to look at my databases as they were being created, but I couldn't use ij with the database *_and_* SQuirreL at the same time. Correct. Two separate JVMs cannot both access the same database using the embedded driver concurrently. What I'm wondering

Re: hi

2011-07-06 Thread Bryan Pendleton
On 07/05/2011 11:12 PM, dinesh nautiyal wrote: Hi, I want to use derby database with Eclipse,Plz suggest me how to pulg in Derby with eclipse. Thanks and Regards Dinesh. Perhaps you are looking for a resource like this:

Re: Long compilation time for a Prepared Statement

2011-07-13 Thread Bryan Pendleton
1. Does the compiler take the amount of records in consideration when compiling the query? Yes. The optimizer has statistical information about the size of the various tables, and about their keying structures, etc. 2. Am I right to assume the cause of the delay is in the excessive amount of

Re: How to unlock a table in derby

2011-07-15 Thread Bryan Pendleton
I execute query lock table table name in share mode but I cannot see any documentation on how to unlock a derby table. Commit. thanks, bryan

Re: How to unlock a table in derby

2011-07-18 Thread Bryan Pendleton
On 07/18/2011 07:16 AM, Lahiru Gunathilake wrote: Hi Byan, I am creating the connection with autoCommit=true parameter, does this work with derby or should I explicitly commit the transaction? Lahiru I believe if you do this, the system will automatically insert a 'commit' immediately

Re: nulls in prepared statement

2011-07-19 Thread Bryan Pendleton
pstmt.setString(1,cobj.getPartNo()); where the getPartNo() method returns null. When this happens I get a null pointer exception. It's not an exact match, but your description sounds VERY close to https://issues.apache.org/jira/browse/DERBY-1938 Can you post a full stack trace of your

Re: How to run programs with Derby as a database

2011-08-06 Thread Bryan Pendleton
I am getting error that database 'wombat' not found. You can specify ;create=true at the end of your connection URL and then Derby will automatically create the database for you. thanks, bryan

Re: Can't Load Embedded Driver

2011-08-09 Thread Bryan Pendleton
the call jdbc:derby:EMDatabase;create=trueis not a valid call to embedded driver. It is a call to a derby server correct url should be ( as far as I know) jdbc:derby:path to database;create=true No, the server-style URL always has the double slash after the derby:, as in:

Re: Can't Load Embedded Driver

2011-08-09 Thread Bryan Pendleton
C:\WINDOWS\SYSTEM32\java.exe -splash:EMsplash.jpg -jar C:\Program Files\ElectionManager\EMServer.jar Not sure if this is the problem, but I believe that if you use '-jar' on your command line, then CLASSPATH is ignored, and ALL the classes have to come from the jar, right? thanks, bryan

Re: too size for derby db

2011-09-29 Thread Bryan Pendleton
I'm newbie of derby but there is something not clear for me. There are soo few data that 12MB seems to excessive...could you please let me know? SYSCS_DIAG.SPACE_TABLE can help you figure out where your space goes: http://db.apache.org/derby/docs/10.8/ref/rrefsyscsdiagtables.html thanks,

Re: ClientDriver class not found in derby.jar

2011-10-08 Thread Bryan Pendleton
I'm using Derby-10.8.1.2 bin installation for use in my program, I got the following error stack : java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver And is derbyclient.jar in your CLASSPATH? thanks, bryan

Re: Space requirements on disk

2011-10-10 Thread Bryan Pendleton
Is it possible to give rules of the following kind: Every field of type INTEGER will take N bytes (N=4?), every field of type VARCHAR(X) will take I*X+J bytes (I, J =?), every field of type VARCHAR with NULL value will take K bytes, every row will take the sum of all field-widths plus L bytes,

Re: SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE question

2011-10-28 Thread Bryan Pendleton
On 10/27/2011 09:26 PM, Sundar Narayanaswamy wrote: I insert 1 rows into the table, then delete all that rows. I then call SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE with just the option to purge rows so that the space left behind by deleted rows can be reused for future inserts. I have the

Re: Unique Column with null values

2011-11-09 Thread Bryan Pendleton
is there a way to mix an unique column with null values. So that i have an column where only unique values are allowed with the exception of multiple null values. Yes. Since Derby 10.4, that is the way that Derby's table-level UNIQUE constraints have worked. See:

Re: AW: Does derby ned allways a rollback or commt?

2011-11-22 Thread Bryan Pendleton
On 11/22/2011 04:01 AM, Peter Ondruška wrote: I would extend your question: is there any difference in commit or rollback after single select statement? Nothing much that I ever found. I always use commit to complete my selects, because it feels cleaner, at the application level, to use

Re: Error on CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE

2011-11-30 Thread Bryan Pendleton
Exception in thread main java.sql.SQLException: Import error on line 1 of The error message is telling you that the error is on the very first line of the data file. Sometimes spreadsheet exports contain a special column headers row at the very start. Usually your spreadsheet tool has a

Re: German Sharp S and UCASE

2011-12-08 Thread Bryan Pendleton
ResultSet rs = s.executeQuery(values upper('Straße')); So it seems the value is returned correctly, but the meta-data is wrong (STRASSE is 7 characters long, not 6). ij uses the meta-data to determine how much space each column should have. 6 *characters* long, but 7 *bytes* long? Do we

Re: List columns that make up an index

2012-01-21 Thread Bryan Pendleton
What root canal Just to get column names of an index I always just use ij's show indexes command. http://db.apache.org/derby/docs/10.8/tools/rtoolsijcomrefshow.html thanks, bryan

Re: where are my db files?

2012-01-22 Thread Bryan Pendleton
well i use jdbc.EmbeddedDriver for my db connectivity and i connect to mydb with this statement jdbc:derby:C:/Users/user1/firstdb i get in the firstdb folder but i do not see the tables i have created.so where are they? Make sure you say ;create=true at the end of your connect statement,

Re: Can't seem to force table level locking

2012-01-31 Thread Bryan Pendleton
I have tried to force table level locking by; 1. SQL - lock table wayNodes6 in share mode 2. st.execute(call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.locks.escalationThreshold','1')); But the query execution plan always states it has chosen row level locking Do you have autocommit

Re: Can't seem to force table level locking

2012-02-01 Thread Bryan Pendleton
Yes, autocommit is turned off. Any other thoughts? Well, I never had any trouble getting the LOCK TABLE feature to work, so I'm not sure what's wrong. One possibility is that the query plan output is misleading you. That is, although the query plan output might indicate that the optimizer is

Re: Porting to standard SQL

2012-02-02 Thread Bryan Pendleton
On 02/02/2012 02:53 PM, TXVanguard wrote: UPDATE T1 INNER JOIN T2 ON (T1.A= T2.A) SET T2.B = T1.B Perhaps something like: update t2 set b = (select b from t1 where t1.a = t2.a) thanks, bryan

Re: Derby database started in READ ONLY mode

2012-02-06 Thread Bryan Pendleton
=== java.io.IOException: No space left on device at sun.nio.ch.FileDispatcher.pwrite0(Native Method) at Also check if your database is located on a FAT-32 filesystem or similar, where database files are limited by the filesystem to a max 2GB size. Similar things can happen with

Re: Stall during NetworkServerControl.getRuntimeInfo()

2012-02-06 Thread Bryan Pendleton
We have one particular user reporting an issue where getRuntimeInfo() stalls while trying to read the data back from the server: SwingWorker-pool-1-thread-3 Id=48 RUNNABLE at java.net.PlainSocketImpl.isConnectionReset(PlainSocketImpl.java:623) - locked java.lang.Object@48183ac5

Re: Derby Embedded losing connection ?

2012-02-13 Thread Bryan Pendleton
get reports (and also felt it our self) that our app simply is losing its connection to the DB. What are the symptoms, exactly? That is, what is it that makes you think you are losing your connection? One thing that occurs to me is a bit of a long-shot: are you using a connection pooling

Re: CALL SYSCS_UTIL.SYSCS_COMPRESS_TABLE

2012-02-14 Thread Bryan Pendleton
Why i aways got an StackOverflowError exception when i try to run CALL SYSCS_UTIL.SYSCS_COMPRESS_TABLE() ? ... Caused by: java.lang.StackOverflowError at java.lang.ThreadLocal.get(ThreadLocal.java:125) at java.lang.StringCoding.deref(StringCoding.java:46) at

Re: Who is connected to Derby Network Server?

2012-02-26 Thread Bryan Pendleton
On 02/26/2012 08:43 AM, Libor Jelinek wrote: Hello everbody! I would like to ask the community how to see a list of connected clients to Derby Network Server? Have you tried runtimeinfo: http://db.apache.org/derby/docs/10.8/adminguide/tadminappsruntimeinfo.html thanks, bryan

Re: Can't remove derby from memory

2012-03-26 Thread Bryan Pendleton
room. I have noticed that no matter what I do, the ~10MB of memory that is taken when the database connect is initiated is held no matter what commands Certainly sounds like the database isn't getting fully shut down. dynamDS.setShutdownDatabase(shutdown); It's not clear to me that this

Re: Can someone explain the use of logged archive backup?

2012-03-29 Thread Bryan Pendleton
confused here on the archived logs and the active logs. In general, there can be multiple logs covering the time between one backup and the next backup, and those logs must be applied, serially, in the correct order, to recover the database fully. Once you take that next backup, you no longer

Re: Activity 3: Run a JDBC program using the embedded driver

2012-05-17 Thread Bryan Pendleton
and echo $CLASSPATH /home/kb9agt/jdk1.7/db/lib/derby.jar:. I see A : separated list of directories I think I need java -cp $CLASSPATH WwdEmbedded Yep. Did the trick. Please update the tutorial as soon as you can. I'm glad you got it figured out, but I'm not sure what's wrong. The whole point

Re: a few questions to Apache Derby Database

2012-05-18 Thread Bryan Pendleton
*_java.lang.OutOfMemoryError: Java heap space_* Is it because of the size of our database (3,1 GB!)? and what can I do to improve the performance of the Derby Database, and to resolve the error? The Derby Tuning Guide provides a lot of useful general advice about how to tune the performance

Re: hello

2012-05-25 Thread Bryan Pendleton
C:\java org.apache.derby.tools.sysinfo Error: Could not find or load main class org.apache.derby.tools.sysinfo C:\echo %CLASSPATH% C:\Program Files\Apache\db-derby-10.8.1.2-bin\lib\derby.jar;C:\Program Files \Apache\db-derby-10.8.1.2-bin\LIB\derbytools.jar; Sometimes it is hard to get the

Re: how to limit the derby db file size avoid eating up disk space?

2012-05-31 Thread Bryan Pendleton
How to limit thesize of db file afterlarge amounts of insert and delete operation? One common technique for handling this pattern of activity, is to use a collection of tables, rather than a single table, and to drop entire tables rather than deleting rows from an existing table. For example,

Re: Merge and combine different data from databases

2012-06-14 Thread Bryan Pendleton
Currently I have a DB named myDB and myDB consists of a few tables in it. Lets say I want to write to myDB from different computers concurrently(each computer will have its own myDB), how do I merge and combine the DB from each computer into 1 central DB at the end of the day? One technique is

Re: Guidance/Help/Book/References?

2012-06-23 Thread Bryan Pendleton
Derby is used heavily in my project and its tables are frequently accessed concurrently by multiple threads. Some threads update one or several tables, while other threads perform run select statements against those. I’ve written to this group several times whenever errors occurred, but some of

Re: Problem upgrading a derby database, ArrayIndexOutOfBoundsException on getIndexInfo()

2012-06-30 Thread Bryan Pendleton
On 06/30/2012 02:24 PM, fed wrote: I have a derby database 10.8.x and i use it with jdo/datanuclues. I am trying to update it to 10.9 but after updating it the database becomes unusable, it gives me an ArrayIndexOutOfBoundsException on conn.getMetaData().getIndexInfo(... ). From time to time,

Re: Error when dropping a table

2012-07-04 Thread Bryan Pendleton
Does anyone have explanation on the error? Is there anything we can do to drop the table successfully? There's some sort of a bug here. If you can file it in JIRA with whatever supporting information you can provide (ideally, a reproduction case or perhaps a backup of the database with this

Re: Speeding up hideous insert

2012-07-04 Thread Bryan Pendleton
On 07/03/2012 03:20 PM, TXVanguard wrote: Don't worry too much about the details: just look at the SELECT DISTINCT, the WHERE, the GROUP BY, etc. What are some general strategies for speeding up this kind of statement? What the community knows about this sort of thing is mostly collected

Re: transaction problem???

2012-07-09 Thread Bryan Pendleton
Caused by: java.io.FileNotFoundException: D:\repos\TOPIK\workspace\log\db_20120614_114744\loggingDB20120614_114744\log\log2846.dat (The process cannot access the file because it is being used by another process) Check to see if you have an active Anti-Virus scanning program which is monitoring

Re: Derby on NAS = corruption ?

2012-07-18 Thread Bryan Pendleton
These Derby dbs (version 10.5.1.1) are stored on a NAS (cluster Isilon NL series) shared between webservers. The derby db is directly acceded on NAS and it is thread safe. When you say the Derby dbs are stored on a device shared between webservers, do you mean that there are Derby

Re: DerbyUI plugin.xml error

2012-07-18 Thread Bryan Pendleton
I am attempting to configure Derby with Eclipse. I have downloaded the DerbyUI svn source and after importing the source into Eclipse per the instructions I have an error in the plugin.xml file indicating org.apache.derby.core cannot be resolved. Has anyone else encountered this and know what

Re: Java DB (Derby Database) queries

2012-07-27 Thread Bryan Pendleton
1) Does Java DB support database level audit trail ? Derby does not provide any support for tracking security-related operations. If you only need to audit update statements, you may be able to define triggers that do what you need. Typically this is done by having your triggers append

Re: Cannot read table while writing transaction in another connection

2012-07-30 Thread Bryan Pendleton
I would have expected that around line 175 I would get the row count as it was before the uncommitted transaction started and that no lock would be needed to just read. Unfortunately, Derby doesn't currently implement these snapshot isolation types of semantics. Is this the way it is supposed

Re: Corrupted database - missing system files

2012-08-15 Thread Bryan Pendleton
After adding these in, I get assertion failures when trying to run some queries, which is perhaps not surprising. Seemingly, it seems all the user conglomerates are present, looking at the list of filenames present. Is there any way I can get this database into a useable state? I can't think

Re: Problems with Online Backup SYSCS_BACKUP_DATABASE

2012-08-17 Thread Bryan Pendleton
On 08/17/2012 04:05 AM, Stefan R. wrote: database, got an I/O Exception while writing to the backup container file /mnt/backup/2012-08-13-00-00-00/bd/seg0/c9b1.dat.#012#011at org.apache.derby.client.am.Statement.completeExecute(Unknown ... org.apache.derby.client.am.SqlException: Java

Re: Reconstruct DB from seg and log folders

2012-08-21 Thread Bryan Pendleton
I was given some data for academic research purposes all zipped up. Once I opened them I found out I had part of a derby database! (two folders were sent; seg and log). I'm now trying to reconstruct a derby database with these folders but not having any luck. I essentially created a new db with

Re: problem i connection

2012-08-22 Thread Bryan Pendleton
i need to connect my java code with ma database..hou should i write the database connection code in windows..i need hostname,name of the db,type of driver,tcp/ip port no of db,username,password. http://db.apache.org/derby/docs/10.9/getstart/ bryan

Re: Error 42x71:Type de donnÚes 'BOOLEAN' non valide: when doing a Create Table [table] as Select * from [otherTable] with no data

2012-09-06 Thread Bryan Pendleton
So the 'boolean' word definately works, just not in the instance of a create table as statement. Yes, that sounds like a bug. Boolean has recently been added to the DDL language, and this might have been missed. Did you try searching JIRA to see if it's a known bug? If not, please log a bug

Re: unable to take backup after derby upgrade

2012-10-02 Thread Bryan Pendleton
ij CALL SYSCS_UTIL.SYSCS_BACKUP_DATABASE('/usr/local/derby10/backups'); ... ERROR 38000: The exception 'java.security.AccessControlException: Access denied (java.io.FilePermission /usr/local/derby10/backups/PRAT write)' was thrown while evaluating an expression.ERROR XJ001: Java exception:

Re: Is it expected that each class loader context gets its own in memory database

2012-10-23 Thread Bryan Pendleton
And that would lead me to expect that each engine (and therefore class loader) would get its own, separate namespace of in-memory databases. That seems like correct behavior to me. thanks, bryan

Re: derby is hanging in org.apache.derby.exe....g2

2012-10-31 Thread Bryan Pendleton
DELETE FROM ConnectionEntity conn WHERE conn.stopOrPass.id IN + (SELECT sop.id FROM StopOrPassEntity sop WHERE sop.partialTrip.id IN + (SELECT prtTrip.id FROM PartialTripEntity prtTrip WHERE prtTrip.trip.id IN : Ids)) There have

Re: derby (dead)lock exception

2012-11-10 Thread Bryan Pendleton
. What does U and X mean after the trans. Ids? The query is: DELETE FROM TRIP_TIMETABLE WHERE EXISTS( SELECT ID FROM TRIP WHERE (ID IN (?)) AND ID = TRIP_TIMETABLE.trips_ID ) What can be wrong with this query? I'm not exactly sure what's wrong, but I agree that they both

Re: Introducing the derby-maven-plugin

2012-12-01 Thread Bryan Pendleton
while ago I knocked up a Maven plugin which can start Derby for you during the build (in the same VM) and be used by integration tests (which are not forked. of course). Hi Martin, You might want to add some information about your tool to the Uses of Derby section of the Derby wiki at

Re: Vetting Derby. Technical documents?

2012-12-06 Thread Bryan Pendleton
My company is evaluating whether to use Derby for a desktop/client-server application where security and 21-CFR 11 compliance is important. Although Derby can be used perfectly well as a standalone database, it is also designed to be embedded into a containing application. The Derby libraries

Re: Boolean in version 10.9

2012-12-16 Thread Bryan Pendleton
I've checked my computer and couldn't find another version of derby installed anywhere. The 'sysinfo' tool can be useful for figuring out which copy of Derby is getting run, and from what location: http://db.apache.org/derby/docs/10.9/tools/rtoolssysinfo41288.html thanks, bryan

Re: Some questions about the Derby

2012-12-19 Thread Bryan Pendleton
Forwarding to the list. On 12/19/2012 04:10 AM, 王旭 wrote: *Hello Pendleton* ** *I am a loyal user of derby database from China. I found some problems in the course of use, so I need your help urgently.* ** *Derby Version**:**10.4* *Question one**:*** Firstly, I created a

Re: Ideas for optimisation needed

2012-12-23 Thread Bryan Pendleton
The change in timing is spectacular: it now takes about 0.4 seconds Great news! I think it would be cool if you could write up a short summary of your findings and put it on the hints and tips section of the Derby community wiki. thanks, bryan

Re: Create embedded, run via network server: what's databaseName?

2013-01-11 Thread Bryan Pendleton
What I can't figure out is the name of the database the network client should connect to, aka the last element of the JDBC URL. The last element is basically the same: it is the path to the database, starting from the network server's derby.system.home location. So if you do:

Re: Derby 10.8.2.2, JTA on GlassFish 3.1.2.2 and very strange behavior

2013-02-18 Thread Bryan Pendleton
On 02/18/2013 07:40 AM, Wujek Srujek wrote: Hi. But why is there any local transaction? I haven't started any, I just set autoCommit to false There is always a transaction; Derby won't let you ever access the database without one. What auto-commit does is to automatically commit the

Re: Derby 10.8.2.2, JTA on GlassFish 3.1.2.2 and very strange behavior

2013-02-18 Thread Bryan Pendleton
One more question, though: the uncommitted insert comes up in the subsequent select - is this data coming from the server, from the active tx, or does the jdbc driver cache the data somehow? The results are coming from the server. The server shows you your own uncommitted updates, but won't

Re: DriverManager.getConnection error with JDK 7

2013-02-23 Thread Bryan Pendleton
I caught SQLException and he said that : No suitable driver found for jdbc:derby:MoneyBack1;create=true;user=miltone;password=password So your classloader can't find the derby driver. Have you checked that derby.jar is on your classpath? The sysinfo tool is useful for diagnosing classpath

Re: DERBY EMBEDDED IN NETBEANS PROGRAM

2013-02-24 Thread Bryan Pendleton
I am using netbeans. When I use embedded driver in netbeans i get errors, even though the derbyclient is in the library. If i add derbyclient.jar in the client it runs perfectly, even though the driver is: Class.forName(org.apache.derby.jdbc.EmbeddedDriver).newInstance(); The choice of the

Re: I failed to connect client and server Derby.

2013-03-12 Thread Bryan Pendleton
C:\Users\pocky\derby\db-derby-10.9.1.0-bin\DERBYTUTORjava -jar %DERBY_HOME%\lib\derbyrun.jar server start C:\Users\pocky\derby\db-derby-10.9.1.0-bin\DERBYTUTOR It is odd that you didn't see any output from the command: java server start Normally when I run that command there is

Re: Peculiar sorting behaviour?

2013-04-02 Thread Bryan Pendleton
Hi John, Here's my perspective on what you posted: 1) Anytime you issue a SELECT statement with an ORDER BY, and the rows don't come back in that order, that's a bug. As you point out, it would be best if you could narrow this down to a simple reproducible case when you report it. However,

Re: record is not inserting in the Derby DB.

2013-04-20 Thread Bryan Pendleton
i create one table in the already existing Derby by but table is creating successfully but unable to insert the record. What happens when you try to insert the record? Do you get an exception? What does the exception say? Here's how to read the exception information:

Re: Is there some way to shut down a Derby database faster?

2013-07-04 Thread Bryan Pendleton
Exiting the VM isn't really an option for me anyway, this is just when someone is closing the database, potentially planning to open another one. Another question along the same lines then - if I kick off the shutdown in another thread, what happens if the same database is then reopened while

Re: Create new schema with tables of existing schema.

2013-07-13 Thread Bryan Pendleton
I need script to create new schema app2 with the exact replica of app1 schema Have you investigated dblook? http://db.apache.org/derby/docs/10.10/tools/ctoolsdblook.html thanks, bryan

Re: Performance Improvement on Aggregate Functions using histogram stats

2013-08-22 Thread Bryan Pendleton
On 8/22/2013 1:31 AM, Ayesha Dissanayaka wrote: I am a newbie to derby and I would like to try out improve performances of aggregate functions Hi, and welcome to Derby! In the area of improvements to aggregate functions in Derby, you could consider working on the implementation of window

Re: Problem with Class.forName

2013-08-24 Thread Bryan Pendleton
CLASSPATH: .;C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip;C:\Program Files\Java\jdk1.7.0_25\db\lib;C:\Program Files\Java\jdk1.7.0_25\bin;C:\Program Files\Java\jre7\bin Don't name the *directories* here, name the actual *jar files*. As in: set CLASSPATH=C:\Program Files

Re: Problem with Class.forName

2013-08-24 Thread Bryan Pendleton
C:\Users\Docecho %CLASSPATH% .;C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip;C:\Program Files\Java\jdk1.7.0_25\db\lib\derbyrun.jar;C:\Program Files\Java\jdk1.7.0_25\bin;C:\Program Files\Java\jre7\bin;C:\Program Files\Java\jdk1.7.0_25\db\lib\derbyclient.jar After making the changes and

Re: Problem with Class.forName

2013-08-24 Thread Bryan Pendleton
C:\Users\Docjava org.apache.derby.tools.sysinfo - Derby Information JRE - JDBC: Java SE 7 - JDBC 4.0 [C:\Program Files\Java\jdk1.7.0_25\db\lib\derby.jar] 10.8.2.2 - (1181258) [C:\Program Files\Java\jdk1.7.0_25\db\lib\derbytools.jar] 10.8.2.2 - (1181258) [C:\Program

Re: Problem with Class.forName

2013-08-24 Thread Bryan Pendleton
Here's the output: java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver Hmmm... It sure seems like a classpath problem, but you can find the class when you run simple utilities like ij or sysinfo. Perhaps the classpath that your application is running with is somehow

Re: database connectivity error

2013-09-13 Thread Bryan Pendleton
C:\Users\HeartBeat\Desktopjava org.apache.derby.tools.sysinfo - Derby Information [C:\Users\HeartBeat\Desktop\Derby\lib\derby.jar] 10.10.1.1 - (1458268) [C:\Users\HeartBeat\Desktop\Derby\lib\derbytools.jar] 10.10.1.1 - (1458268)

Re: Thread-safe shutdown while other threads might try to reopen

2013-10-01 Thread Bryan Pendleton
I know I can just slap a synchronized block around these two methods to make it bulletproof, but there are two problems with this: (1) synchronized is slow and Derby's shutdown is not fast at all... (2) I don't know what other apps might be open in the same JVM at the same. I'm not sure

Re: Bug - Endless loop in get sequece value

2013-10-11 Thread Bryan Pendleton
2013-10-11 07:33:05,767 [main ] DEBUG factory.support.DefaultListableBeanFactoryReturning cached instance of singleton bean 'org.springframework.transaction.interceptor.TransactionInterceptor#0' 2013-10-11 07:33:05,907 [main ] DEBUG org.hibernate.SQLvalues next value for SEQ_USER 2013-10-11

Re: selecting records in a derby database

2013-10-20 Thread Bryan Pendleton
rs = s.executeQuery(SELECT COUNT(*) FROM TABLE_NAME); int recordCount = ??; The query returned a result set. Call next() on the result set to move to the first (and only) row in the result set. Then you can call getInt() to get the integer value of the first (and only) column in that row.

Re: selecting records in a derby database

2013-10-20 Thread Bryan Pendleton
int recordCount = rs.getInt(); I get compilation error on last line The method getInt(int) in the type ResultSet in not applicable for the arguments () Indeed, you have to specify the columnIndex. http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html#getInt(int) Specify getInt( 1

Re: Commiting several operations

2013-12-01 Thread Bryan Pendleton
On 12/1/2013 3:44 PM, Bob M wrote: I am wishing to commit several add, delete, update operations, I'm not sure what your question is. Are you asking about Connection.commit()? See: http://docs.oracle.com/javase/7/docs/api/java/sql/Connection.html#commit() If you're unsure how to use

Re: Commiting several operations

2013-12-02 Thread Bryan Pendleton
In my code I am expecting to add a new record and delete the oldest record each time the process is run However the results I get are :- I generally find these sorts of problems easiest to work out by using an interactive SQL tool like Derby's IJ or the SquirrelSQL tool. Another useful skill

Re: Problem updating a record

2013-12-02 Thread Bryan Pendleton
// Update this record by adding predicted return and predicted class psUpdate = conn.prepareStatement(UPDATE USD_JPY SET Return_predicted=?,Class_predicted=?); statements.add(psUpdate); psUpdate.setDouble(1, return_current); psUpdate.setString(2, class_current); conn.commit(); However, the

Re: Problem retrieving the 'oldest' record

2013-12-02 Thread Bryan Pendleton
It would appear that my so-called 'date' field is not a good field to have in a primary key! You can have just about any datatype in your primary key. The only hard requirement is that the primary key must be unique. Using existing fields from your record which uniquely identify your data is

Re: JDK 8 and setObject

2014-01-02 Thread Bryan Pendleton
java.sql.SQLDataException: An attempt was made to get a data value of type 'DATE' from a data value of type 'java.time.LocalDate'. According to http://download.java.net/jdk8/docs/api/java/sql/Date.html http://download.java.net/jdk8/docs/api/java/util/Date.html and

Re: slow query? (from a practical newbie)

2014-01-05 Thread Bryan Pendleton
Ostensibly the where clause really slow does the query. How come and how do I remedy? Here's a good place to start: http://wiki.apache.org/db-derby/PerformanceDiagnosisTips thanks, bryan

Re: slow query? (from a practical newbie)

2014-01-06 Thread Bryan Pendleton
select a.* from (select * from ducc.job order by stateIndex asc, id desc) a where id 117000 Why is this query written like this, as opposed to, say: select * from ducc.job order by stateIndex asc, id desc where id 117000 Do you get a different query plan / run time if you use a

Re: slow query? (from a practical newbie)

2014-01-07 Thread Bryan Pendleton
So I tried: ij select * from ducc.Job where id 117000 order by stateIndex asc, id desc; You're right; the ORDER BY has to be the final clause, not before the WHERE. Thanks for correcting that. And I see this query plan: OK, I'm afraid I've forgotten the overall context. This query plan

Re: slow query? (from a practical newbie)

2014-01-07 Thread Bryan Pendleton
On 1/7/2014 12:52 PM, degenaro wrote: Bryan Pendleton-3 wrote Are the queries that we're discussing here running slowly for you? Yes, very slow. With about 50,000 rows the query takes about 30 seconds give or take. But if I remove the where clause, the time is sub second. Wow, that's

Re: Can I run derby for a long time?

2014-01-10 Thread Bryan Pendleton
Can I run derby for a long time with many inserts, deletes and updates? Are the memories, disk spaces recovered after deletion/updating? I have run Derby as the primary database for a mid-size Build Automation application. The application ran 24 hours/day, 7 days/week, querying and updating

Re: Creating tables - migrating from MySQL.

2014-01-21 Thread Bryan Pendleton
I'm trying to migrate a system (72 tables) from MySQL to Apache. Have you considered using ddlutils: http://db.apache.org/ddlutils/ thanks, bryan

Re: How know databases connected with Derby networkServer

2014-01-24 Thread Bryan Pendleton
How do I know databases connected at a given moment ? In order to : - Have knowledge of potential users connected to each connected dataBase - Shutdown these databases in order to remove them without shutDown derby. You didn't say what platform you are on, but one simple way is to use a tool

Re: Configuring a Server Policy for Derby on Windows

2014-02-01 Thread Bryan Pendleton
On 1/31/2014 8:43 AM, John I. Moore, Jr. wrote: One final point of clarification to my original email: John, thanks for sharing all your findings, and thanks all of you for the pointers to detailed information. I've tried to collect it all at:

Re: How to log queries in Apache Derby?

2014-02-02 Thread Bryan Pendleton
I launch derby by issuing the command (from $DERBY_HOME) It's always been a bit of a trick to figure out which directory the Network Server is trying to read your properties from. Does it work if you do: java -jar $DERBY_HOME/lib/derbyrun.jar -Dderby.language.logStatementText=true server

Re: Number of connection to an embedded derby database

2014-02-19 Thread Bryan Pendleton
I have used *EmbeddedConnectionPoolDataSource *class for connection pooling and I just want to check if my connection are actually being pooled. You could attach a memory debugger, like the Eclipse Heap Analysis Tool, and look at the histogram of classes, and look at the number of instances of

Re: Apache Derby Command Line?

2014-02-21 Thread Bryan Pendleton
My command line is: -jar derby.jar %DERBY_OPTS% -classpath %DERBY_RUNPATH% org.apache.derby.drda.NetworkServerControl start Is it a typo? It looks like you are missing the word java at the start of your command line. thanks, bryan

Re: Apache Derby Command Line?

2014-02-22 Thread Bryan Pendleton
FireDaemon loads the process a little differently than the command line but it works because other java applications ive run as services run fine 1) What, precisely, does FireDaemon do differently, and 2) What, precisely, goes wrong when you try to run Derby? I.e., do you get an error message?

Re: Connect to derby database on raspberry pi

2014-02-27 Thread Bryan Pendleton
that the database server runs under port 1527. But I can´t get a connection to the database from my windows 7 PC. I checked my firewall (comodo) and opened the port 1527. The database server does run on port 1527 (by default), but you have to start that server yourself.

Re: deleting a corrupted database with invalid checksum on page

2014-03-10 Thread Bryan Pendleton
What can I do to just delete this table and then rebuild it from the Mirror file? Can you use RENAME TABLE? Then you can create your new table with the old name, and just leave that old, damaged table around. Of course, you'll want to arrange a more long-term solution, but that might get you

Re: Derby DB suddenly can't open

2014-05-15 Thread Bryan Pendleton
On 5/14/2014 2:38 AM, wrote: I am use 10.8.2.x for more than 2 years, and it works well till today. Suddenly I can't open it Do you have the complete exception stack? http://wiki.apache.org/db-derby/UnwindExceptionChain thanks, bryan

Re: Apache Derby - Locks up.

2014-06-05 Thread Bryan Pendleton
java.lang.OutOfMemoryError: Java heap space Have you experimented with giving more memory to your JVM? thanks, bryan

Re: Apache Derby - Locks up.

2014-06-05 Thread Bryan Pendleton
It's interesting that you are trying to set it to use 6 G, and yet in your other message there was the line: Total Memory : 1756889088 Free Memory : 306272128 which seems to indicate that it's only using 1.7 GB. Like maybe you're running a 32 bit JVM, not a 64 bit JVM, somehow? bryan

Re: Database hanging after Heap space error

2014-07-19 Thread Bryan Pendleton
What is in 'derby.log' when you try to restart Derby? thanks, bryan

<    1   2   3   4   5   6   >