Re: Database shutdown not releasing file locks
I tried the same scenario you mentioned and I'm able to delete the database without any problem? Are you deleting manually or through any pgm? -Manjula On 10/3/07, EdS [EMAIL PROTECTED] wrote: I run into an issue where i dynamically create databases to cache data. At some point when I no longer need the cache, I perform a shutdown and delete the directory where the database resides. Unfortunately there's still open file references to one of the c*.dat files that prevents me from getting a clean filesystem delete. Anyone else seen this behavior, or is it a known bug? My searches so far have proved fruitless. tia, Ed -- View this message in context: http://www.nabble.com/Database-shutdown-not-releasing-file-locks-tf4564520.html#a13028425 Sent from the Apache Derby Users mailing list archive at Nabble.com. -- Thanks, Manjula.
Re: ipv6 and Network Server hostname
Hi Dave, While doing some testing on the Ipv6 machines, I started the server as java org.apache.derby.drda.NetworkServerControl start -h 2002:92a:8f7a:13:9:42:74:19 So instead of giving 0.0.0.0 I gave the full IP address. Did the same for the localhost also. Hope I answered your question. If you need any more information regarding derby on IPv6 please let me know. Thanks, Manjula. On 9/6/07, Dave Been [EMAIL PROTECTED] wrote: for IPv4 we listen on host 0.0.0.0 in case a machine has multiple NIC cards, so we accept connections from all NICs. (I believe this was for windows only. is that correct?) Is there an equivelent ip for IPv6? thanks Dave Been -- Thanks, Manjula.
Re: Embedded or Network Framework?
Hi Teja, Based on your description , I think Network Server will be the best solution. I have a java/jsp application which uses Derby and then I'm using a webserver to get the tables/ and rows and I use the networkserver for that application and it works like a charm. Hope this helps you Regards, Manjula On 8/9/07, Teja Palla [EMAIL PROTECTED] wrote: I am new to Derby and unable to figure out which framework suits my situation: Embedded or NetworkServer framework. I have a java application (which is a media server, sort of like flash media server, but written all in java), for which I wish to use derby as its database. The app will have say stuff like channels and channel schedules etc... very small database, just one database. Now, on the same machine in the java application I also embed (load) a servlet container (winstone: http://winstone.sourceforge.net/). Later on, I develop web applications where say users can look at the available channels and schedules.. (so the web app needs database interaction). So my question is, what framework needs to be used? will embedded framework suffice because I see only one JVM here? Please advise.. -- Thanks, Manjula.
Re: Strange exception during simple insert statement
Hi John, You can find some information regarding the locking issue here http://db.apache.org/derby/faq.html#debug_lock_timeout If you still have questions, please let me know Thanks Manjula On 7/31/07, John C. Turnbull [EMAIL PROTECTED] wrote: I have been getting some spurious exceptions in a 10.2.2.0 embedded database namely: State = 40XL1, Message = A lock could not be obtained within the time requested, Code = 3000 during a simple insert statement like INSERT INTO TableA(id, name, createTime) VALUES (1, 'Name', CURRENT TIMESTAMP) where id is an int, name is a varchar and createTime is a timestamp. It has only happened twice and the problems went away by themselves after restarting the database three times but I am concerned that they will come back. Can anyone suggest why these might be happening and what to do about them? The Derby reference manual doesn't shed any more light on this exception unfortunately. And loving it, John C. Turnbull -- Thanks, Manjula.
Re: Problem with create table in Derby 10.2.2.0
Hi Leo, Also I think following will be a better createString, I wonder why you didn''t get any error for generate'. Also please don't use 'Table' as table name. I got error for that also. And KEY_ID can not have any null values, since you are making it unique it should be declared as not null. My suggestion for the createString is as follows create table Table1 (SAMPLE_ID int not null generated always as identity,KEY _ID bigint not null,KEY_INST_COUNT int, DATAOBJ blob (102400), unique(KEY_ID)); On 2/9/07, Mamta Satoor [EMAIL PROTECTED] wrote: Leo, You need to use BIGINT rather than long for KEY_ID column. Mamta On 2/9/07, Leo Alberto [EMAIL PROTECTED] wrote: Hy I'm try to using Derby 10.2.2.0http://db.apache.org/derby/releases/release-10.2.2.0.cgi in embedded mode with the integrated plug-in environment in Eclipse 3.2.0. Environment jre 1.6.0 I would create a table with this code : *public* *boolean* tableCreation(Connection currentConn, String Table) *throws* DatabaseDriverException { *boolean* doCreateTable = *true*; Statement stmt = *null*; String createString = create table + Table + (SAMPLE_ID int not null generate always as increment, + KEY_ID long, + KEY_INST_COUNT int, + DATAOBJ blob (102400), + unique(KEY_ID)); *try* { currentConn.setAutoCommit (*false*); stmt = currentConn.createStatement(); DatabaseMetaData md = currentConn.getMetaData(); ResultSet rs = md.getTables(*null*, *null*, %, * null*); *while* (rs.next()) { System.*out* .println(Elenco tabelle nel db + rs.getString(3)); *if* (rs.getString(3).equals(tabella)) { doCreateTable = *false*; *break*; } } *if* (doCreateTable) { // execute stmt. execute(createString); // *I'm arriving here ang got the error* doCreateTable = *true*; } currentConn.commit(); stmt.close(); } *catch* (SQLException e) { *throw* *new* DatabaseDriverException(Error create table, e); } *return* doCreateTable; }/* End tableCreation */ the error is: Syntax error: Encountered , at line 1, column 88. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source) at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)Error create table at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source) at dds.dbdrivers.DerbyDriver.tableCreation(* DerbyDriver.java:257 *) at provaDB.main(*provaDB.java:39 *) Caused by: *java.sql.SQLException* : Syntax error: Encountered , at line 1, column 88. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) ... 10 more from errorlog.txt generated: 2007-02-09 17:31:01.452 GMT: Booting Derby version The Apache Software Foundation - Apache Derby - 10.2.2.0 - (485682): instance c013800d-0110-a78e-d8b1-a2db3c51 on database directory C:\DdsAppDb\DbDOMAIN_(7) Database Class Loader started - derby.database.classpath='' 2007-02-09 17:31:10.786 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = DbDOMAIN_(7)), (DRDAID = null), Cleanup action starting 2007-02-09 17:31:10.786 GMT Thread[main,5,main] (XID = 122), (SESSIONID = 0), (DATABASE = DbDOMAIN_(7)), (DRDAID = null), Failed Statement is: my add 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 create table POSITION (SAMPLE_ID int not null generated always as identity, KEY_ID long, KEY_INST_COUNT int, DATAOBJ blob (102400), unique(KEY_ID)) ERROR 42X01: Syntax error: Encountered , at line 1, column 88. at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source) at
Re: Specifying the Derby Database Location
Correction : You can not set the derby.system.home in the derby.properties file.You should always explicitly set the value of derby.system.home Thanks Manjula On 2/1/06, Manjula G Kutty [EMAIL PROTECTED] wrote: Afkham Azeez wrote:Hi Folks,I have my derby.properties file in $MY_PROJECT/conf directory. This is the directory pointed to by the derby.system.home System property. Butno my database is getting created under $MY_PROJECT/conf e.g. as$MY_PROJECT/conf/DATABASE.I need my database to be created as $MY_PROJECT/DATABASE. Is there a property I can specify in the derby.properties file which will specifythe physical location of the Database?--Thanks in AdvanceAfkham AzeezHi,If you specify derby.system.home in your derby.properties file, thenyour database will be created in the directory specified by thederby.system.home. One way to create the database in another directoryother than the derby.system.home is to specify the location in thejdbcurl. Likeij connect 'jdbc:derby:yourlocation/dbname;create=true'.You can refer the derby tuning guide for further reference forderby.system.home propertyhttp://db.apache.org/derby/docs/10.1/tuning/rtunproper32066.htmlThanks,Manjula
Re: Removing Derby tagline
yes..I also agree to remove the tagline --Manjula On 1/25/06, David W. Van Couvering [EMAIL PROTECTED] wrote: We are trying to finalize the work on the Derby logo and getting thisposted to the web site and other places.The one issue still open is the tagline.We all voted +1 for the images that had the tagline PureJava Database.It's likely that Sun has no issues with using the tagline, but it'staking some time to get this clarified.In the meantime publishing the logo onto our site is being held back.I wanted to see what you all felt about removing the tagline, at leastfor now.We may in the future (potentially the near future if we getfinal clarification from Sun) have a vote to add a tagline (maybe accept submissions just like for the logo itself), but I wanted to know ifthere were any objections to just removing it for now.Thanks,David