derby network server start problem
2014-10-28 09:51:17 GMT
From documentation, Derby is supposed to implement JDBC4.2 which introduces JSR 310 (Date & Time API) support into JDBC (among other things). Reading http://openjdk.java.net/jeps/170, I would have thought the following code would work, but it doesn't: What's the supposed way of reading/writing JSR 310 types from/into JDBC database? -- View this message in context: http://apache-database.10148.n7.nabble.com/JSR310-and-JDBC-4-2-tp143066.html Sent from the Apache Derby Users mailing list archive at Nabble.com.
I've experienced an unrepairable windows crash. After reinstall of windows and derby I'm trying to reconnect to the files that is the "production" database. BUT I can only access it by means of the embedded driver. Access through the net is rejected ... maybe due to some security meassure that I haven't been able to find documented. To be honest I'm using netbeans and javadb, which might complicate things.-) But ij also doesn't work with the net driver.
Hi, I am getting below error even after the derby server and the server machine had been shutdown and brought up again. Might this indicate the data base is corrupt? Is ther any way to further diagnose what is going on? Thanks java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ040, SQLERRMC: Failed to start database 'PMT' with class loader sun.misc.Launcher$AppClassLoader <at> 77cde100, see the next exception for details.::SQLSTATE: XSDB6Another instance of Derby may have already booted the database /webs/web1540/pmtdata/PMT. at java.util.concurrent.FutureTask.report(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at net.sourceforge.squirrel_sql.client.mainframe.action. OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:132) at net.sourceforge.squirrel_sql.client.mainframe.action. OpenConnectionCommand.access$100(OpenConnectionCommand.java:45) at net.sourceforge.squirrel_sql.client.mainframe.action. OpenConnectionCommand$2.run(OpenConnectionCommand.java:115) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.RuntimeException: java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ040, SQLERRMC: Failed to start database 'PMT' with class loader sun.misc.Launcher$AppClassLoader <at> 77cde100, see the next exception for details.::SQLSTATE: XSDB6Another instance of Derby may have already booted the database /webs/web1540/pmtdata/PMT. at net.sourceforge.squirrel_sql.client.mainframe.action. OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:171) at net.sourceforge.squirrel_sql.client.mainframe.action. OpenConnectionCommand.access$000(OpenConnectionCommand.java:45) at net.sourceforge.squirrel_sql.client.mainframe.action. OpenConnectionCommand$1.run(OpenConnectionCommand.java:104) ... 5 more Caused by: java.sql.SQLException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ040, SQLERRMC: Failed to start database 'PMT' with class loader sun.misc.Launcher$AppClassLoader <at> 77cde100, see the next exception for details.::SQLSTATE: XSDB6Another instance of Derby may have already booted the database /webs/web1540/pmtdata/PMT. at org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) at org.apache.derby.jdbc.ClientDriver.connect(Unknown Source) at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager. getConnection(SQLDriverManager.java:133) at net.sourceforge.squirrel_sql.client.mainframe.action. OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:167) ... 7 more Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error: SQLCODE: -1, SQLSTATE: XJ040, SQLERRMC: Failed to start database 'PMT' with class loader sun.misc.Launcher$AppClassLoader <at> 77cde100, see the next exception for details.::SQLSTATE: XSDB6Another instance of Derby may have already booted the database /webs/web1540/pmtdata/PMT. at org.apache.derby.client.am.Connection.completeSqlca(Unknown Source) at org.apache.derby.client.net.NetConnectionReply. parseRdbAccessFailed(Unknown Source) at org.apache.derby.client.net.NetConnectionReply. parseAccessRdbError(Unknown Source) at org.apache.derby.client.net.NetConnectionReply. parseACCRDBreply(Unknown Source) at org.apache.derby.client.net.NetConnectionReply. readAccessDatabase(Unknown Source) at org.apache.derby.client.net.NetConnection. readSecurityCheckAndAccessRdb(Unknown Source) at org.apache.derby.client.net.NetConnection. flowSecurityCheckAndAccessRdb(Unknown Source) at org.apache.derby.client.net.NetConnection.flowUSRIDPWDconnect(Unknown Source) at org.apache.derby.client.net.NetConnection.flowConnect(Unknown Source) at org.apache.derby.client.net.NetConnection.<init>(Unknown Source) at org.apache.derby.client.net.NetConnection40.<init>(Unknown Source) at org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40. newNetConnection(Unknown Source) ... 10 more
I was wondering what people would think about trying to crowd-fund new Derby features and bug fixes. Right now, the Derby developers tend to focus on features and bugs which are important to their employers. This does not address the needs of smallish companies and products which can't afford to pay a full-time developer to work on Derby. But maybe a smallish company could afford to carry, say, 1/20th of the cost of a feature or bug fix. If this appeals to the community, I'd be happy to brainstorm how we could crowd-fund more Derby development. Any interest? Thanks, -Rick
Hi Kent, I'm moving this discussion to the derby-user@... mailing list so that it will be archived in case anyone else is interested later on. The work on DERBY-3946 was superseded by the work on DERBY-4415. I've resolved DERBY-3946. Hopefully that will help point people at DERBY-4415 so that they don't spend too much time wrestling with the old approach. The solution on DERBY-4415 works with production (non-debug) engines. I have just verified that it still works with the latest 10.11.1.1 release. What I recommend is this: Write your own custom version of XmlASTPrinter. Then follow DERBY-4415's instructions for printing an xml-formatted tree: connect 'jdbc:derby:memory:dummy;create=true'; create table t( a int ); call syscs_util.syscs_register_tool( 'customTool', true, 'ASTInspector', 'XmlASTPrinter' ); select * from t; call syscs_util.syscs_register_tool( 'customTool', false, 'ASTInspector' ); – now look for the output in derbyAST.xml Feel free to ask more questions or make more suggestions, either on this email thread or on DERBY-4415. Hope this helps, -Rick On 10/13/14 3:36 PM, Kenton Garner wrote: > > Rick, > > I have been looking for a SQL Parser for a while now with no success ( > various ANTLR/ JAVACC examples came close – but no joy ). > > Today I came across a discussion about the support you added to Derby > to allow it to be used to generate Abstract Syntax Trees. This is great! > > I have to be able to take SQL statements parsed from a log for basic > DML ( INSERT, UPDATE, DELETE ) and be able to convert the SQL to a > custom XML format and potentially re-apply the SQL programmatically to > another database. > > I know your work for this was done a while ago, but I would love to > make use of it. This is what I have done so far. > > 1.Download the debug version of the Derby libs from db.apache.org > (Derby distributed with Java 7 JDK does not work here). > > 2.Update your sample ASTParser.java and TreeWalker.java to use the > “org.apache.derby.shared.common.sanity.SanityManager”. > > 3.Read your discussions on the Derby jira page in regards to the > TreeWalker/Visitor and class relationships. > > 4.Ran some tests with basic INSERT SQL Statement. > > It appears that since this is using an in memory database that I do > not have to have a data dictionary or other details pre-existing in > the database for the basic SQL Parsing to work. – Great News! > > Note: I would be glad to ask my questions in another forum if you > prefer, but I do not know how to add questions to the Derby jira page. > > My question is basically… > > Since both the ASTParser and the TreeWalker make use of package level > calls that I have no access to; And knowing the node class from the > TreeWalker does not provide me any greater access to the information > that I need. How would you recommend I make best use of this code? > > My first though was that I would have to modify the Derby code to get > access to package, protected and private methods/variables – but I > would obviously rather not alter the Derby code. Do you have any > suggestions? Perhaps I am missing the obvious. > > Thank you so much. > > -Kent > > -------------------------------------------------- > > Kent Garner > Software Engineer, CDS Engineering > > Global Enterprise Solutions Division > > cid:image001.jpg@... > > *Intelligent Software Solutions* > 111 Langley Road Rome, NY 13441-4003 > > 315.371.4850 >
I created an udf (defined as contains sql) and a procedure (defined as modifies sql data). The function eventually calls the procedure, but its get an exception that says that the function attempted to change data but is not defined as modifies sql data. Derby reference states that a derby function cannot be defined with modify sql data. Is there any way to permit the function executing registered procedures even if they change data? Thank you for any information.
Hi I have an application which opens a derby database and then does some things with table A I have now cloned this application to give me three applications which are 98% identical App 1 opens the database and actions table 1 App 2 opens the same database and actions table 2 App3 opens the same database and actions table 3 I wish to run the three Apps simultaneously and here I run into problems.... "another instance of Derby may have already booted the database" If I wish to retain the current setup of just one database with various tables what changes do I need to make to the current coding? Bob M Dunedin New Zealand -- View this message in context: http://apache-database.10148.n7.nabble.com/Multiple-open-close-of-a-derby-database-tp142454.html Sent from the Apache Derby Users mailing list archive at Nabble.com.
I tried granting select on sysusers, but this table is accessible only by db owner. Is there a way to have a simple user, maybe with a specific role, to list user names?
The link : http://db.apache.org/derby/docs/dev/tools/ttoolsij98878.html (Tool and Utilities Guide) cannot be found.
The link is located at the bottom of page: https://db.apache.org/derby/papers/DerbyTut/ij_intro.html
Met vriendelijke groeten/ Kind regards,
Han van Straaten
Contractor to Shell
Shell Global Solutions International BV
P.O. Box 38000, 1030 BN Amsterdam, The Netherlands