Bower, John | 16 Apr 23:25 2014

Feedback releases/release-10.10.2.0.html

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.

Frank Rivera | 11 Apr 18:33 2014

--DERBY-PROPERTIES throws error


We have a simple query using LIKE but is very slow. 
We need to tell the optimizer which index to use but the override DERBY-PROPERTIES statement returns the following error. 

Invalid syntax for optimizer overrides. The syntax should be -- DERBY-PROPERTIES propertyName = value [, propertyName = value]*

Here is the SQL. The index does exist.

SELECT 
esq.attachment.guid, esq.attachment.file_name 
FROM 
esq.attachment 
--DERBY-PROPERTIES index = ATTACHMENT_LINKNAMES_INDEX
where 
(   
  esq.attachment.file_name  LIKE ‘%drisco%' 
   OR esq.attachment.file_index_name  LIKE ‘%drisco%' 
)
AND
(
        esq.attachment.link_guid IS NOT NULL 
        AND 
        esq.attachment.link_table='mat'  
        AND 
        esq.attachment.link_guid IN (
                SELECT esq.matter.guid 
                FROM esq.matter 
                WHERE 
                esq.matter.guid=esq.attachment.link_guid 
                AND ( 
( esq.matter.grp_guid=0 OR esq.matter.grp_guid IS NULL ) OR ( esq.matter.grp_guid>0 AND esq.matter.grp_guid IN ( 2,1,6,4,3 ) ) 
)   
                        
        )
) ;
   


Sincerely,

  Frank Rivera
LogicBit Software - Research Triangle Park, North Carolina

  Support  919.238.7024 Corporate  408.213.8138 Sales  888.366.2280

  HoudiniEsq ® Legal Practice Management Suite http://HoudiniEsq.com        

 

  Feature Rich web-based Legal Practice Management for today's cutting edge Law Firms
  Any Browser, Any OS, Anytime, Anywhere, Any size organization, SaaS or On-premise     

Simple & Simplicity are not the same thing. "Simple", as it turns out, simply isn't good enough.
-----------------------------------------------------------------------------------------------------------------
NOTICE: The sender does not accept liability for any errors or omissions in the contents of this message which arise as 
a result of e-mail transmission.  This e-mail and any files transmitted with it are confidential and are intended solely for 
the use of the individual or entity to which they are addressed. It is not an offer or acceptance, and it is not intended to 
be all or part of an agreement.  This communication may contain material protected by the attorney-client privilege.  
Original material created by the author may be protected by US Copyright law, 17 U.S.C. § 101 et seq. This communication 
constitutes an electronic communication within the meaning of the Electronic Communications Privacy Act, 18 U.S.C. 
§ 2510, and its disclosure is strictly limited to the recipient intended by the sender of this message.   If you are not the 
intended recipient or the person responsible for delivering the e-mail to the intended recipient, be advised that you have 
received this e-mail in error and that any review, use, dissemination, forwarding, printing, or copying of this e-mail is strictly 
prohibited. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete this email. 

Chux | 6 Apr 15:50 2014
Picon

When to shut down a database

Hello guys,

I read in a sample app that you've got to shutdown a database. I was just confused if you need to shut it down on every connection transaction or just shut it down on application close, in my case a desktop applicaiton.

Best,
Chux
Ajay Kumar Srivastava | 3 Apr 14:58 2014
Picon

JBoss AS 7 integration with Derby 10.10

Hi , I am struggling with crating JNDI connection with JBOSS for derby. When I try to access table from a Servlet  I use to get error 

Caused by: javax.resource.ResourceException: Wrong driver class [class org.apache.derby.jdbc.ClientDriver] for this connection URL [jdbc:derby:DerbyDB;create=true]


--
With Regard's

Ajay Kumar Srivastava

mail: ajaykumar.srivastava-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Bert Lamb | 22 Mar 01:28 2014
Picon

ERROR XSAI2: The conglomerate (65) requested does not exist.

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
Bob M | 18 Mar 09:06 2014
Picon

SQL State: 40XL1

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: 30000
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.

Bob M | 16 Mar 18:54 2014
Picon

Adding a new record to a table

On a regular basis I add a new record and delete the oldest record in my
table
The records have a key and up until recently were listed by date/time order
as I wish to have them

I understand that this is unnecessary but it is great to always find the
latest records at the end of the table

Now, after a tweek in the code, my newest records are being written at the
beginning of the table next to the oldest records ?????

What code do I need to add, so that when any new record is added, it will
appear at the end of the table and not at the beginning ?

Thanks

Bob M

--
View this message in context: http://apache-database.10148.n7.nabble.com/Adding-a-new-record-to-a-table-tp138004.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Wojciech Barej | 13 Mar 11:21 2014

Turning on SQL authorization results in loss of table's ownership and permissions

Dear All,

I have a following problem with SQL authorization:

The database created in Java DB (Derby) was set-up as follows to allow authentication and authorization:

    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.connection.requireAuthentication','true');

    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.user.normal', 'normal');
    
    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.fullAccessUsers', 'sa');
    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.readOnlyAccessUsers', 'normal');
    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.defaultConnectionMode', 'readOnlyAccess');

The "sa" username was created during database creation so it is the owner of the database.

And this works as intended. I can log in as "sa" user and have full access. Or log in as "normal" users and be restricted to read only access.


Now, I want to use SQL authorization to grant specific permissions to specific users.
To do this I have to switch on SQL authorization first by executing following command:

    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.database.sqlAuthorization', 'true');

