Re: Newbie question: jdbc:/localhost/dbname doesn't work

2008-02-13 Thread Kristian Waagan
Banibrata Dutta wrote: Hi, Hello, I'm trying to give some helpful information below. I am trying to use Derby (infact from the JavaDB package), on WinXP. I have run the Network Server, using the script (batch file) in one window. In another window, I am using ij. While I can connect to

Re: Methods for upgrading database and application

2008-02-13 Thread Kristian Waagan
Hello Brad, I don't have a good solution for you, but a few suggestions. Is checking if there are any active transactions good enough? This can by done by querying syscs_diag.transaction_table. If there are no transactions, can you freeze the database (stops updates, not selects I believe) or

Re: Newbie question: jdbc:/localhost/dbname doesn't work

2008-02-13 Thread Banibrata Dutta
Hi Kristian: Your counter-questions were enough to point me in the right direction. Indeed, it wasn't clear to my in my first read that ij was itself acting as the application using Embedded-server, when the original DB URL didn't contain a hostname:port! I had not really tweaked anything

Using derby as a chat server

2008-02-13 Thread musky
i want to use derby as a chat server, my idea is to insert whatever a user types into a table in the database.This table can have two fields UserID and the message(VARCHAR).how do i convey the inserted message to the other party?? please help. thanks. -- View this message in context:

Re: Using derby as a chat server

2008-02-13 Thread Donald McLean
You might also want to have a messageID and maybe a messageTimestamp. If everyone is connecting directly to the database server then you're just going to have to do a select periodically to see if anyone posted anything new. I don't know what kind of connection limits a database server has, but

Re: Using derby as a chat server

2008-02-13 Thread musky
also i dont want to use any sockets. all the chat clients connect to the database server. musky wrote: i want to use derby as a chat server, my idea is to insert whatever a user types into a table in the database.This table can have two fields UserID and the message(VARCHAR).how do i

RE: Methods for upgrading database and application

2008-02-13 Thread Brad Moore
Hi Kristian, Thanks for your suggestions. Checking for active transactions won't do what I need. The reason is this: if User A has our application open but they are not currently doing any updates to the database and User B starts the upgrade process the upgrade could do something like

Re: Using derby as a chat server

2008-02-13 Thread Kurt Huwig
Forget about Derby for chat and have a look at JMS. This is a good implementation: http://joram.objectweb.org/ Am Mittwoch, 13. Februar 2008 schrieb musky: also i dont want to use any sockets. all the chat clients connect to the database server. musky wrote: i want to use derby as a chat

column number mismatch error

2008-02-13 Thread Amir Michail
Hi, What does this error mean? ERROR XSCH5: In a base table there was a mismatch between the requested column number 9 and the maximum number of columns 10. This happens when I tried to add a reference to a primary key. Amir

RE: NullPointerException in Derby driver (from at least 10.2.2.0)

2008-02-13 Thread Jim Newsham
I have been seeing this same problem (very) intermittently as well... just have been way too busy with other things at the time to look into it. When it occurs, I generally see a NullPointerException on commit, and subsequent usage of the (statement? connection? data source? not sure exactly)

RE: NullPointerException in Derby driver (from at least 10.2.2.0)

2008-02-13 Thread Jim Newsham
Thanks for the advice Eric. It seems from DERBY-151 that calling Thread.interrupted() before calling commit() is a reasonable workaround until the problem is fixed. Is this your assessment? Might also be desirable to save the result and re-interrupt afterwards if interrupt status must be

Re: Using derby as a chat server

2008-02-13 Thread Suavi Ali Demir
Have a table where you have 1 row that marks the relationship between two clients. Like a cartesian product: A, B A, C A, D B, A B, C B, D ..and so on. Have all clients have their dedicated connection acquire locks on these rows. Each lock represents a client that may

RE: NullPointerException in Derby driver (from at least 10.2.2.0)

2008-02-13 Thread Eric Floehr
Jim, That's definitely what we are seeing, and our only option was to restart the app as well. You should really check the interrupt, because it wasn't so much that InterruptedException was thrown at your code in the thread for us. What was happening is the interrupt flag was getting set down

RE: NullPointerException in Derby driver (from at least 10.2.2.0)

2008-02-13 Thread Eric Floehr
Jim, Yes, I would say that is a reasonable work-around. In our case, we built the networking code, so we saw where the interrupt was being handled but the flag not reset, so we were able to fix it at the source. But barring that, resetting it prior to a derby write/commit should work. Regards,

Re: java.lang.OutOfMemoryError

