FYI: ApacheCon NA 2015 travel assistance.
Dear all, There will be an ApacheCon North America, in Austin, TX, April 13-17, 2015. For more information see: http://apachecon.com/ and http://events.linuxfoundation.org/events/apachecon-north-america The Call for Papers closes Sunday, 1 February 2015. There is travel assistance available subject to the usual rules, see: http://www.apache.org/travel/ The closing date for travel assistance applications is Friday, 6 February 2015. Regards, Myrna van Lunteren (Apache DB Project chair)
Re: Urgent question about JIra issue DERBY-526
Hi, I posted a reply to your comment in DERBY-526 as well - no, unfortunately, nothing further has happened on that issue so the problem still exists. The workaround is still to use the hostname. Myrna On Wed, Dec 3, 2014 at 12:09 AM, Lin Ren lin@oracle.com wrote: Hi Guys, Sorry for the broadcast… I have a quick question about issue DERBY-526, I’m currently using Derby version 10.10.1.3, and still meet the same problem: When I using IPv6 JDBC URL like: “jdbc:derby://2001:db8:0:f101:0:0:0:9:1527/xxx;create=true;user=xxx;password=xxx” I got the exception: java.lang.NumberFormatException: For input string: db8:0:f101:0:0:0:9:1527 My searched Jira and found out the issue 526, but seems it is still in open state, can anyone tell me whether the issue is fixed now? And in which version if yes? Thanks so much! Lin
Re: Another error to be explained
Hi Bob, The Derby program relies on files that make up a Derby database to get created in a certain way, and for those files to remain untouched by other programs or actions. It seems something has interfered with your database. We have no way of telling what that is/was - only you can do this by diligently checking your system and your application. Did you recently change the funcionality? Did your system experience any kind of malfunction? (check the windows event logs). I can think of programs such as encryption tools, security programs, or manual efforts (accidental or not) that could mess with file permissions/ownership (which is what the error message seems to suggest). One thing you can do, is check on the permissions of each file. You can look up how to do this by a search for your OS in your favorite search engine. Judging by the c:/ reference you are on some MS-Windows OS. If you have a shell tool like cygwin you could do 'ls -al'. Otherwise, the only way I know is to check on each file using windows explorer - checking on 'properties' for each file and opening the 'security' tab. Perhaps your search engine finds a more efficient way. You're looking to compare the file ownership and permissions. They should all be the same for all the .dat files. Another check you can do is the consistency check ( http://wiki.apache.org/db-derby/DatabaseConsistencyCheck). Although I suspect this will pop the same file. For more information about corrupted databases, see: https://wiki.apache.org/db-derby/DatabaseCorruption. HTH, Myrna On Mon, Sep 22, 2014 at 1:23 PM, Bob M rgmatth...@orcon.net.nz wrote: Hi Peter Permission or attributes - maybe. Could you spell out how I check these? What puzzles me is that I did have my application working at an earlier stage and I am having difficulty understanding why I am now getting a series of error messages Bob M -- View this message in context: http://apache-database.10148.n7.nabble.com/Another-error-to-be-explained-tp142334p142340.html Sent from the Apache Derby Users mailing list archive at Nabble.com.
Re: Boot derby with missing containers, ERROR 40XD2
Hi, I suspect you're out of luck, but have a look at this page, perhaps there's something you can salvage... https://wiki.apache.org/db-derby/DatabaseCorruption Myrna On Thu, Sep 11, 2014 at 4:14 PM, jamsterdam marmala...@gmail.com wrote: Hi all, I accidentally deleted a few of the disk pages files in /seg0 and now I get the following error when trying to start the database: ERROR 40XD2: Container Container(0, 560) cannot be opened; it either has been dropped or does not exist. Is there a way to force boot the database even though the data may be inconsistent? I don't think the data was backed up ever before, or at least I cannot find where it could have been backed up. Any suggestions? -- View this message in context: http://apache-database.10148.n7.nabble.com/Boot-derby-with-missing-containers-ERROR-40XD2-tp142077.html Sent from the Apache Derby Users mailing list archive at Nabble.com.
Feedback on documentation Getting started with Java DB
another lost moderated message - from July 21 -- From: Mathias Trapp mathias.tr...@gmx.de To: derby-user@db.apache.org Cc: Date: Mon, 21 Jul 2014 07:12:15 +0200 Subject: Feedback on documentation Getting started with Java DB Hi derby team, I am just examining the JDK 1.7.0.65 and it's Java DB implementation. In the document Getting started with Java DB on page 23 I found the placeholder @MIMIMUM_JDK@ which - IMHO - should be replaced by the actual minimum version number. Best wishes, Mathias Trapp Nuremberg, Germany
How to get Derby folder size from remote Server?
This message was stuck in moderation also; my attempt to moderate it through failed. --- From: Nguyen Hai Dong dong...@yahoo.com To: derby-user@db.apache.org Cc: Date: Mon, 21 Jul 2014 00:26:59 -0700 (PDT) Subject: How to get Derby folder size from remote Server? Hi, My java application and Database is running in different servers. How can i get whole *database folder size* in java program. Thanks.
10.11.1 release candidate delayed
I found this message stuck in moderation and my attempt to moderate it through failed. George, Looks like the 10.11 release is really close. There were some delays because of vacation times and the testing exposed some bugs that had to be fixed first. The Release Manager set the new Target Release date for August 29. Myrna --- From: spykee toma.georg...@yahoo.com To: derby-...@db.apache.org Cc: Date: Tue, 5 Aug 2014 10:21:43 -0700 (PDT) Subject: Re: 10.11.1 release candidate delayed Hi folks, Any news with the release ? Cheers, George
missed moderated message
Hi, I noticed there were a few moderated messages that I do not think made it to the list. I tried to moderate it through, but that failed - perhaps it's too long ago... Here's one from July 3... Myrna - From: china_wang 2596121...@qq.com To: derby-user@db.apache.org Cc: Date: Thu, 3 Jul 2014 02:36:09 -0700 (PDT) Subject: I can not get output parameter values from procedure hi,all: my procedure code is follow: * create procedure app.getUserName(out userName list) parameter style java reads sql data language java external name 'tool.ProcedureClass.getUserName'; Output parameters type-- 'list' is user-defined type,Defined as follows: CREATE TYPE list EXTERNAL NAME 'java.util.List' LANGUAGE JAVA *** tool.ProcedureClass.getUserName code is public static void getUserName(List[] list) { Connection connection =null; PreparedStatement p=null; ResultSet rs =null; try { list=new ArrayList[1]; list[0]=new ArrayList(); connection = DriverManager.getConnection(jdbc:default:connection); p = connection.prepareStatement( select name from pub_user ); rs = p.executeQuery(); while (rs.next()) { list[0].add(rs.getString(1));// I can get value of rs.getString(1) } } catch (Exception e) { e.printStackTrace(); } finally { try { rs.close(); p.close(); connection.close(); } catch (Exception e2) { } } } *** i call procedure by follow code: public String getDataSet(String dsId,String dtId)throws Exception { String driver = org.apache.derby.jdbc.EmbeddedDriver; String url = jdbc:derby:metabase;create=true; try { Class.forName(driver); Connection connection = DriverManager.getConnection(url); CallableStatement cs = connection.prepareCall(CALL APP.getUserName(?)); cs.registerOutParameter(1, Types.JAVA_OBJECT); cs.execute(); //String retVal=cs.getString(3); cs.getObject(1); // value is null by debug's inspect fucntion return ; } catch(Exception e) { e.printStackTrace(); throw e; } } i don't know why cs.getObject(1) return null? Thanks a lot in advance china_wang --
Re: Difference
Hi, 10.10.2.0 has all the *new* functionality of 10.9.1.0 and 10.10.1.0. Plus it has more bug fixes than 10.8.3.0, both because the 10.10 branch was pulled from trunk at a later time and because 10.10.2.0 was released later and thus even more fixes were back-ported. It therefore also has more possible incompatibilities to older versions. 10.8.3.0 only has the most important fixes available at the time of release back-ported, and has very few incompatibilities compared to e.g. 10.8.2. There were some plans to make a 10.9.2 at one time but that fell by the wayside. It would have replaced the 10.8.3.0. Myrna On Thu, Jul 31, 2014 at 5:41 AM, Rick Hillegas rick.hille...@oracle.com wrote: On 7/31/14 4:07 AM, Peter Ondruška wrote: Dear all, what is the difference between version 10.10.2.0 and 10.8.3.0? Or why is there 10.8.3.0 along with 10.10.2.0? Thanks Peter The Latest Official Releases tend to be the latest releases produced on the 2 most active release branches. Once we publish 10.11.1, I expect that we'll remove 10.8.3.0 from that list. Right after we produce a feature release, the list has this meaning: i) The top release is the most feature-rich distribution. ii) The second release is the most stable distribution. Hope this helps, -Rick
Travle Assistance for Apache Con Europe, 2014, 17-21 Nov, Budapest, Hungary
For those interested in Apache Con Europe; The Travel Assistance Committee (TAC) is happy to anounce that we now accept applications for ApacheCon Europe 2014, 17-21 November in Budapest, Hungary Applications are welcome from individuals within the Apache community at-large, users, developers, educators, students, Committers, and Members, who need financial support to attend ApacheCon. Please be aware the seats are very limited, and all applicants will be scored on their individual merit. More information can be found at http://www.apache.org/travel including a link to the online application and detailed instructions for submitting. Applications will close on 25 July 2014 at 23:00 UTC/GMT. On behalf of TAC Regards, Myrna van Lunteren
ApacheCon CFP closes June 25
Dear Apache DDLUtils, Torque, JDO and Derby enthusiasts, As you may be aware, ApacheCon will be held this year in Budapest, on November 17-23. (See http://apachecon.eu for more info.) The Call For Papers for that conference is still open, but will be closing soon. We need you talk proposals, to represent the DB project at ApacheCon. We need all kinds of talks - deep technical talks, hands-on tutorials, introductions for beginners, or case studies about the awesome stuff you're doing with DDLUtils, Torque, JDO and Derby. Please consider submitting a proposal, at http://events.linuxfoundation.org//events/apachecon-europe/program/cfp Thanks! Myrna van Lunteren DB Project chair
Fwd: Travel assistance for ApacheCon EU, Budapest November 17-21 2014
-- Forwarded message -- From: jan i j...@apache.org Date: Thu, Jun 5, 2014 at 4:41 AM Subject: Travel assistance for ApacheCon EU, Budapest November 17-21 2014 To: p...@apache.org The Travel Assistance Committee (TAC) is happy to anounce that we now accept applications for ApacheCon Europe 2014, 17-21 November in Budapest, Hungary Applications are welcome from individuals within the Apache community at-large, users, developers, educators, students, Committers, and Members, who need financial support to attend ApacheCon. Please be aware the seats are very limited, and all applicants will be scored on their individual merit. More information can be found at http://www.apache.org/travel including a link to the online application and detailed instructions for submitting. Applications will close on 25 July 2014 at 23:00 UTC/GMT. Please help spread the word among your community. On behalf of TAC jan I.
[ANNOUNCE] Apache Derby 10.10.2.0 released
The Apache Derby project is pleased to announce maintenance release 10.10.2.0. This is a bug fix release following the 10.10.1.1 release. Apache Derby is a subproject of the Apache DB project. Derby is a pure Java relational database engine which conforms to the ISO/ANSI SQL and JDBC standards. Derby aims to be easy for developers and end-users to work with. Derby 10.10.2.0 can be obtained from the Derby download site: http://db.apache.org/derby/derby_downloads.html. Please consider upgrading earlier 10.10 releases to this maintenance release.
Re: Feedback releases/release-10.10.2.0.html
Thanks for trying John! I can see it now for instance on http://mirror.tcpdiag.net/apache... But I'll wait until tomorrow then with the announcement, giving a few more sites the chance to refresh... Myrna On Wed, Apr 16, 2014 at 2:25 PM, Bower, John jbo...@cas.org wrote: Hi, Derby Folks, It seems the 10.10.2.0 release distributions are not yet available (all the mirrors I've tried return a *404 Not Found*). BTW, thanks for all your great work! Derby is fantastic! -john *Confidentiality Notice*: This electronic message transmission, including any attachment(s), may contain confidential, proprietary, or privileged information from Chemical Abstracts Service (“CAS”), a division of the American Chemical Society (“ACS”). If you have received this transmission in error, be advised that any disclosure, copying, distribution, or use of the contents of this information is strictly prohibited. Please destroy all copies of the message and contact the sender immediately by either replying to this message or calling 614-447-3600.
Re: ERROR XSAI2: The conglomerate (65) requested does not exist.
Perhaps there's something on this page: https://wiki.apache.org/db-derby/DatabaseCorruption HTH Myrna On Fri, Mar 21, 2014 at 5:28 PM, Bert Lamb al...@pobox.com wrote: I have a database that seems to be in a pretty bad state. Is there any graceful way to recover when I am getting conglomerate errors like the one below? This is a 10.8 DB for what it is worth. j select * from sys.sysconglomerates; ERROR XSAI2: The conglomerate (65) requested does not exist. -Bert
Re: SQL State: 40XL1
Hi, You might have a query that runs for a long time. You might be able to speed it up by adding indexes, or you can adjust the timeout properties. Or you might have multiple connections that fight eachother. Read the relevant section in the Derby Developer's Guide on Locking, concurrency, and isolation which explains it better than I can: http://db.apache.org/derby/docs/10.10/devguide/cdevconcepts30291.html There are additional helpful wiki pages and sections in the reference manual: http://wiki.apache.org/db-derby/LockDebugging and 5.4 (currently) of the FAQs describes how you can look into the lock timeouts: http://db.apache.org/derby/faq.html#debug_lock_timeout You might need to set the following properties in a derby.properties file to debug to see the queries (if you don't have one already, you'll need to create it, place it wherever your derby.log file gets created. Remove it or comment it out for production): # append to derby.log over multiple sessions. derby.infolog.append=true # print out all queries to derby.log derby.language.logStatementText=true # print out full text of all error messages, not just the most severe derby.stream.error.logSeverityLevel=0 # print lock table information to derby.log on timeout and for deadlocks derby.infolock.appendderby.locks.monitor=true derby.locks.deadlockTrace=true You can check on the meaning and default values of these properties in the reference guide: http://db.apache.org/derby/docs/10.10/ref/crefproper22250.html In that same place you find information about the properties you can use to adjust the default wait times: - derby.locks.waitTimeout http://db.apache.org/derby/docs/10.10/ref/rrefproper46141.html#rrefproper46141 - derby.locks.deadlockTimeout http://db.apache.org/derby/docs/10.10/ref/rrefproper10607.html#rrefproper10607 Myrna On Tue, Mar 18, 2014 at 1:06 AM, Bob M rgmatth...@orcon.net.nz wrote: Hi I connect to a derby dbase in my java program and get a message to say the connection is made Then, once in a while, I get the following... SQL Exception--- SQL State: 40XL1 Error Code: 3 Message: A lock could not be obtained within the time requested Please can somebody interpret what the problem is ? Do I need to add further debugging code ? I do not understand 'the time requested' can I alter this? Bob M -- View this message in context: http://apache-database.10148.n7.nabble.com/SQL-State-40XL1-tp138053.html Sent from the Apache Derby Users mailing list archive at Nabble.com.
Re: Corrupt database: ArrayIndexOutOfBoundsException on connect
Although Derby has transaction control and a recovery mechanism, if a JVM crashes or gets interrupted, the normal transaction steps might be interrupted in unfortunate places, especially during compress. Was the database shutdown before compress? Do you have a backup? But perhaps there is something of use to you on this page: https://wiki.apache.org/db-derby/DatabaseCorruption HTH Myrna On Mon, Mar 10, 2014 at 4:49 AM, Phil Bradley ph...@tower.ie wrote: Hi, I have a derby database that I am unable to connect to; when I try I get java.lang.ArrayIndexOutOfBoundsException. The full stack trace is shown below. Firstly, some background: - I'm using derby 10.8.2.2 with a Java Webstart application that connects in embedded mode. The clients are using Java 7u45 on Windows 7, 32 bit - The application is configured to run SYSCS_UTIL.SYSCS_COMPRESS_TABLE() every 5 days on each table on startup - The client was running SYSCS_UTIL.SYSCS_COMPRESS_TABLE() on a particular table and based on the application logs, it looks like either the JVM crashed or the application was ended via task manager. - On subsequent attempts to start the application, the client was unable to connect to the database as per the stack trace below. I have made a copy of the database and I get this error reliably on accessing the copy. I have two questions: 1. Is there anything that I can do to recover from this kind of scenario automatically? 2. Is there any debugging or other investigation that I can do that will help reduce the severity of this kind of problem? Thanks, Phil java.sql.SQLException: Failed to start database 'C:\Users\Administrator\.myapp\myapp_db' with class loader com.sun.jnlp.JNLPClassLoader@1bef5e8, see the next exception for details. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.init(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection30.init(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection40.init(Unknown Source) at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source) at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source) at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at com.mycompany.database.DbInitializer.runScript(DbInitializer.java:143) at com.mycompany.myapp.ApplicationRunner.initialiseDb(ApplicationRunner.java:817) at com.mycompany.myapp.ApplicationRunner.startApplication(ApplicationRunner.java:945) at com.mycompany.myapp.ApplicationRunner.run(ApplicationRunner.java:581) at com.mycompany.myapp.ApplicationRunner.main(ApplicationRunner.java:552) at com.mycompany.myapp.ApplicationLoader.main(ApplicationLoader.java:90) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.sun.javaws.Launcher.executeApplication(Unknown Source) at com.sun.javaws.Launcher.executeMainClass(Unknown Source) at com.sun.javaws.Launcher.doLaunchApp(Unknown Source) at com.sun.javaws.Launcher.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.sql.SQLException: Failed to start database 'C:\Users\Administrator\.myapp\myapp_db' with class loader com.sun.jnlp.JNLPClassLoader@1bef5e8, see the next exception for details. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) ... 27 more Caused by: java.sql.SQLException: Java exception: ': java.lang.ArrayIndexOutOfBoundsException'. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source) ... 24 more Caused by:
Re: deleting a corrupted database with invalid checksum on page
Perhaps there is something that can help you on this page: https://wiki.apache.org/db-derby/DatabaseCorruption HTH Myrna On Mon, Mar 10, 2014 at 8:18 AM, EagleS j...@silvereagle.co.uk wrote: I can't do rename table either unfortunately. Whatever query I try to run I get the same error and hex dump. - Reply message - From: Bryan Pendleton-3 [via Apache Database] [hidden email]http://user/SendEmail.jtp?type=nodenode=137791i=0 To: EagleS [hidden email]http://user/SendEmail.jtp?type=nodenode=137791i=1 Subject: deleting a corrupted database with invalid checksum on page Date: Mon, Mar 10, 2014 14:55 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 back on your feet again while you build a more solid overall plan. bryan -- If you reply to this email, your message will be added to the discussion below: http://apache-database.10148.n7.nabble.com/deleting-a-corrupted-database-with-invalid-checksum-on-page-tp137773p137789.html To unsubscribe from deleting a corrupted database with invalid checksum on page, click here. NAMLhttp://apache-database.10148.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: Re: deleting a corrupted database with invalid checksum on pagehttp://apache-database.10148.n7.nabble.com/deleting-a-corrupted-database-with-invalid-checksum-on-page-tp137773p137791.html Sent from the Apache Derby Users mailing list archivehttp://apache-database.10148.n7.nabble.com/Apache-Derby-Users-f95095.htmlat Nabble.com.
Fwd: [REMINDER] ApacheCon NA 2014 Travel Assistance Applications now open!
All, FYI - This a note regarding the upcoming ApacheCon North America 2014. This year, ASF is partnering with the Linux Foundation on this conference, which allows for more tracks than in recent years. Note that the deadline for the Travel Assistance applications is Feb 7 - Friday. For more details, see: http://events.linuxfoundation.org/events/apachecon-north-america Regards, Myrna van Lunteren -- Forwarded message --This is a gentle reminder that Travel Assistance Applications are closing on Friday February 7th 2014. [...] Date: Wed, Jan 15, 2014 at 4:41 PM Subject: ApacheCon NA 2014 Travel Assistance Applications now open! From: travel-assista...@apache.org The Travel Assistance Committee (TAC) are pleased to announce that travel assistance applications for ApacheCon North America 2014 are now open! ApacheConNA will be held in Denver, Colorado, April 7-9, 2014. TAC exists to help those that would like to attend ApacheCon events, but are unable to do so for financial reasons. For more info on this years applications and qualifying criteria please visit the TAC website at http://www.apache.org/travel/ . Applications are already open, so don't delay! *The important date*... - Friday February 7th 2014 - TAC applications close. Applicants have until the the closing date above to submit their applications (which should contain as much supporting material as required to efficiently and accurately process your request), this will enable TAC to announce successful awards shortly afterwards. As usual TAC expects to deal with a range of applications from a diverse range of backgrounds. We therefore encourage (as always) anyone thinking about sending in an application to do so ASAP. We look forward to greeting everyone in Denver, Colorado in April. Kind Regards Lewis (On behalf of the Travel Assistance Committee) -- _ _ _ _ _ ___ _ _ _ _ _ |_ _| |_ ___ | _ |___ ___ ___| |_ ___ | __|___| _| |_ _ _ _ ___ ___ ___ | __|___ _ _ ___ _| |___| |_|_|___ ___ | | | | -_| | | . | .'| _| | -_| |__ | . | _| _| | | | .'| _| -_| | __| . | | | | . | .'| _| | . | | |_| |_|_|___| |__|__| _|__,|___|_|_|___| |_|___|_| |_| |_|__,|_| |___| |__| |___|___|_|_|___|__,|_| |_|___|_|_| |_| http://people.apache.org/~lewismc || @hectorMcSpector || http://www.linkedin.com/in/lmcgibbney Apache Gora V.P || Apache Nutch PMC || Apache Any23 PMC || Apache OODT PMC || Apache TAC
Re: Configuring a Server Policy for Derby on Windows
Hi John, Thanks for the write-up! I'm sorry you had to struggle through the url file: syntax - I did too, and updated DERBY-6438 with my findings. We should probably fix the documentation. Myrna On Thu, Jan 30, 2014 at 6:27 AM, John I. Moore, Jr. softmo...@att.netwrote: I am sending this email to the Derby user list with the hope that I can save someone time and frustration when trying to run the Derby network server on Windows with the latest version of Java (currently 1.7.0_51). With the latest version of Java, it is no longer possible to use the batch file startNetworkServer.bat to start the network server. If you run derby under Linux or some variation of Unix, or if you are already familiar with how to use a server policy file with Derby, you can probably ignore this message. (Note to Derby developers: You might want to add some of the descriptions below to the appropriate pages in the Derby documentation, especially https://db.apache.org/derby/docs/10.4/adminguide/tadminnetservcustom.html .) To run the Derby network server on Windows, you will need to download a copy of the server policy file 1010_server.policy from https://issues.apache.org/jira/browse/DERBY-6438 and edit it for your use or define appropriate system properties when starting the Derby network server. I will give an example for editing the file. When editing the file, replace ${derby.install.url} with the full path name for the Derby jar files in the four sections that start with *grant codebase*. The syntax is a little tricky. For example, assume that derby has been installed in C:\Java\db-derby-10.10.1.1-bin. You use a file: specification, but you need to use forward slashes, not back slashes. Also, the file specification can contain zero, one, or three forward slashes, but not two. Thus, any of the following will work grant codeBase file:C:/Java/db-derby-10.10.1.1-bin/lib/derby.jar grant codeBase file:/C:/Java/db-derby-10.10.1.1-bin/lib/derby.jar grant codeBase file:///C:/Java/db-derby-10.10.1.1-bin/lib/derby.jar but not grant codeBase file://C:/Java/db-derby-10.10.1.1-bin/lib/derby.jar This is an important point since the sample files in the Derby Developer's Guide seem to imply that two slashes are acceptable - see http://db.apache.org/derby/docs/10.10/devguide/cdevcsecure871387.html. If you use two slashes in you file specification, you will get an error message similar to the following: Thu Jan 30 09:09:33 EST 2014 : access denied (java.util.PropertyPermission derby.__serverStartedFromCmdLine write) java.security.AccessControlException: access denied (java.util.PropertyPermission derby.__serverStartedFromCmdLine write) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.System.setProperty(Unknown Source) at org.apache.derby.drda.NetworkServerControl$1.run(Unknown Source) at org.apache.derby.drda.NetworkServerControl$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at org.apache.derby.drda.NetworkServerControl.main(Unknown Source) at org.apache.derby.iapi.tools.run.main(Unknown Source) You also need to replace ${derby.security.port} with the appropriate port number (e.g., 1527). Alternatively, you can define ${derby.security.port} in your call to start the Derby network server, as in -Dderby.security.port=1527. Other policy file parameters can be handled similarly, but these are the most important ones, and these changes are the minimum needed to get the Derby network server started. I saved the policy file in my DERBY_HOME directory as simply server.policy, and I edited only the four grant codebase sections as described above. I can then start the Derby network server using a command similar to the following (which I placed in a batch file): start java -Dderby.system.home=%DERBY_HOME% -Dderby.security.port=1527 -Djava.security.manager -Djava.security.policy=%DERBY_HOME%\server.policy -jar %DERBY_HOME%\lib\derbyrun.jar server start Alternatively, if your class path contains the appropriate Derby jar files (which can ensure by running %DERBY_HOME%\bin\setNetworkServerCP.bat), you can start the Derby network server using the following: start java -Dderby.system.home=%DERBY_HOME% -Dderby.security.port=1527 -Djava.security.manager -Djava.security.policy=%DERBY_HOME%\server.policy org.apache.derby.drda.NetworkServerControl start I hope this helps. I wasted a lot of time before I figured out that the two forward slashes in the file specification was causing the problem. _ John I. Moore, Jr. SoftMoore Consulting
Re: Network Server Access Permissions and Java 1.7.0_51
Sent from my iPhone On Jan 17, 2014, at 7:23 AM, John I. Moore, Jr. softmo...@att.net wrote: Java version 1.7.0_51 (latest version) causes the following error when trying to start the network server. I can see from the issue tracker that there is a fix to be added that should correct this problem in the next release, but is there an easy workaround that exists now? Details would be appreciated. _ John I. Moore, Jr. Hi John, Yesterday we also attached releaseNote.html to DERBY_6438 which also describes this workaround: you need to use your own policyfile and start networkserver with java -Djava.security.manager -Djava.security.policy=yourpolicyfilename org.apache.derby.drda.NetworkServer start For your convenience, I attach a copy of the updated default 10.10 policyfile to DERBY-6438 ('1010_server.policy'). You can use that as a starting point. As an alternative, I guess you *could* mess with the JVMs 'java.policy' file, but I imagine that's not supported by the JVM vendors, or they'd have added it to the workarounds. Plus it will get overwritten by the next JVM update. I think another alternative is to start networkserver at one of the 'ephemeral' port numbers (i.e. start with java org.apache.derby.drda.NetworkServer -p 5 start), I tried at port 5 and that seemed to work. But then you might need to modify your app to use that port number. Regards, Myrna
Re: Derby logs are not getting printed
Or, put your derby.properties file in the location where you found the derby.log when running with -Dderby.system.home. Also, what actions are you taking? Myrna On Thu, Dec 12, 2013 at 5:51 AM, Rick Hillegas rick.hille...@oracle.comwrote: Hi Lasantha, You might try setting the properties as JVM properties on the boot command line. Maybe your properties file is not being found. Hope this helps, -Rick On 12/11/13 5:59 PM, nglasantha wrote: Hi Bryan, Thanks for your reply. I have configured derby home by giving JVM parameter. Derby.log file is getting created. But log entries are not there except booting information. Thanks Lasantha On Dec 11, 2013 8:53 PM, Bryan Pendleton-3 [via Apache Database] [hidden email] /user/SendEmail.jtp?type=nodenode=136042i=0 wrote: I have configured derby logs, but logs are not getting printed. What makes you think the logs are not being written? Perhaps you are not looking in the right location for the logs. The derby.log file is generally written in the directory that the Derby database engine considers to be its home directory. Here's some documentation: http://db.apache.org/derby/docs/10.10/devguide/cdevdvlp25889.html http://db.apache.org/derby/docs/10.4/tuning/rtunproper32066.html thanks, bryan If you reply to this email, your message will be added to the discussion below: http://apache-database.10148.n7.nabble.com/Derby-logs-are- not-getting-printed-tp136011p136022.html To unsubscribe from Derby logs are not getting printed, click here. NAML http://apache-database.10148.n7.nabble.com/template/ NamlServlet.jtp?macro=macro_viewerid=instant_html% 21nabble%3Aemail.namlbase=nabble.naml.namespaces. BasicNamespace-nabble.view.web.template.NabbleNamespace- nabble.view.web.template.NodeNamespacebreadcrumbs= notify_subscribers%21nabble%3Aemail.naml-instant_emails% 21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml View this message in context: Re: Derby logs are not getting printed http://apache-database.10148.n7.nabble.com/Derby-logs-are- not-getting-printed-tp136011p136042.html Sent from the Apache Derby Users mailing list archive http://apache-database.10148.n7.nabble.com/Apache-Derby-Users-f95095.html at Nabble.com.
Re: Problem updating a record
Bob, You're not telling us what does happen, so we're doing our best... The missing code? Bryan said: call executeUpdate() on the prepared statement in order to execute it. So, add: psUpdate.executeUpdate(); after setting the values, but before doing the commit. See for examples and explanation a simple JDBC tutorial or book, for instance: http://docs.oracle.com/javase/tutorial/jdbc/basics/prepared.html - Bryan also thinks the SQL you've written may not do what you think/want. Perhaps you were hoping that FETCH FIRST ROW ONLY from your query would magically trickle down to the update? But it will not unless you make it so. So with the current update SQL you'll end up with updating every row in the table with the same two values. But perhaps that is what you want. If not, there are different ways to accomplish updating just one row. You'll have to figure out what works there yourself. Perhaps there's another key (id) field in the table that identifies each unique row - if so, you can get that value in your select, and change the update SQL to have something like 'UPDATE USD_JPY SET Return_predicted=?,Class_predicted=? where keycolumn= + keyvalue, or maybe UPDATE USD_JPY SET Return_predicted=?,Class_predicted=? where Date= + Date1 + and Time= + Time1. Or perhaps you can rework the code to use updatable cursors and use Resultset.rsUpdaterow method - but then I think you cannot use the ORDER BY clauses in your select. (see: http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html and http://db.apache.org/derby/docs/10.10/ref/rrefsqlj41360.html#rrefsqlj41360__sqlj15384 ) HTH Myrna On Mon, Dec 2, 2013 at 6:15 PM, Bob M rgmatth...@orcon.net.nz wrote: It would help if you could show me the additional code I need to accomplish my task Bob M -- View this message in context: http://apache-database.10148.n7.nabble.com/Problem-updating-a-record-tp135856p135870.html Sent from the Apache Derby Users mailing list archive at Nabble.com.
Re: error message....
Robert, It really hard to tell the cause from the amount of context information you've given. It would help if you could for instance give a stack trace, or the section of code where this is happening. Is this during development (compile time) or at runtime? Myrna On Thu, Nov 14, 2013 at 6:36 AM, Robert Glover rglover...@optonline.netwrote: Please advise concerning this error message….. Type mismatch: cannot convert from java.sql.PreparedStatement to org.apache.derby.client.am.PreparedStatement Thanks in advance Bob Glover
Re: Random DRDA Error on IBM J9 JVM
On Wed, Apr 4, 2012 at 12:43 PM, Brandon L. Duncan brandonl.dun...@gmail.com wrote: Peter, definitely using the 10.8.2.2 jars. The scenario, which I'm in the process of parsing down to share on JIRA is a single shell script called from qsh to start the network server, run ij, and finally shutdown the network server. The same classpath is shared through all three java calls. On Wed, Apr 4, 2012 at 3:25 PM, Peter Ondruška peter.ondruska+de...@kaibo.eu wrote: Brandon, just an idea, are you sure you use 10.8.2.2 jars also on client accessing this Derby network server? Once I switched everything to 10.8.2.2 I stopped seeing the errors on IBM J9. On Wed, Apr 4, 2012 at 8:57 PM, Brandon L. Duncan brandonl.dun...@gmail.com wrote: Hi all, I am seeing intermittent failures on 10.8.2.2 running on J9. I switched to lib-debug to add line numbers in the stack. Per your recommendation Myrna, I'm putting together a test scenario that I can attach to a possible JIRA. However, I was wondering in the mean time if the 10.8.2.2 stack with line numbers indicated a possible area to isolate on in my attempt to recreate? Thanks Wed Apr 04 14:46:14 EDT 2012 : Apache Derby Network Server - 10.8.2.2 - (1181258) started and ready to accept connections on port 1555 Wed Apr 04 14:46:21 EDT 2012 : Connection number: 1. Wed Apr 04 14:46:21 EDT 2012: Shutting down instance a816c00e-0136-7ead-b0af-cab24f1a on database directory /database with class loader sun.misc.Launcher$AppClassLoader@376a376a Wed Apr 04 14:46:21 EDT 2012 Thread[DRDAConnThread_11,10,main] Cleanup action starting java.lang.NullPointerException at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.stop(BaseDataFileFactory.java:541) at org.apache.derby.impl.services.monitor.TopService.stop(TopService.java:443) at org.apache.derby.impl.services.monitor.TopService.shutdown(TopService.java:394) at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMonitor.java:1845) at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(BaseMonitor.java:1682) at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(BaseMonitor.java:1560) at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(BaseMonitor.java:979) at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Monitor.java:550) at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnection.java:2697) at org.apache.derby.impl.jdbc.EmbedConnection.init(EmbedConnection.java:385) at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Driver40.java:70) at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:248) at org.apache.derby.jdbc.EmbeddedDriver.connect(EmbeddedDriver.java:126) at org.apache.derby.impl.drda.Database.makeConnection(Database.java:257) at org.apache.derby.impl.drda.DRDAConnThread.getConnFromDatabaseName(DRDAConnThread.java:1447) at org.apache.derby.impl.drda.DRDAConnThread.verifyUserIdPassword(DRDAConnThread.java:1397) at org.apache.derby.impl.drda.DRDAConnThread.parseSECCHK(DRDAConnThread.java:3248) at org.apache.derby.impl.drda.DRDAConnThread.parseDRDAConnection(DRDAConnThread.java:1177) at org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDAConnThread.java:982) at org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:295) Cleanup action completed Wed Apr 04 14:46:21 EDT 2012 Thread[DRDAConnThread_11,10,main] Cleanup action starting java.lang.NullPointerException at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.stop(BaseDataFileFactory.java:541) at org.apache.derby.impl.services.monitor.TopService.stop(TopService.java:443) at org.apache.derby.impl.services.monitor.TopService.shutdown(TopService.java:394) at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMonitor.java:1845) at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(BaseMonitor.java:1682) at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(BaseMonitor.java:1560) at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(BaseMonitor.java:979) at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Monitor.java:550) at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnection.java:2697) at org.apache.derby.impl.jdbc.EmbedConnection.init(EmbedConnection.java:385) at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Driver40.java:70) at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:248) at org.apache.derby.jdbc.EmbeddedDriver.connect(EmbeddedDriver.java:126) at org.apache.derby.impl.drda.Database.makeConnection(Database.java:257) at
Re: Random DRDA Error on IBM J9 JVM
On Mon, Mar 19, 2012 at 10:18 AM, Brandon L. Duncan brandonl.dun...@gmail.com wrote: Thanks Peter. Do you remember if you upgraded to 10.8.2.2 or 10.8.1.2? We do have a test environment with 10.8.1.2, and are seeing similar results. I do agree that it seems to be a strange coexistence with Derby and J9. The IBM Classic JVM doesn't seem to have this issue, although IBM seems to have eliminated it in V7R1M0. Mon Mar 19 12:46:40 EDT 2012 : Apache Derby Network Server - 10.8.1.2 - (1095077) started and ready to accept connections on port 11527 Mon Mar 19 12:46:44 EDT 2012 : Connection number: 1. Mon Mar 19 12:46:45 EDT 2012: Shutting down instance a816c00e-0136-2bda-791f-cab24f1a on database directory /database with class loader sun.misc.Launcher$AppClassLoader@376a376a Mon Mar 19 12:46:45 EDT 2012 Thread[DRDAConnThread_11,10,main] Cleanup action starting java.lang.NullPointerException at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.stop(Unknown Source) at org.apache.derby.impl.services.monitor.TopService.stop(Unknown Source) at org.apache.derby.impl.services.monitor.TopService.shutdown(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown Source) at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.init(Unknown Source) at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source) at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source) at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source) at org.apache.derby.impl.drda.Database.makeConnection(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.getConnFromDatabaseName(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.verifyUserIdPassword(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.parseSECCHK(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.parseDRDAConnection(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source) Cleanup action completed Mon Mar 19 12:46:45 EDT 2012 Thread[DRDAConnThread_11,10,main] Cleanup action starting java.lang.NullPointerException at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.stop(Unknown Source) at org.apache.derby.impl.services.monitor.TopService.stop(Unknown Source) at org.apache.derby.impl.services.monitor.TopService.shutdown(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown Source) at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.init(Unknown Source) at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source) at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source) at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source) at org.apache.derby.impl.drda.Database.makeConnection(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.getConnFromDatabaseName(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.verifyUserIdPassword(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.parseSECCHK(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.parseDRDAConnection(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source) at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source) Cleanup action completed Mon Mar 19 12:46:45 EDT 2012 Thread[DRDAConnThread_11,10,main] (DATABASE = /database), (DRDAID = {1}), Java exception: ': java.lang.NullPointerException'. Mon Mar 19 12:46:47 EDT 2012 : Connection number: 2. Mon Mar 19 12:46:47 EDT 2012: Shutting down Derby engine Mon Mar 19 12:46:47 EDT 2012 : Unexpected exception: {0} Mon Mar 19 12:46:47 EDT 2012 : null java.lang.NullPointerException at org.apache.derby.impl.services.monitor.TopService.getService(Unknown Source) at org.apache.derby.impl.services.monitor.BaseMonitor.shutdown(Unknown Source) at
Re: Help derby not updating
On Wed, Feb 22, 2012 at 10:05 PM, Kristian Waagan kristian.waa...@oracle.com wrote: On 22.02.2012 22:27, Patricia Miriga wrote: Hello, I have been loading and running derby every morning at work. However, it has not been updating for a week now. Please advise on how to do this. Hi Patricia, I have no idea what the community can help you with. Do you have any more information? Regards, -- Kristian Thanks. Patricia Miriga. I'm especially curious what command(s) you tried and what errors - if any - you get. Myrna
Re: BUG renaming derbynet.jar
On Mon, Jan 23, 2012 at 12:09 PM, Nick Drone ndr...@gmail.com wrote: All, I may of found a bug with starting derby through the NetworkServiceControl class. With the clients maven repository jars are name-version.jar, we use an ant script to start/stop and create databases on our development machines. I first found that with ant when we would start derby it would crash. I then tried to start derby from the command line. Machine is Windows XP Java 1.6 Derby 10.8.2.2 Ant 1.8.1 Here is the failing command: java -classpath C:\tmp\derby-10.8.2.2.jar;C:\tmp\derbyclient-10.8.2.2.jar;C:\tmp\derbynet-10.8.2.2.jar;C:\tmp\derbytools-10.8.2.2.jar org.apache.derby.drda.NetworkServerControl start -h localhost -p 1527 produces error: Cannot find derbynet.jar on the classpath. successful command: java -classpath C:\tmp\derby.jar;C:\tmp\derbyclient.jar;C:\tmp\derbynet.jar;C:\tmp\derbytools.jar org.apache.derby.drda.NetworkServerControl start -h localhost -p 1527 Thanks, Nick Perhaps you're running into DERBY-3083: https://issues.apache.org/jira/browse/DERBY-3083 (duplicated by DERBY-3120) Looks like that issue has been without activity for 4 years... If you are knowledgeable about this functionality, please consider helping! If interested, see: http://wiki.apache.org/db-derby/ForNewDevelopers Myrna
Re: German Sharp S and UCASE
On Thu, Dec 8, 2011 at 4:21 AM, dbuser...@kaffeeschluerfer.com wrote: Hello, I'm trying to use UCASE to normalize different case variants of text field values. There's just a little problem. It works fine for all normal characters including German umlauts (Ä, Ö, Ü, ä, ö, ü) ... ==vv= COPIED FROM IJ CONSOLE =vv== ij VALUES UCASE('ÜbErSeTzUnG'); 1 --- ÜBERSETZUNG 1 Zeile ausgewählt == ... but it seems to cause trouble with the German Sharp S: ß (See http://en.wikipedia.org/wiki/Sharp_S) ==vv= COPIED FROM IJ CONSOLE =vv== ij VALUES UCASE('Straßenbahn'); 1 --- STRASSENBA 1 Zeile ausgewählt == It correctly (!) replaces ß by SS but then it truncates the resulting string, thereby appending an ampersand . How can I make it return the complete, correct result STRASSENBAHN? (Which, by the way, means streetcar. ;-)) My DERBY_OPTS look like this: DERBY_OPTS=-Dderby.ui.locale=de_DE -Dderby.ui.codeset=Cp850 Many thanks in advance for your help! -- NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone Hi, The value is likely returned correctly, but you're hitting the maximum display width for columns in ij. This is controlled by the property ij.maximumDisplayWidth, and you can also set it during your ij session using maximumDisplayWidth. I think the default is 10. This is documented in the Derby Tools and Utilities Guide, for instance for the latest alpha manuals: http://db.apache.org/derby/docs/dev/tools/tools-single.html Myrna
[ANNOUNCE] Apache Derby 10.8.2.2 released
The Apache Derby project is pleased to announce a new bug-fix release, 10.8.2.2. Apache Derby is a subproject of the Apache DB project. Derby is a pure Java relational database engine which conforms to the ISO/ANSI SQL and JDBC standards. Derby aims to be easy for developers and end-users to work with. Derby 10.8.2.2 can be obtained from the Derby download site: http://db.apache.org/derby/derby_downloads.html. Please try out this new release. Myrna
[ANNOUNCE] Apache Derby 10.8.2.2 released
The Apache Derby project is pleased to announce a new bug-fix release, 10.8.2.2. Apache Derby is a subproject of the Apache DB project. Derby is a pure Java relational database engine which conforms to the ISO/ANSI SQL and JDBC standards. Derby aims to be easy for developers and end-users to work with. Derby 10.8.2.2 can be obtained from the Derby download site: http://db.apache.org/derby/derby_downloads.html. Please try out this new release. Myrna
Re: IJ-tool getting cursor-keys work on Solaris (bash)
On Mon, May 9, 2011 at 7:39 AM, malte.kem...@de.equens.com wrote: I am using *ij-tool* just for look up. It works great on windows. When I use it on a bash-shell (Solaris) the *cursor-keys* do not work, but I get some strange letters typed like this: *ij select ^[[A^[[B^[[C^[[D* It seems that those keys are not defined in some way. They work with in the bash shell itself though. What has to be done, so it works, including history of the commands used within ij-session? I don't know if anyone has ever solved this. I have heard some discussions in the past about trying to use JLine (http://jline.sourceforge.net/), but I don't think I ever heard whether those attempts were successful or not. There's a wiki page describing various approaches, including how to set up JLine: http://wiki.apache.org/db-derby/CommandHistoryInIj I usually run ij in a comint buffer in Emacs, and that works pretty well. -- Knut Anders But how come that it works for windows? It's odd, apparently on windows it accidentally is able to use the OS (command line window) history...But it's the same code, so not sure why it works (only) there. I've noticed that if you exit ij, change directories, go back and start ij again, (at least I think that's the sequence of events), the history stops working on windows too. There's been a bug logged to get history working in ij, and some attempt has been made to fix this, but it hasn't gone anywhere, see https://issues.apache.org/jira/browse/DERBY-1447. See also a (much) earlier thread; http://www.mail-archive.com/derby-user@db.apache.org/msg07199.html Myrna
Re: track the table changes in one transaction
2011/3/31 鲍少明 ioker...@gmail.com: Thanks for Myrna's answer. But I am asking another function. Currently, I am using Derby in the memory mode. I need to know the table name list which has data changes during a transaction. So I can export them into csv. But there is not any information inside derby to tell me this update history. So do I need to manually record the table names which has really changed during a transaction? Thanks, Clark 在 2011年3月18日 上午8:49,Myrna van Lunteren m.v.lunte...@gmail.com写道: 2011/3/17 鲍少明 ioker...@gmail.com: I have checked the system tables derby using. I don't find any information table to track the modify time of the tables. So does it mean I need to write some code to manually track it. And if it's roll-backed, I need to clean it up? 2011/3/14 鲍少明 ioker...@gmail.com Hello group, Is there any easy way to track the tables which have been updated/deleted/inserted in one transaction? I know that I can add some code in my db operation code to track the status. But if I need to track some cascade delete or procedure call, I will need to write some ugly code to track them. Is there any easy way to get this done? Any suggestion will be helpful. Thanks, Clark Bao Derby manages all deletes/inserts/updates during a transaction, including adding of tables...If something fails in the middle, the entire transaction should get rolled back. Have you found a situation where this didn't work as you expected? Perhaps you need to look at your transaction logic... Perhaps I'm misunderstanding the situation. Maybe all you want is to compare the contents of SYS.SYSTABLES for your schema before and after the transaction? Perhaps you can find more of what you're looking for using the XPLAIN functionality that was introduced in 10.6; see the Reference Guide (http://db.apache.org/derby/docs/10.6/ref/ref-single.html) and/or tuning guide (http://db.apache.org/derby/docs/10.6/tuning/tuning-single.html). HTH, Myrna I saw your reply. I don't know the answer to your question. Perhaps someone else will speak up. Myrna
Re: track the table changes in one transaction
2011/3/17 鲍少明 ioker...@gmail.com: I have checked the system tables derby using. I don't find any information table to track the modify time of the tables. So does it mean I need to write some code to manually track it. And if it's roll-backed, I need to clean it up? 2011/3/14 鲍少明 ioker...@gmail.com Hello group, Is there any easy way to track the tables which have been updated/deleted/inserted in one transaction? I know that I can add some code in my db operation code to track the status. But if I need to track some cascade delete or procedure call, I will need to write some ugly code to track them. Is there any easy way to get this done? Any suggestion will be helpful. Thanks, Clark Bao Derby manages all deletes/inserts/updates during a transaction, including adding of tables...If something fails in the middle, the entire transaction should get rolled back. Have you found a situation where this didn't work as you expected? Perhaps you need to look at your transaction logic... Perhaps I'm misunderstanding the situation. Maybe all you want is to compare the contents of SYS.SYSTABLES for your schema before and after the transaction? Perhaps you can find more of what you're looking for using the XPLAIN functionality that was introduced in 10.6; see the Reference Guide (http://db.apache.org/derby/docs/10.6/ref/ref-single.html) and/or tuning guide (http://db.apache.org/derby/docs/10.6/tuning/tuning-single.html). HTH, Myrna
Re: Schema does not exist
On Mon, Mar 7, 2011 at 5:27 PM, Bryan Pendleton bpendleton.de...@gmail.com wrote: On 03/07/2011 04:35 AM, Prakash Jaya wrote: After creating the database with user name and password in eclipse , then after restarting the server , when trying to access the data it is saying schema does not exist. but before restarting the server i am able to access The most common cause of this is that you have used a relative, rather than an absolute, database name in your JDBC Connection URL, and the server is using a different current-working-directory when you ran it the second time, hence it is not finding the database that you created and used the first time. thanks, bryan I am also wondering what exactly you mean by 'trying to access the data'. Are you doing a select from a table that you created in the first step? You may be connecting using a different user the second time so the 'default' schema may be different, and you may either have to set the schema to the one you want, or fully qualify the tables. Can't tell more without more details. Myrna
Re: problems after could not listen on port xxx on host 0.0.0.0 / corrupting data base?
On Wed, Feb 23, 2011 at 2:33 PM, Morten Mikkelsen mortenbr...@gmail.com wrote: Hi, I'm really no expert, but I would say there is not enough information here.. I know of no situations where you would get the 'address already in use' exception if the port is free. Perhaps the script used to start the network server occupies the port before starting the server, making the actual start fail? You should be able to start the server before worrying about the next problems, so focus on that first off. /Morten On Wed, Feb 23, 2011 at 10:50 PM, Thomas Hill thomas.k.h...@t-online.de wrote: Hi Morten, thanks for your reply on the address already in user issue. The Network Server is hosted on the internet and my provider tells me that nothing else is using the port and their tests would indicate that - the normal (Linux) start/stop scripts coming with Derby are being used - when the Server is stopped the port is indeed properly released. They are assuming that if the port in a (fresh) start is not properly released the Derby Server might not have properly been shutdown / might have crashed - for which I don't have indications. Any toughts on whether the server is started after the address already in use has been encountered? There a no further entries in the log that would say 'server is ready to accept connections' - so I guess the start failed. And any thougths on the 'another instance ...' issue - which prevents me to boot the database? might the database have been corrupted?? Tx -- /Morten I have seen this type of error pop up in rare situations - including some bugs in networkserver (e.g. DERBY-4053, DERBY-4304), but also due to jvm bugs, and from looking at DERBY-3108, it can be the result of a normal TCP/IP limitation if you try to open and release connections really fast. As Morten said, it's a classic network exception. The fact that the database is not starting with ij is to *protect* it from getting corrupted. So...some questions I can think of: What version of derby are you using? What has happened between now and when you last could use the system - did the system crash? Did someone ctrl-c or kill the network server process? Did any other piece of software get installed on this system that could be using the same port? Can you start networkserver with a different port (not to connect to the database; if ij can't, another network server cannot either). Have you tried booting your system since? Myrna
Re: Derby Eclipse project nature - The chosen operation is not currently available.
On Sun, Jan 16, 2011 at 1:43 PM, Joshua White de...@jwhitesolutions.com wrote: I am using SpringSource Tool Suite (sts-2.5.2) which is based on Eclipse 3.6.1 running on Java 1.6.0_23. I have installed the derby core plugin (derby_core_plugin_10.7.1) and the derby ui plugin (derby_ui_doc_plugin_1.1.2) based on the directions here: http://db.apache.org/derby/integrate/plugin_howto.html#Installing+the+plug-ins. When I start STS/Eclipse, I create a new Java project and attempt to add the Derby project nature to it, I receive the following message: The chosen operation is not currently available. Is there a work around available for this issue? Thanks, Joshua Hi Joshua, That message is not a message from derby nor the plugin. We know the plugin works with full eclipse; that doesn't mean it works with every tool based on eclipse. Did you ask the SpringSource forum? Did you ask eclipse? Did you try the plugin with full eclipse? A quick web search seems to hint at other plugins having troubles with SpringSource and natures. So perhaps it doesn't support the concept of a 'nature', which is how the derby plugin works. But I'm guessing wildly... Myrna
Re: Derby Eclipse project nature - The chosen operation is not currently available.
On Mon, Jan 17, 2011 at 12:39 PM, Joshua White de...@jwhitesolutions.com wrote: SOLVED I missed the last comment in the below JIRA issue. I changed Eclipse to run on Java 6 (instead of 5) and everything works. Eclipse was reporting an exception indicating that the version of the class file was not supported. Can we compile these plugins against Java 5 to avoid this problem going forward? -Joshua On Mon, Jan 17, 2011 at 2:11 PM, Joshua White de...@jwhitesolutions.com wrote: Myrna, Thanks for your reply. This message seems pretty common in Eclipse in general so it is hard to tell if it is a Eclipse, Spring or Derby issue. I did find a similar issue in the Derby Jira from May of this year: https://issues.apache.org/jira/browse/DERBY-4656 If I find a way to get around this issue, I'll be sure to post it here. If there is someone on this forum however that has already figured it out, please share. Regards, Joshua On Mon, Jan 17, 2011 at 1:49 PM, Myrna van Lunteren m.v.lunte...@gmail.com wrote: On Sun, Jan 16, 2011 at 1:43 PM, Joshua White de...@jwhitesolutions.com wrote: I am using SpringSource Tool Suite (sts-2.5.2) which is based on Eclipse 3.6.1 running on Java 1.6.0_23. I have installed the derby core plugin (derby_core_plugin_10.7.1) and the derby ui plugin (derby_ui_doc_plugin_1.1.2) based on the directions here: http://db.apache.org/derby/integrate/plugin_howto.html#Installing+the+plug-ins. When I start STS/Eclipse, I create a new Java project and attempt to add the Derby project nature to it, I receive the following message: The chosen operation is not currently available. Is there a work around available for this issue? Thanks, Joshua Hi Joshua, That message is not a message from derby nor the plugin. We know the plugin works with full eclipse; that doesn't mean it works with every tool based on eclipse. Did you ask the SpringSource forum? Did you ask eclipse? Did you try the plugin with full eclipse? A quick web search seems to hint at other plugins having troubles with SpringSource and natures. So perhaps it doesn't support the concept of a 'nature', which is how the derby plugin works. But I'm guessing wildly... Myrna Thanks for reporting back, Joshua! I'll add that comment to the bug you found so it can be dealt with. Myrna
Re: Consulta Derby
2010/10/25 daniel.rami...@logisoft.co: Buenos dias, Cordial saludo Nos encontramos en desarrollo de una aplicacio para moviles, estamos interesados en Derby, nos gustaria tener mas informacion sobre esta y resolver algunas dudas. Estamos trabajando con Java ME, Derby cuenta con librerias para este lenguaje de programacion ? Nos podrian facilitar una version de prueba de Derby,ejemplos de aplicacion con Java ME y configuracion para windows mobile 5.x o 6.x ? Tambien nos gustaria conocer un portafolio de precios y servicios del producto. Muchas Gracias por su atencion, Daniel Ramirez Ingeniero LOGISOFT S.A. Buenas dias, Gracias por su interes en Derby. La lengua para communicar con el 'derby-user' es ingles, pero por esta vez ensayo responder en espanol... Derby es compatible con JavaME, pero hay limites en lo que es possible; por ejemplo, el 'network server' no funcionara. Por mas informacion, vease: http://wiki.apache.org/db-derby/JavaMESupport Se puede obtenir Derby desde el web segun el licensio Apache, version 2: http://db.apache.org/derby/license.html. Por el version de Derby mas corriente, vease: http://db.apache.org/derby/derby_downloads.html Derby es 'Open Source', y no hay precios, ni servicios, ni guarancias. Pero a menudo tiene alguien en el comunidad 'derby' que puede respondar en preguntas y problemas. O Ustedes puede contribuar su propre soluciones si hay algunas problemas. Pero communicaremos en ingles. Myrna van Lunteren
Re: Java DB sample db?
On Sat, Jul 24, 2010 at 11:18 AM, Gabriele Kahlout gabri...@mysimpatico.com wrote: I'm trying to follow the following tutorial but I don't have the sample, db although I can run apps on glassfish and I've other database in java db. I hope i didn't delete the sample db a long time ago. How can I get the sample db again? http://platform.netbeans.org/tutorials/nbm-maven-crud.html -- Regards, K. Gabriele Perhaps this answer from Rick on a similar question is helpful. http://article.gmane.org/gmane.comp.apache.db.derby.user/12056 Myrna
Re: Database restoration not working.
On Fri, Apr 23, 2010 at 7:37 PM, Dinesh Bajaj dinesh.ba...@ymail.comwrote: Hi All, My understanding is that restoring a backedup database should restore it to to its original location. If for example, a database is backedup from the location c:\one to c:\two, and if it is later restored, then the database ought to be restored to the original location, i.e. c:\one. However, I find that this is not the case with Derby. String connectionURL = jdbc:derby:mydbname;restoreFrom=c:/temp/two/mydbname On using the above-mentioned connection string, the connection to the database is indeed made; however, it is not restored to its original location. Where the database is restored, and how I can get it restored to its original location? Thanks in advance. Regards, Dinesh Hi Dinesh, As you found, derby does not retain information about the directory structure around the database, just the internal organization of the database itself. And the backup/restore doesn't keep that information either. Derby processes start from the location where the java process is invoked... So, to restore to the original position, I'd suggest starting the restore in the original location. Or, you can just specify the target directory in the URL, i.e.: String connectionURL = jdbc:derby:c:/temp/one/mydbname;restoreFrom=c:/temp/two/mydbname That should make mydbname database get restored to c:/temp/one. Myrna
Re: SQL Parser Code in Apache Derby Source Code
On Thu, Feb 4, 2010 at 4:43 PM, AKA_DERBY gn_keer...@yahoo.com wrote: Hello Rick, Thank you for replying. I am kind of stuck with another build error. Everytime I build it, I am getting an Ant Build error dialog pop up. http://old.nabble.com/file/p27462091/Ant_build_failed.jpg . There are links discussing this - like http://mail-archives.apache.org/mod_mbox/db-derby-dev/200906.mbox/%3cx6d49eiauf@sun.com%3e but I have not been able to locate this ant.properties file at all to change the variables (j14lib, j15lib and j16lib) . Could you please explain in detail what exactly is to be done to get rid of this build error. I would like to mention that I am using a 64bit Windows 7, and Eclipse Ganymede/Galileo to execute Apache Derby code. Any help would be appreciated. Thanks, ant.properties is a file you'll probably have to create yourself. Mine lives in $HOME - that's where my ant installation expects it to be. (I've also run it by putting it in another dir ('xyz' and telling ant with -Duser.home=xyz to look in that directory)). On my windows XP that ends up somewhere in c:/Documents and Settings. Did you read through the Building.html file at the top of the Apache tree? It should provide help regarding setting up the jvms required to build. I would ensure first you can build outside of eclipse. Derby's build is a bit complex; you may need to tell eclipse not to do an automatic build. I believe you can use the 'ant' symbol at the top of the hierarchy to build, but I haven't tried that in a long time. Myrna
Re: debugging java stored procedures
On Mon, Jan 18, 2010 at 10:25 AM, Thomas thomas.k.h...@t-online.de wrote: Hi, any tipps from anyone which would help to debug java stored procedures? Not being able/knowing how to debug the code executed by the database using the eclipse debugger, I have included System.out.println statements into the procedures, but have no idea where these end up when running against a network server on a remote host mode (have checked tomcat logs, but haven't found anything). Thanks This will not help much, but did you test it in steps - i.e. first test on your local machine - and with the stored procedure's java code in a class on your local machine rather than a jar in the database? But you've probably already done that? In eclipse you might be able to suspend the run by putting a breakpoint in the source, then 'attaching' to the appropriate suspended thread... The tomcat installation should point you to where it's starting networkserver, and you might be able to add some debugging/tracing properties to a derby.properties file (to be created) in that directory. Helpful derby.properties settings are: derby.infolog.append=true derby.stream.error.logSeverityLevel=0 derby.language.logStatementText=true More detailed errors should then show up in a derby.log file somewhere on the server. There are also tracing properties you can switch on for network server and client - check the manual http://db.apache.org/derby/docs/dev/adminguide/cadminappsclienttracing.html and http://db.apache.org/derby/docs/dev/adminguide/radminconfig.html and http://db.apache.org/derby/docs/dev/adminguide/radminconfigdb2jdrdatracedirectory.html HTH Myrna
Re: How to disable SecurityManager in Derby?
On Thu, Jan 14, 2010 at 1:49 PM, Rami Ojares / PDF-Comics Oy r...@absinth.fi wrote: Hi, I can't seem to figure out how to tell to derby (network server) not to use SecurityManager. In the startup command there is no -Djava.security.manager property given to jvm. So the SecurityManager must be enabled at some point later in the code. I am getting various SecurityManager related exceptions so that's how I know that it must be on. - rami See: http://db.apache.org/derby/docs/10.5/adminguide/tadminnetservopen.html Be very careful switching it off, as you seem to have various security related issues it may make more sense to do a step back and analyze your policy file. HTH Myrna
problem with ij.runScript on AIX 5.3 64 bit
On Thu, Nov 19, 2009 at 4:26 AM, malte.kem...@de.equens.com wrote: Hi to all, I have somehow a problem using derby on AIX 5.3 [...details...] Questions: 1. have derby and ij ever run successfully on AIX (e.g. 5.3) with Java5 (64 bit)? 2. is there a possibility to activate logs from ij so we can better see what is happening? 3. Did anybody face a similar problem and maybe got a workaround? Thanks in advance Malte Hi Malte, I'm changing the subject of this thread (I couldn't find it again because you tacked it onto (hijacked) a message about an OOM error.) 1. I've tested ij and found it works - I've run the derby functional tests some of which do run ij.runScript, and activating org.apache.derby.tools.ij manually, on AIX with IBM 1.5. But on my machine, although the CPU is 64 bit, the AIX Kernel is 32 bit. I've most recently run with IBM 1.5. SR9 ( and there's now SR10 out) - also for 32 bit, of course. 2. ij or any other derby tool will start logging when there's any connection to a database. Judging from your actual log, it seems the program, and logging, *is* getting started. There is an error that occurs both in your expected log and the actual log: delete from MEMO_RECORDS 2009-11-19 11:32:25.127 GMT Thread[main,5,main] (XID = 145), (SESSIONID = 1), (DATABASE = DB), (DRDAID = null), Error compiling prepared statement: delete from MEMO_RECORDS where TMPST_IN ? :End prepared statement I'm not sure why, do you have an explanation for this? One way to get more info out of derby/ij is to create a simple text file called derby.properties (or modify it if you have one already) in the dir where you start your program from and add the following: derby.infolog.append=true derby.language.logStatementText=true derby.stream.error.logSeverity=0 Note, in the code snippet I see you're doing a try/finally - but I don't see a catch of any exception. I wonder what's happening in the method that's calling this - are you catching any exceptions there? A printStackTrace() might be able to shed some light. 3. I've never heard of this particular problem. But problems do occur. It's also possible there's something wrong with that particular jvm version also. If you can get a simple repro together I can try it out on my machine... Myrna
Re: unsubscribe
To unsubscribe, you can send email to: derby-user-unsubscr...@db.apache.org Hth Myrna
Re: Troubleshooting
On Tue, Sep 22, 2009 at 5:44 PM, Andrew Bruno andrew.br...@gmail.com wrote: Hi Javaid, Its a little difficult to understand the problem. if I understand correctly, are you asking whether the application you are running requires Java? Its possible that Java/JRE was embedded in the management app or was an external app, and was removed, or your %PATH% no longer has Java/bin?? Can you provide more info? Cheers Andrew On Wed, Sep 23, 2009 at 6:07 AM, Javaid Culasy javaid.cul...@kcom.com wrote: Hi, I have a management application which uses embedded Derby database. It has been working well until now. Now when we start the Application it hangs when initialising the Database. When I look in the control panel add or remove program window it dose not show me any “Java” programs. Dose Derby Database need java before it works and in the derby.log file most of the says “unknown” I would much appreciate some one help. Javaid Culasy Senior Customer Service Engineer KCOM Gruop Technology House Maylands Avenue Hemel Hempstead Herts HP2 7DF It sounds like the application 'crashes' when it's trying to initialize the database...i.e. the jvm (your 'java' process) stops for some reason. You said, most of derby.log says 'unknown'. Does it say 'Unknown Source'? If so, that likely just means you're running with normal - not debug - derby jar files (the exact line number in the source are unknown). What would help us is the contents of the derby.log - any errors, and the stack of called methods at the time of the error if it's there. And just in case - do you have a backup of the database (i.e. a copy of the database directory) when it was still working? Would be interesting to see if you can get things going with that backup. Regards, Myrna
Re: Solved 10.5.3: Eclipse 3.5 Plugin (Galileo) works only partial
On Mon, Aug 24, 2009 at 12:18 AM, frapienfrank.pien...@gmx.de wrote: frapien wrote: the derby plugin org.apache.derby.core_10.5.2 and org.apache.derby.core_10.5.1 only work for add derby nature, but not for derby start Networkserver ij Error-Message java.lang.NoClassDefFoundError: org/apache/derby/drda/NetworkServerControl work fine with JRE - JDBC: Java SE 6 - JDBC 4.0 [C:\eclipse-jee-galileo-win32\eclipse\plugins\org.apache.derby.core_10.5.3\derby.jar] 10.5.3.0 - (802917) [C:\eclipse-jee-galileo-win32\eclipse\plugins\org.apache.derby.core_10.5.3\derbytools.jar] 10.5.3.0 - (802917) [C:\eclipse-jee-galileo-win32\eclipse\plugins\org.apache.derby.core_10.5.3\derbynet.jar] 10.5.3.0 - (802917) [C:\eclipse-jee-galileo-win32\eclipse\plugins\org.apache.derby.core_10.5.3\derbyclient.jar] 10.5.3.0 - (802917) -- View this message in context: http://www.nabble.com/Eclipse-3.5-Plugin-%28Galileo%29-works-only-partial-tp24897570p25111581.html Sent from the Apache Derby Users mailing list archive at Nabble.com. Thanks for letting us know...I had done a clean install of Galileo (j2ee package) on windows with the 10.5.3.* plugins and found it worked also... Myrna
Re: Eclipse 3.5 Plugin (Galileo) works only partial
On Mon, Aug 10, 2009 at 3:40 AM, frapienfrank.pien...@gmx.de wrote: the derby plugin org.apache.derby.core_10.5.2 and org.apache.derby.core_10.5.1 only work for add derby nature, but not for derby start Networkserver ij Error-Message java.lang.NoClassDefFoundError: org/apache/derby/drda/NetworkServerControl Caused by: java.lang.ClassNotFoundException: org.apache.derby.drda.NetworkServerControl 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) Exception in thread main Syinfo is o.k. All was o.k. with eclipse-jee-ganymede-SR2 3.4 Any ideas why? -- View this message in context: http://www.nabble.com/Eclipse-3.5-Plugin-%28Galileo%29-works-only-partial-tp24897570p24897570.html Sent from the Apache Derby Users mailing list archive at Nabble.com. Hi, I had tested the core (and ui/doc) plugins for 10.5.1.1, and was able to successfully start network server... But I think I was using a 'classic' eclipse distribution, perhaps that makes a difference? I'd like to experiment when I have time... What flavor of eclipse build/distribution did you use? When you say, eclipse-jee-ganymede-SR2 3.4, (which worked for you) what version of derby was that? Thx, Myrna
Re: Feedback releases/release-10.5.1.1.html
2009/7/28 Dohm, Christian Erich (PWA-MA) christian.erich.d...@volkswagen.de: What about Maven2 artifacts for this release? Mit freundlichen Grüßen Hallo Christian, Thank you for your interest in derby. We've never done the publishing of the maven2 poms ourselves - instead, in the past, there was some automatic conversion of maven1 distributions to maven 2. This apparently has stopped. So we need to figure out how to achieve a maven2 distribution at the moment, but since the common appeal has been for maven 2 files, we'll likely work something out. A first step has been made; see https://issues.apache.org/jira/browse/DERBY-4267. You might be interested in putting a 'vote' on that issue, and/or 'watch' it. It's possible this will not happen at all for 10.5.1.1, because it's likely soon being superceded by a bug fix release off the 10.5 branch (10.5.2.0, see: http://wiki.apache.org/db-derby/DerbyTenFiveTwoRelease). MfG Myrna
Re: Hard upgrade failing?
On Mon, Jun 1, 2009 at 1:51 PM, Kristian Waagan kristian.waa...@sun.com wrote: Evan Leonard wrote: Hello Derby Users, I have a question regarding hard-upgrading. I'm trying to upgrade a database from 10.1 to 10.5. I'm connecting using 10.5 (see sysinfo output below) using the ;upgrade=true connection option. However after doing so I still see 10.1 being returned from this query: values syscs_util.syscs_get_database_property( 'DataDictionaryVersion' ) Its as though the hard upgrade isn't upgrading at all, as far as I can tell. I don't have any error output in the console. Is there somewhere additional I should be looking for debug information? Hi Evan, Just out of curiosity, what happens if you try to boot the database with 10.1 after the upgrade attempt? Another thing you could try is to go via an intermediate version, say 10.3, and upgrade the database in two steps. I'm too tired to look up our upgrade policies right now, but I encourage others on the list to pitch in with information and/or recommendations on how to proceed with this issue :) Regards, -- Kristian Thank you This is puzzling. I did a very simple experiment; - connect with ij with 10.1 jars in my classpath and created a db ij connect 'jdbc:derby:tstdb;create=true'; - connect with upgrade with 10.5 jars in my classpath ij connect 'jdbc:derby:tstdb;upgrade=true'; - with my 10.5 jars in the classpath, issue the query you mentioned: ij values syscs_util.syscs_get_database_property( 'DataDictionaryVersion' ); 1 (etc...) 10.5 Perhaps you won't mind doing the same experiment to verify it works for you this way? Then, well, perhaps there was a simple mistake in your upgrade step? I assume you made a copy of your db before the upgrade; so try it again, (with a fresh copy), this time catching extra info in your derby.log. You can do this by creating a derby.properties file in the dir where you start derby, and adding the following to it: derby.stream.error.logSeverityLevel=0 derby.infolog.append=true derby.language.logStatementText=true This should catch all activity and give more details about any possible warnings. Apart from this, I can only theorize - perhaps a simple typo? Or perhaps your 'upgrade=true' connection was not the first connection to the db with 10.5 jars? Once you're connected via soft upgrade, you cannot simply do a hard upgrade; but you'd get an error if this is what happened...(URL Attribute [update=true] Attribute is unknown to Derby). HTH Myrna
Re: Ask for guide for saving multilingual character in Derby
On Sun, May 31, 2009 at 12:17 AM, Crest.Boy wsxwin...@yahoo.com.cn wrote: Hi Guys: I am one new comer for derby. I tried many times but failed in saving multilingual characters in Derby. I get ? when I want to save Chinese characters. Who can provide one simple guide to save multilingual characters in Derby? It is better to show me step by step. Thanks a lot in advance! View this message in context: Ask for guide for saving multilingual character in Derby Sent from the Apache Derby Users mailing list archive at Nabble.com. Sorry - I can't do a step-by-step right now, but the ? characters are most likely what your console encoding shows, that is, the encoding, or rather, codepage setting, set on the machine on which you try to display the characters you retrieve after storing. Did you insert the Chinese characters using unicode? Are you on a Chinese machine? Windows? Linux? Try issuing chcp on the command line, and see what you get, then look around on the web and find a suitable chinese encoding. If this doesn't help, I'll try more later, or maybe someone else will put in their 2c. Myrna
Re: Embedded Derby w/Hibernate
On Sat, May 23, 2009 at 9:07 PM, Nicola DiPasquale nicholas.dipasqu...@gmail.com wrote: Did you create the tables? You have to use regular SQL to actually create the tables in the database before you can access them with Hibernate. I want Hibernate to create the tables automatically for me. I do not have a SQL schema designed for the data I am trying to store, I have POJOs with EJB3 persistence annotations. Actually you can have Hibernate take care of the DDL via the 'hibernate.hbm2ddl.auto=create-drop' property. I already have Hibernate properly configured to use Derby and to create the tables for me, that is not the issue. The issue that I am having is that Derby is throwing an exception after creating the tables claiming that the tables and views it just created do not exist. This only happens the first time that I run the application. If I restart the application with the same setting, since the DB already exists I do not have a problem. It would however be in poor form to require that I start the application twice every time that I want to do something with it, so I am looking for a potential fix/workaround other than restarting the app for this situation. Thanks. -Nicola DiPasquale Hi, I don't use Hibernate, so I'm not sure how much you can tweak the process - but I wonder if you can make hibernate issue a 'create schema'? And/or fully qualify the table names? HTH Myrna
Re: [ANNOUNCE] Apache Derby 10.5.1.1 released
On Thu, May 7, 2009 at 1:32 PM, Oleg Alexeyev blion...@gmail.com wrote: Hello, I've just checked http://repo1.maven.org/maven2/org/apache/derby/derby/ - there is no 10.5.1.1 version there. Are maven modules still published? Or maybe groupId/artifactId are now different? Thanks, -- oleg Now, that's really disappointing. I followed all the steps to deploy - or so I thought, but there doesn't seem to be anything left of my efforts. I'll look into this. Thx for the warning. Myrna
Re: [ANNOUNCE] Apache Derby 10.5.1.1 released
On Thu, May 7, 2009 at 4:00 PM, Myrna van Lunteren m.v.lunte...@gmail.com wrote: On Thu, May 7, 2009 at 1:32 PM, Oleg Alexeyev blion...@gmail.com wrote: Hello, I've just checked http://repo1.maven.org/maven2/org/apache/derby/derby/ - there is no 10.5.1.1 version there. Are maven modules still published? Or maybe groupId/artifactId are now different? Thanks, -- oleg Now, that's really disappointing. I followed all the steps to deploy - or so I thought, but there doesn't seem to be anything left of my efforts. I'll look into this. Thx for the warning. Myrna I must've had dust in my eye - the stuff I added exists after all - but it's maven1, not maven2. So, for derby 10.5.1.1, look under: http://people.apache.org/repo/m1-ibiblio-rsync-repository/org.apache.derby/jars/ It appears, once upon a time, files deployed by derby release managers to the maven1 repository magically got autoconverted and copied over to the maven2 repo. This wasn't done by anyone in the derby community, and so we don't know how to do it; and the autoconversion apparently no longer happens. Someone needs to give us the instructions and log a request in JIRA for it and then we can add it to the release process... See also comments under https://issues.apache.org/jira/browse/DERBY-4140 and https://issues.apache.org/jira/browse/DERBY-1378 I hope this answers your question... Regards, Myrna
[ANNOUNCE] Apache Derby 10.5.1.1 released
The Apache Derby project is pleased to announce a new feature release of Derby, 10.5.1.1. Apache Derby is a subproject of the Apache DB project. Derby is a pure Java relational database engine which conforms to the ISO/ANSI SQL and JDBC standards. Derby aims to be easy for developers and end-users to work with. Derby 10.5.1.1 can be obtained from the Derby download site: http://db.apache.org/derby/derby_downloads.html. Derby 10.5.1.1 contains the following new features: - SQL Roles - Support for most of SQL feature T331 and parts of T332 - Generated Columns - Support for SQL feature T175 - LOB Improvements - Many performance and usability improvements for BLOBs and CLOBs - Replication of encrypted databases - Support for replication of encrypted databases - OFFSET/FETCH FIRST - Support for limit result set cardinality (new SQL 2008 syntax) - In-memory back end - first revision of a storage engine for Derby storing all data in-memory. - Update Statistics Stored Procedure - Make it possible to refresh statistics In addition, Derby 10.5.1.1 contains many bug and documentation fixes. Please try 10.5.1.1.
Re: 10.5.1.1 released?
I agree it's strange. I think by now most of the mirror sites must've picked up the release, but the cgi page isn't working. The html does work (but isn't linked from that top page): http://db.apache.org/derby/releases/release-10.5.1.1.html Thx for alerting us to this issue... Myrna
Re: configuration derby plugin for eclipse
On Thu, Mar 26, 2009 at 10:22 AM, Fernando Freitas nand...@gmail.com wrote: Dear Charlie, I create a plugin from existing jars archives with derby jars files. I am still without any progress. I am confuse with your code. Somebody help me? (in your code) 1) What is hibernatePropertiesPlugin? What Object is this ? 2) How to create a database from a another bundle? 3) How to define the path location of the database? Best Regards Fernando 2009/3/19 Charlie Kelly char...@charliekelly.com Hi Fernando, I use Eclipse with Derby and Hibernate. I find it helpful to create a project that has all the jar files needed by Derby, Eclipse, and other programs (for example, Velocity). You can use Eclipse's wizard to create a plugin from existing jar archives (File-New-Project-Plugin Development-Plugin from existing jar archives). You can create a properties file and folder in your plugin and access it with code that is similar to the following: hibernatePropertiesPlugin = MetaPersistenceActivator.getDefault(); String propertiesFileNameFQ = properties/hibernate.properties; Path hibernatePropertiesPath = new Path(propertiesFileNameFQ); Bundle hibernatePropertiesBundle = hibernatePropertiesPlugin.getBundle(); URL hibernatePropertiesURL = FileLocator.find (hibernatePropertiesBundle, hibernatePropertiesPath, null); if (null == hibernatePropertiesURL) throw new Exception (URL is null for: + propertiesFileNameFQ); boolean substituteArgumentsFlag = false; InputStream hibernatePropertiesInputStream = FileLocator.openStream(hibernatePropertiesBundle, hibernatePropertiesPath, substituteArgumentsFlag); int availableBytes = hibernatePropertiesInputStream.available(); if (availableBytes = 0) throw new Exception (nothing available from properties/hibernate.properties); hibernateProperties.load(hibernatePropertiesInputStream); Use the name of the Activator for your plugin instead of MetaPersitenceActivator Path is contained in org.eclipse.core.resources (which you must include as a dependency for your plugin). Hope this helps. Charlie Fernando Freitas wrote: Hi People, sorry to repeat the question but, I forgot a detail, I am eclipse user and I am using the derby like plugin (bundle). So , I don't know where the files was created. Can you help me? In this case (derby plugin for eclipse) 1) How could I use some file xml or another configuration file configure the database, like to choose the place that I will create my Database's instance. 2) Where Derby save your files of database.? Thanks and Best Regards Fernando Fernando, I don't know if you're using hibernate or not? If you are, you'd probably find info about the hibernate plugins in the hibernate docs. If you're just using some eclipse distribution with the derby plugin, then the derby database will be created in your work space. At the most simple, find the name of your project, then look for a derby.log file there - a derby.log file is indication of derby activity. If you've created a database you should find it there. e.g. using 'connect jdbc:derby:mydb;create=true' in an ij session, would create the derby.log file and the database mydb in the project's workspace. HTH Myrna
Re: ClientDataSource in OSGi
On Wed, Mar 25, 2009 at 11:53 AM, JJ Snyder j.j.sny...@oracle.com wrote: After further investigation it appears the the derbyclient.jar is not a complete bundle. The manifest is terse and does not export anything. I grabbed the spring source version of the derby bundles and their derbyclient manifest is quite detailed including the correct export package. I am able to use it without issue. JJ Would you mind indicating where you found the incomplete bundle? Regards, Myrna
Re: Derby and Eclipse
On Fri, Mar 6, 2009 at 10:15 AM, Aysha Al-Eisaei aysha.eis...@gmail.com wrote: Hi All, I tried to add Derby to the Eclipse, but I faced the problem that the derby plugs-in are not signed. In Eclipse, when I chose Window Preferences from the menu to open the Eclipse Preferences dialog, I did not find Connectivity Driver Definitions. How can I solve the problem? Thank you, Aysha Al-Eisaei Hi, First, for reference, what version of Derby, and Eclipse, did you use? And what location/version info can you tell us about the eclipse plugin you used? I don't think I've ever heard anyone complain about the lack of signing before. If you have a need for this, we probably should add it for the next version of the plugin with the upcoming 10.5. Please open a JIRA for this. See: http://db.apache.org/derby/DerbyBugGuidelines.html. Thx, Myrna
Re: JDK 1.4 support?
On Wed, Nov 26, 2008 at 10:57 AM, Knut Anders Hatlen [EMAIL PROTECTED] wrote: Bernt M. Johnsen [EMAIL PROTECTED] writes: I understand that it's a nuisance, but it have to be that way until the Derby community decides to not support 1.4 No, it doesn't have to be that way. :) It is possible to make changes to the build system so that it builds jar files that can be used on JRE 1.4 without requiring the 1.4 libraries at compile-time. Please file a JIRA issue at https://issues.apache.org/jira/browse/DERBY if you'd like to see it fixed. -- Knut Anders It's an issue that has to get addressed(...eventually)...so thanks for bringing it up. Note by the way: Active participation is always appreciated. (fry your own fish). I think though that this would be a change for trunk only, I don't think it should get backported. And yes, this should be a derby-dev item... Myrna
Re: IBM J9 Personal Profile 1.1 + OSGi + Derby
On Wed, Oct 1, 2008 at 1:22 PM, Paul French [EMAIL PROTECTED] wrote: Hello All, I noticed I derby.jar is an OSGi bundle and so I installed it in my OSGi container (Knopflerfish 2.0.5) running on IBM J9 PP1.1 I included the required jdbc.jar (JSR169) in the bootpath of the J9 jvm. I can install the bundle no problems. When I try and start the bundle I get: java.lang.NoClassDefFoundError: java.sql.Driver From reading this page on the wiki http://wiki.apache.org/db-derby/JavaMESupport?highlight=(j2me) I know java.sql.Driver does not exist in JSR169. Hence how do I tell the derby bundle not to use java.sql.Driver and use instead javax.sql.DataSource Any help would be appreciated. Many Thanks Paul Hi, I wonder 1. Did you get more of a stack trace? Maybe in a log file somewhere? 2. What is the exact output when you do: j9 -version ? Note, that we support the Foundation (1.1) Profile - as far as I can tell, Personal Profile is a superset of that... Myrna
Re: Derby database is going down abruptly
Especially interesting might be what's in derby.log. If derby.log has no interesting information, setting the following properties in derby.properties would be helpful in tracking down the problems: - # for tracing user's locks: derby.storage.userLockTrace=true # for preventing derby.log to be overwritten when the database gets shutdown derby.infolog.append=true # for adding the text of the statements being executed to derby.log derby.language.logStatementText=true # for getting more errors to derby.log derby.stream.error.logSeverityLevel=0 -- Hth Myrna
Re: shutdown fails when basic security policy is active and authentication is ldap based
I agree with Rick that this should get documented. Perhaps, Andreas, you could log this issue as a documentation improvement in JIRA? Also, I wondered - in some recent testing I found that 'connect' permission was not sufficient, I needed connect, resolve to the ldapServer. Has that been your experience too? Regards, Myrna
Re: java.security.AccessControlException: access denied (java.io.FilePermission derby.log read)
On 5/10/08, tankboy [EMAIL PROTECTED] wrote: After searching everywhere I finally found out that's it's about the security manager. I was hoping in Eclipse that I could just go to here and change the start line command - project/properties/Apache Derby/Network Server Host. I tried replacing the text localhost with -h localhost -noSecurityManager as suggested in the derby docs to run this on the command line but I think Eclipse is not liking multiple arguments. Anyone else? http://db.apache.org/derby/docs/dev/adminguide/tadminnetservopen.html http://developers.sun.com/docs/javadb/10.1/devguide/cdevbabejgjd.html http://www.ibm.com/developerworks/forums/thread.jspa?threadID=175762 ChrisFromStPete wrote: I am getting a java.security.AccessControlException: access denied (java.io.FilePermission derby.log read) error when trying to start the Derby Network server from Eclipse. Can anyone help? I saw an article about installing a looser security policy, but it's not clear how to do this when use the plug-in. Thanks Chris Hankey View this message in context: Re: java.security.AccessControlException: access denied (java.io.FilePermission derby.log read) Sent from the Apache Derby Users mailing list archive at Nabble.com. If you are using the derby plugin, you're out of luck until someone fixes DERBY-2913. Then again, you shouldn't get that error at all. If you're starting networkserver from a class you wrote yourself, or from NetworkServerControl (if you're accessing the source), you should be able to set the flags. So, more information is needed on how NetworkServer is started exactly. Myrna
looking for interesting queries for regression tests
Hi, I opened DERBY-3209 (https://issues.apache.org/jira/browse/DERBY-3209) as I felt we could use more complex queries in our regression tests. I am asking any users of Derby for particularly interesting complex queries and some test data that you can contribute to such a test. Of course you would still need to test new versions of derby before upgrading, but your particular query would be part of the tests Derby developers can run and thus less likely to regress... If you have such a query and are free to contribute it, please attach a repro to this JIRA-issue! Regards, Myrna
Re: error_building
On 11/23/07, spark man [EMAIL PROTECTED] wrote: Hi! This is Naresh.I want to contribute in Apache Derby project. Just now I completed my M.C.A(Master of Computer Application). I down load the source code for the Apache Derby, while I building the Apache Derby I got one error please give a solution for this. My Error is E:\antproject\db-derby-10.3.1.4-src\java\engine\org\apache\derby\loc\build.xml taskdef class org.apaceh.derbyBuild.MessageBuilder cannot be found. Welcome! We've had some other people seemingly run into that error...It's usually some detail in the setup that causes the build to fail. I assume you read carefully the BUILDING.txt. (should be at e:\antproject\db-derby-10.3.1.4-src). So...some questions; is this the only error you see? Do you have proceed=true in $HOME/ant.properties? Are you using an IDE? Does this happen the very first time you build? Do you have ANT_HOME set? JAVA_HOME? Myrna
Re: Transactions and XA support with client jdbc driver
That's pretty similar to my recollection Jean. Myrna
Re: Including a derby db within the same jar as the application
On 10/28/07, David Leader [EMAIL PROTECTED] wrote: A postscript to the solution to the problem: jdbc:derby:jar:(MyApp.jar)MyDB When I used exe4j to create a Windows .exe from MyApp.jar it worked fine without specifying any derby properties. When I created a Mac application bundle (can be done with Apple's JarBundler) and tried to run it, it complained that it couldn't find the database. To get it to work I had to include the following key- value pair as a java property in the Info.plist: derby.system.home = $APP_PACKAGE/Contents/Resources/Java/ Just thought I'd mention this for completeness. David There is possibly a difference in what the jvm you're using on the mac reports for the system property 'user.dir'. Derby will assume derby.properties to life in user.dir if derby.system.home is not set. hth Myrna
Re: No driver found on Windows Mobile 5
On 10/23/07, Atelier Aness [EMAIL PROTECTED] wrote: Hi @all, I need to use Derby (10.3.104.561794) on a PDA with Windows Mobile 5. I developed a Java application with eclipse and tested it successfully on my desktop PC with Windows XP. I have build a jar which contains my class files and class files of derby and tried to run them on my PDA. But I always get SQLException: No driver found jdbc:derby:DB;create=true. My code is: Class.forName(org.apache.derby.jdbc.EmbeddedDriver); con = DriverManager.getConnection(jdbc:derby:DB;create=true,user,user); //OutOfMemoryException on PDA Don't know what I'm doing wrong. Hope for answer! Bye Aness Hi, What JVM is on your PDA? Most likely, it's a J2ME version. If so, you'll need to make some adjustments to your application; J2ME as far as I know has only JSR169 support, which does not have the DriverManager class available. Instead, you'll have to use the DataSource mechanisms, and Derby supports that combination with org.apache.derby.jdbc.EmbeddedSimpleDataSource. I hope this gives enough hints for looking through the manuals, wiki pages and email archives... Now, if your PDA's JVM is a full-fledged J2SE I don't know what could be wrong... Myrna
Re: derby.properties
If you're not using hibernate, and start networkserver using a jvm command, derby.properties file is expected to be in the directory where you start the command from. Maybe this page is of interest to you: http://wiki.apache.org/db-derby/DatabaseNamesRelativeAbsolute (Note that it is pointless to set derby.system.home in the derby.properties file; the optional derby.properties file would be located in the directory passed on to the java executable with -Dderby.system.home=path/dir.) Hth, Myrna
Re: java.security.AccessControlException: access denied (java.io.FilePermission derby.log read)
On 10/15/07, Chris [EMAIL PROTECTED] wrote: I am getting a java.security.AccessControlException: access denied (java.io.FilePermission derby.log read) error when trying to start the Derby Network server from Eclipse. Can anyone help? I saw an article about installing a looser security policy, but it's not clear how to do this when use the plug-in. Thanks Chris Hankey Hi Chris, It's interesting you're getting this error - is this in a new eclipse installation? After upgrade to the next version of derby? Or a new install of the derby plugin into an existing eclipse setup? Some more info would be appreciated. I'm interested because I think I saw this in an existing eclipse environment, but it appears no one else saw this. Of course, one could argue that the derby.log can be removed as a work-around, but in my environment I couldn't find a derby.log. Do you see a derby.log? Can you remove it? Now, for installing a looser security mechanism - the normal way is to specify -Dsecurity.policy=... but that's not possible with the plugin, which starts the server for you... At least, I've not heard anyone say how this can be done. I logged https://issues.apache.org/jira/browse/DERBY-2913 for an improvement in this area. No one's picked this up. If you find it important, you could vote for it. Or consider doing this yourself. :-) As a work-around, I only have the extremely crude ugly suggestion of replacing the file server.policy in derbynet.jar (jar -uvf derbynet.jar server.policy) in the derby.core plugin with a modified one... Myrna
Re: help, problem of java.security.AccessControlException: access denied (java.io.FilePermission derby.log read)
On 10/2/07, Bryan Pendleton [EMAIL PROTECTED] wrote: As a workaround, you can install your own, looser security policy for the network server. http://db.apache.org/derby/docs/10.3/adminguide/tadminnetservrun.html thanks, bryan I wonder though, how would that work with the eclipse plugin? As far as I know, the plugin does not currently allow you to configure the network server to specify a different policy file. I logged DERBY-2913 for a suggested improvement of the plugin, but no one's picked it up (yet)... Myrna
Re: can't access or create a db
On 7/21/07, Amir Michail [EMAIL PROTECTED] wrote: Hi, Not sure what happened, but now I can't access or create a db on my server: ERROR XJ041: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ041, SQLERRMC: Failed to create database 'testDB', see the next exception for details.::SQLSTATE: XBM0HDirectory /home/.../testDB cannot be created. If I copy the db to my laptop, then it works. Any ideas on how I could track down this problem? Amir You probably already thought of it, but the only thing I can think of off hand is write permissions on the server. Maybe the umask for the server process' user has been changed? Or the write permission for / ? Or maybe the server has been started from a different directory from before (if /home/../testDB would not be where your database used to be)? HTH Myrna
Re: Eclipse plugin wierdness
Michael Baehr wrote: I just installed Eclipse 3.3, with no non-standard plugins and a fresh workspace. After installing the Derby plugin and importing some projects, I have exactly the same effect again! What could be wrong with my system outside of Eclipse to cause this? It's very puzzling. You said you had the problem again after importing 'some' projects. Does it matter which projects? I'm wondering if one of the projects somehow has gotten some corruption in its .xml...Or whether there is something specific in it. If you can find projects that cause this when imported, vs. ones that don't, maybe you can compare the plugin xml details and find something that triggers eclipse/derby plugin to behave this way... Myrna
Re: Is the derby project still active?
On 7/5/07, Daniel Fitzgerald [EMAIL PROTECTED] wrote: It has been quite a while since any new builds or enhancements have been done on this software. Is this project dead or in stasis? It has it's niche i.e. small footprint and can be packaged with your jars ( albeit cumbersome). I read a white-paper a while ago about performance but the problems didn't seem insurmountable and indeed, it alluded to possible solutions. Anyway, I downloaded it and tried it out; it seemed fine as an application data repository (in SQL) so I hope the project doesn't die on the vine. It doesn't seem like it even got a chance to get out into the public at large for a proper trial. Just my thoughts. Thank you. Hi, Thank you for your interest in Derby! We're working on the 10.3 release, the goal is in roughly two weeks... Check out the 10.3 release wiki: http://wiki.apache.org/db-derby/DerbyTenThreeRelease Feel free to test out the beta version and report your findings... Also, check out the usage of derby page for a free form list of groups/products that claim to use derby: http://wiki.apache.org/db-derby/UsesOfDerby Regards, Myrna van Lunteren
version 10.3.1.0 beta available for testin
Hi! You may have been aware of the Derby developer community's efforts to create a next release. There is now a beta version that you can test with: http://people.apache.org/~myrnavl/10.3.1.0.beta. Please note that this is not an official release; it is not gpg-signed (as is the standard for Apache products) and some minor bug fixes are still being worked on; however, the main part of the work for 10.3 is completed. I strongly urge you to test this version, and log your activity on: http://wiki.apache.org/db-derby/TenThreeApplicationTesting. Please make sure you do your testing with a copy, not your production, database. Please read the RELEASE-NOTES.html carefully, especially the section regarding intentional incompatibilities, to assess whether you/your application will be affected. If you find unexpected behavior not found in previous releases, nor covered in these release notes, please ask about it on derby-user, or report them in jira; see: http://db.apache.org/derby/DerbyBugGuidelines.html#Login+to+Jira%2FRequest+a+Jira+userid. Regards Myrna van Lunteren
Re: Help with creating XA transaction Ids
On 9/26/06, Mick Jordan [EMAIL PROTECTED] wrote: I'm trying to run a distributed transaction on two Derby instances using a my application program as the transaction manager. I'm stuck on how to create a global transaction id that I can pass to the start method of the XAResource object that I get from the XAConnection object (an instance of NetXAResource). I've searched for examples but both that I found used external classes to create the Xid. Looking at the Derby code the most likely candidate seemed to be org.apache.derby.client.ClientXid but I have no idea what to pass to the constructor. The best example I found on an IBM site used com.ibm.db2.jcc.DB2Xid. I've not found any Derby-specific examples of how to create an Xid. Any pointers much appreciated. Thanks Mick Jordan Hi Mick, I'm a complete novice, but by coincidence I've been staring at the Derby functional test org.apache.derbyTesting.functionTests.tests.jdbcapi.checkDataSource.java. In this test, the author(s) have made an internal class which implements javax.transaction.xa.Xid that creates the Xid: - class cdsXid implements Xid, Serializable { private static final long serialVersionUID = 64467338100036L; private final int format_id; private byte[] global_id; private byte[] branch_id; cdsXid(int xid, byte b1, byte b2) { format_id = xid; global_id = new byte[Xid.MAXGTRIDSIZE]; branch_id = new byte[Xid.MAXBQUALSIZE]; for (int i = 0; i global_id.length; i++) { global_id[i] = b1; } for (int i = 0; i branch_id.length; i++) { branch_id[i] = b2; } } /** * Obtain the format id part of the Xid. * p * * @return Format identifier. O means the OSI CCR format. **/ public int getFormatId() { return(format_id); } /** * Obtain the global transaction identifier part of XID as an array of * bytes. * p * * @return A byte array containing the global transaction identifier. **/ public byte[] getGlobalTransactionId() { return(global_id); } /** * Obtain the transaction branch qualifier part of the Xid in a byte array. * p * * @return A byte array containing the branch qualifier of the transaction. **/ public byte[] getBranchQualifier() { return(branch_id); } } A new Xid is then obtained as follows: Xid xid = new cdsXid(1, (byte) 35, (byte) 47); or Xid xid = new cdsXid(1, (byte) 93, (byte) 103); HTH Myrna
Re: how to make create script from existing database?
On 9/11/06, Michael McCutcheon [EMAIL PROTECTED] wrote: I'm using the CREATE TABLES feature of toplink/netbeans with the JPA. Basically it generates the tables from your entity classes. What I would like to do then is generate a database creation script from the generated tables that shows the create table/constraints, etc. This is so that I can reproduce everything in the schema in another database (i.e. dev/test/prod) cleanly. Also would like to see the constraints it is generating, etc. Is there a way to do this with derby? thanks, Mike Have you looked at the dblook tool? See Derby Tools and Utilities Guide, http://db.apache.org/derby/manuals/index.html#docs_10.1, especially http://db.apache.org/derby/docs/10.1/tools/ctoolsdblook.html Hth Myrna
Re: Run Derby with IBMs J9 VM
On 7/27/06, Marc Schlegel [EMAIL PROTECTED] wrote: Hi everybody. I'm trying to get Derby run on the J9 VM on a Windows Mobile 3 Pocket PC. If I'm using the binaries I get an UnsupportedClassVersionError (IDE: Device Developer 5.6). Because of this I'm currently trying to build the derby-src. The problem now is that I need a JDK 1.3 AND 1.4 environment to build! But this way I think that I don't get rid of this UnsupportedClassVersionError. I've downloaded/imported all necessary jar-files (JSR 169, junit, jdbc2_0-stdext). Another Problem is that after I've installed the necessary JDKs I still get an build-error which says *[javac] class file has wrong version 48.0, should be 47.0 *for the 1.4-javac-tasks??? I've installed jdk1.4.2_12. Please, I need help because it's a project work for the university. Thx Hi, An UnsupportedClassVersionError may indicate a mismatch in libraries in your classpath. I am wondering if 0. you are running with the foundation or max libraries (with wsdd5.6, you cannot run with foundation derby) a. it would be possible for you to switch to wctme5.7 (the successor of wsdd5.6) b. you can successfully run your program outside the JDE, using the j9 executables and libraries. I've only run wsdd5.6 on straight Windows (2000), so I'm not sure this is exactly portable, but on windows 2000 I'd could evade the IDE with a command like so: j9 -jcl:max -Xbootclasspath/p:c:/wsdd5.6/ive/lib/jclMax/classes.zip;c:/wsdd5.6/ive/lib/charconv.zip;c:/wsdd5.6/ive/lib/jclMax org.apache.derby.tools.ij to start ij (I'm assuming you've gotten the jdbc classes, mine installed into jclMax). I believe that if you have $JAVA_HOME set to wsdd5.6/bin you shouldn't even need the classes.zip and charconv.zip in the bootclasspath. If you can get your class to go without the IDE, you can start digging for the offending setting... Regarding the build error, maybe someone else can speak up on that, if you follow the instructions in the BUILDING.txt you should be able to get it going...Although...I've never tried building on a Pocket PC. Maybe you can post the contents of your ant.properties? hth Myrna
Re: Run Procedure Switch from sqlserver to apache derby !!
On 4/12/06, Dheeraj Dhiman [EMAIL PROTECTED] wrote: Hello !!I want to switch from sql server to apache Derby for my project .I wanna run a procedure like this in apache derby . create procedure testProcedure( @personid Integer ) asselect fullName , fatherName, age, income, grosssalary from persons where personid = @personid ; But it is not working . How could i write this procedure in apache derby !! Thanks Regards !!Dheeraj Dhiman !! Hi !! Dheeraj !! Dhiman !! Derby does not currently support sql procedures or functions. You can write a java function to do what you want, see for instance our manuals,(see theDocumentation tab off the main Derby page.), the Frequently Asked Questions ( For instance: http://db.apache.org/derby/faq.html#null_args which points to: http://mail-archives.apache.org/mod_mbox/db-derby-user/200602.mbox/[EMAIL PROTECTED] ) Finally,you can search through the derby archives, for instance using nabble, for examples of issues others have brought up in this area. Finally, please stop logging jira issues for questions,and please, please stop the annoying exclamation marks. Seeing you log a JIRA issue, and seeig those exclamation markscertainly made me less interested to answer your question, rather than more, so you're achieving the opposite from what I assume you want to. Myrna
Re: Security Exception running sysinfo/ij
On 4/5/06, Linares, Eduardo [EMAIL PROTECTED] wrote: Hello, I just installed Derby and set my CLASSPATHand PATH variablesand when trying to run sysinfo or ij I get the following exception: Exception in thread main java.lang.SecurityException: no manifiest section forsignature file entry org/bouncycastle/ocsp/OCSPException.class Could someone please give me some feedback on how to fix this? Thanks! Hi Eduardo, BouncyCastle is a encryption provider, so the error seems to indicate you're trying to start the database with encryption (dataEncryption=true?) and probably specifying the encryptionProvider. Is that so? If so, do you have the provider's jar or zip file in your CLASSPATH? Myrna
Re: SecurityManager question
I am wondering - if you run the test program standalone *with* a SecurityManager, what do you get? Myrna On 2/8/06, Rick Hillegas [EMAIL PROTECTED] wrote: I am tracking down a problem with autoloading jdbc drivers when runningfrom jar files under the Derby test harness on jdk1.6. Capsule summary:SUCCESS-1 The drivers correctly autoload (from the information in thejar file) when I run my test program standalone (without a SecurityManager)SUCCESS-2 The drivers also correctly autoload if I run the test under the Derby test harness but disable the SecurityManagerFAILUREHowever, the drivers fail to autoload when I run my testprogram under the default Derby test harness (which sets up aSecurityManager) The vm silently swallows the failure. When I run these test cases withthe the java -verbose flag, I see the following:o For the success cases, the autoloading of the driver is logged.o For the failure (Derby test harness) case, around the same place in the log, I see AccessControlException being loaded. This is never loadedin the success cases.So I seem to have some kind of SecurityManager issue here. But what?Later on in the failure case, I successfully load the driver using Class.forName(). What is different in the Derby harness securityenvironment between autoload time and Class.forName() time? How can Iinstrument vm startup to tease open the swallowedAccessControlException? Would appreciate any advice you may have. Thanks,-Rick
Re: Removing Derby tagline
+1 lets get going... Myrna On 1/25/06, Samer Kanjo [EMAIL PROTECTED] wrote: +1 for remove tagline for now until things can be worked out with Sun orwith a vote. I do like having a tagline. --Samer-Original Message-From: David W. Van Couvering [mailto:[EMAIL PROTECTED]]Sent: Wednesday, January 25, 2006 4:59 PMTo: Derby Discussion; Derby Development Subject: Removing Derby taglineWe 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 isthe tagline.We all voted +1 for the images that had the tagline Pure Java 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 thelogo 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
Re: RE : Set Path
On 1/1/06, hunterfighter [EMAIL PROTECTED] wrote: Here I got a question taht why each time i start my command prompt in Windows XP I need to run the setEmbeddedCP.bat file?Got some other way to set it? [snip] Well, if you *always* want it set,you can of courseset your CLASSPATH environment variable through the normal Windows XP setting: control panel - system - advanced - environment variables. Myrna
Re: derby.war not working
Hi Tom, I always thought derby.war was only supposed to have the web.xml in it. The web.xml refers to org.apache.derby.drda.NetServlet which lives in derbynet.jar. You're supposed to make the derbynet.jar available to the app server's classpath - either plop it somewhere where it will automatically be picked up, or modify the configuration files to include itfrom your favorite location. Myrna On 12/11/05, Thomas Dudziak [EMAIL PROTECTED] wrote: Hi,it seems like the derby.war was not created correctly during the buildof the current release. It is only 729 bytes big and contains only the web.xml file, no jars or other things. And the docs specify the wrongplace for the war - $DERBY_INSTALL/frameworks/NetworkServer/warinstead of $DERBY_INSTALL/lib. http://db.apache.org/derby/docs/10.1/adminguide/cadminservlet98430.htmlregards,Tom
Re: how to use schema names , it allways return error for me.
On 11/5/05, Legolas Woodland [EMAIL PROTECTED] wrote: hi Thank you for reading my post. i tried to execute following statement but it return the exception that the table does not exists , i tried several cobination of and ' around the schema and table name with no luck. INSERT INTO APP.table2( data, data2 ) VALUES ( ?, ? ) This statement return Table 'APP.TABLE2' does not exist. can some one help me ? is there any way to pass schema name in connection url ? or set the schema to a default one? -- Your table2 is probably not in the APP schema like you expect.If you log on using a username, that username is assumed to be the desired schema for things to get created in. If you do not want that to be your schema, you need to explicitly switch to another schema (and possibly create it first), or explicitly qualify each create with the intended schemaname. Else, if youcreate a table (not necessarily other database objects, but I think that was a bug),a newschema will automatically be created. APP is the default schema, it always exists. set schema schemaname is the ijSQL to set/switch to a named schema. create schema schemaname would explicitly create a non-existing schema You can select things from sys.systables joined with sysschemasto see in which schema your table2 ended up. something like this: select t.tablename, s.schemaname from sys.systables t, sys.sysschemas s where t.schemaid=s.schemaid; Myrna
Re: Error 25502 during update (was Re: Error messages)
On 6/13/05, Edson Carlos Ericksson Richter [EMAIL PROTECTED] wrote: Currently, I'm getting error ERROR 25502-... stating I can issueupdate command because database, connection or user is read only. But I'm getting the connection same way I issue for every operation, anddon't know why it's saying readonly. I suspect the real problem isbecause I'm trying to update a column that has a reference to another table, and the constraint is ON UPDATE NO ACTION.Could be this possible? May be the pt_BR message is wrong for this errorcode?[snip...] Well...the pt_BR en message are in sync...as far as I can read portuguese, that is. I think your hunch is probably correct. To find out more, you could debug what's happening. If you add derby.infolog.append=true derby.language.logStatementText=true derby.stream.error.logSeverityLevel=0 in a file derby.properties where your database is sitting then you should find more helpful info (if overmuch) in the derby.log. Myrna
Re: test
On Apr 7, 2005 6:44 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: test, why ain't I gettin' no posts from this list? hehe :-{ -- ._ :| .| |.|/.|_ :|__.|_|.|\.|_ :0421 276 282. OK, but this may not be much help: What owner do other files created by your app server process get? It seems to me this is not in the hands of Derby - but files get created by whatever user is running the process that creates it... Hence when/if you were just using the embedded driver in a simple app, then the owner will be whichever user started the java process. With a servlet, I would think the app server is/starts the java process that builds the database, and thus the owner would be the owner that starts the app server. Any other thoughts? Myrna