Problem is, that after login in again under "sa" the system reports that I have no rights for SELECT and other statements. Moreover I loose complete ownership on the database.

Why Derby suddenly denies access to any user including the owner after executing the statement that switches on the SQL authorization?

P.S. I use Apache Derby Network Server - 10.9.1.0 which was a part of Java EE 7 installation for NetBeans 7.3

P.S 2. When after SQL authorization is set to true I try to use GRANT statement I receive following SQL error code:

    SQL state 42506: User 'SA' is not the owner of Table/View 'SA'.'DOCTYPES'.

Even though the whole database was created using this username.

Phil Bradley | 10 Mar 12:49 2014
Picon

Corrupt database: ArrayIndexOutOfBoundsException on connect


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 <at> 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 <at> 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: java.lang.ArrayIndexOutOfBoundsException
	at java.lang.System.arraycopy(Native Method)
	at
	org.apache.derby.impl.store.raw.data.AllocPage.ReadContainerInfo(Unknown
	Source)
	at
	org.apache.derby.impl.store.raw.data.FileContainer.readHeader(Unknown
	Source)
	at org.apache.derby.impl.store.raw.data.RAFContainer.run(Unknown
	Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at
	org.apache.derby.impl.store.raw.data.RAFContainer.openContainer(Unknown
	Source)
	at
	org.apache.derby.impl.store.raw.data.RAFContainer4.openContainer(Unknown
	Source)
	at
	org.apache.derby.impl.store.raw.data.FileContainer.setIdent(Unknown
	Source)
	at
	org.apache.derby.impl.store.raw.data.FileContainer.setIdentity(Unknown
	Source)
	at
	org.apache.derby.impl.services.cache.ConcurrentCache.find(Unknown
	Source)
	at
	org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown
	Source)
	at
	org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openDroppedContainer(Unknown
	Source)
	at
	org.apache.derby.impl.store.raw.xact.Xact.openDroppedContainer(Unknown
	Source)
	at
	org.apache.derby.impl.store.raw.data.ContainerBasicOperation.findContainer(Unknown
	Source)
	at
	org.apache.derby.impl.store.raw.data.ContainerBasicOperation.needsRedo(Unknown
	Source)
	at org.apache.derby.impl.store.raw.log.FileLogger.redo(Unknown
	Source)
	at org.apache.derby.impl.store.raw.log.LogToFile.recover(Unknown
	Source)
	at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
	at
	org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown
	Source)
	at
	org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
	Source)
	at
	org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown
	Source)
	at
	org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown
	Source)
	at
	org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown
	Source)
	at
	org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown
	Source)
	at
	org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown
	Source)
	at
	org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown
	Source)
	at
	org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown
	Source)
	at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown
	Source)
	at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
	at
	org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown
	Source)
	at
	org.apache.derby.impl.services.monitor.TopService.bootModule(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)
	... 24 more
2014-03-08 06:10:59,357 javawsApplicationMain ERROR  Initialisation
error [40000] [XJ040] Failed to start database
'C:\Users\Administrator\.myapp\myapp_db' with class loader
com.sun.jnlp.JNLPClassLoader <at> 1bef5e8, see the next exception for
details.
2014-03-08 06:10:59,357 javawsApplicationMain ERROR Initialisation error
[0] [XJ001] Java exception: ':
java.lang.ArrayIndexOutOfBoundsException'.

EagleS | 10 Mar 09:14 2014
Picon

deleting a corrupted database with invalid checksum on page

Hi,

I have a database table POS_RESOURCES.RESOURCES that has been corrupted.
There is a Mirror file to this so easy to recreate it but I am unable to
delete it due to the corruption.

Whatever I try and do to the table I get them same result of:

SQLState:  08006
ErrorCode: 40000
Error: DERBY SQL error: SQLCODE: -1, SQLSTATE: XSDG2, SQLERRMC: Invalid
checksum on Page Page(0,Container(0, 474144)), expected=229,350,622, on-disk
version=1,888,684,690, page dump follows: Hex dump:
00000000: 0076 0000 0001 0000 0000 0000 93b4 0000  .v..........モᄡ..
00000010: 0000 0006 0000 0000 0000 0000 0000 0000  ................
00000020: 0000 0000 0001 0000 0000 0000 0000 0000  ................
And the hex dump continues for ages.

What can I do to just delete this table and then rebuild it from the Mirror
file? 

Thanks.

--
View this message in context: http://apache-database.10148.n7.nabble.com/deleting-a-corrupted-database-with-invalid-checksum-on-page-tp137773.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

hirschniesel | 23 Feb 18:24 2014
Picon
Picon

Connect to derby database on raspberry pi

Hi,

I installed the apache derby db on my raspberry pi as described under

http://dev.uhilger.de/dok/ulrich/Artikel/Serverbetrieb/Serveranleitung

There ist described, that I should copy the derby.jar, derby.jar,
derbynet.jar and derbyclient.jar into the tomcat lib folder and the
derby.war into the tomcat webapp folder. The database should be available
under the URL raspberry-IP:8443 and so it is. The page under this URL says,
that the database server runs under port 1527. But I can´t get a connection
to the database from my windows 7 PC. I checked my firewall (comodo) and
opened the port 1527. Although I checked my router, and opened in the
integrated firewall the port. But nothing changed. Can anyone help me and
give me a hind, what I can do?
I tried to get the connection via ij-tool on the command line, but I get the
error:
Error 08001 Connection refused

Thanks for every help.
Andreas

--
View this message in context: http://apache-database.10148.n7.nabble.com/Connect-to-derby-database-on-raspberry-pi-tp137344.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Gmane