2008-02-13 Thread Suavi Ali Demir
How much memory do you give to your JVM? Ali John English [EMAIL PROTECTED] wrote: I have a table containing about 22000 records defined as follows: CREATE TABLE system_log ( id INTEGER GENERATED ALWAYS AS IDENTITY, time TIMESTAMP DEFAULT NULL, username VARCHAR(15), facility VARCHAR(15) NOT

java.lang.OutOfMemoryError

2008-02-13 Thread John English
I have a table containing about 22000 records defined as follows: CREATE TABLE system_log ( id INTEGER GENERATED ALWAYS AS IDENTITY, timeTIMESTAMP DEFAULT NULL, usernameVARCHAR(15), facilityVARCHAR(15) NOT NULL, event VARCHAR(31) NOT NULL,

Re: java.lang.OutOfMemoryError

2008-02-13 Thread Tim Halloran
Is this in a program? What does the JDBC code look like? You can try increasing its memory using -Xmx1200m or some such to the JVM. Do not catch Throwable, this pretty much never a good idea. What could you do? Tim On Feb 13, 2008 5:48 PM, John English [EMAIL PROTECTED] wrote: I have a

Re: Derby Transaction Log Shipping

2008-02-13 Thread Duncan Groenewald
Thanks for that explanation - it pretty much confirms what I expected - which was that booting the secondary means that things get changed and that logs can no longer be loaded. Duncan On 08/02/2008, at 11:33 PM, Jørgen Løland wrote: Hi Duncan, First of all, the scenario you describe

Re: column number mismatch error

2008-02-13 Thread Amir Michail
On Feb 13, 2008 3:51 PM, Amir Michail [EMAIL PROTECTED] wrote: Hi, What does this error mean? ERROR XSCH5: In a base table there was a mismatch between the requested column number 9 and the maximum number of columns 10. This happens when I tried to add a reference to a primary key. Do

Re: Using derby as a chat server

2008-02-13 Thread musky
then how do i have a thread periodically select the latest message from the table? should i use a timer or something please help. Donald McLean-3 wrote: You might also want to have a messageID and maybe a messageTimestamp. If everyone is connecting directly to the database server then

Re: Get auto increment value

2008-02-13 Thread Peter Yuill
I think my previous post might have been misleading. The code below is only getting the int value of the RETURN_GENERATED_KEYS constant. s.execute(INSERT INTO + testTable1 + (NAME) VALUES('xyz')); int keyVal = Statement.RETURN_GENERATED_KEYS;

Re: Using derby as a chat server

2008-02-13 Thread Donald McLean
Yes, you would use a timer. You'll have to experiment with the timing (too often and it thrashes). You would select any message newer than the last message that was retrieved. On Feb 13, 2008 7:49 PM, musky [EMAIL PROTECTED] wrote: then how do i have a thread periodically select the latest

Re: column number mismatch error

2008-02-13 Thread Amir Michail
On Feb 13, 2008 7:13 PM, Amir Michail [EMAIL PROTECTED] wrote: On Feb 13, 2008 3:51 PM, Amir Michail [EMAIL PROTECTED] wrote: Hi, What does this error mean? ERROR XSCH5: In a base table there was a mismatch between the requested column number 9 and the maximum number of columns 10.

Re: UPDATE TRIGGER - ERROR 42Y92: STATEMENT triggers may only reference table transition variables/tables.

2008-02-13 Thread bruehlicke
... OK - my mistake - UPDATE is a row trigger and since I did not have a FOR EACH ROW it will be a statement trigger by default. Adding FOR EACH ROW did the trick : I.e. s.execute(CREATE TRIGGER A_TRIGGER AFTER UPDATE OF NAME, REMARK ON + testTable1 + REFERENCING OLD AS UPDATEDROW

Re: Using derby as a chat server

2008-02-13 Thread Francois Orsini
On Wed, Feb 13, 2008 at 7:18 AM, Kurt Huwig [EMAIL PROTECTED] wrote: Forget about Derby for chat and have a look at JMS. This is a good implementation: http://joram.objectweb.org/ You can't compare Derby with JORAM. In a particular application such as a chat server, Derby would be used to

UPDATE TRIGGER - ERROR 42Y92: STATEMENT triggers may only reference table transition variables/tables.

2008-02-13 Thread bruehlicke
OK new to this and I have tried quite a lot of permutations but cannot get it work. The following gives ERROR 42Y92: STATEMENT triggers may only reference table transition variables/tables. Any idea what is wrong in my TRIGGER creation ? String testTable1 = A; Statement s =