Bug 50783 - Can't create database or access table in Base
Summary: Can't create database or access table in Base
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.6.0.0.alpha1
Hardware: All Linux (All)
: medium blocker
Assignee: Not Assigned
URL:
Whiteboard: target:3.6.0.0.beta1 target:3.7.0
Keywords:
Depends on:
Blocks: mab3.6
  Show dependency treegraph
 
Reported: 2012-06-06 04:58 UTC by Petr Mladek
Modified: 2012-08-03 04:11 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Test document (5.00 KB, application/vnd.oasis.opendocument.database)
2012-06-06 04:58 UTC, Petr Mladek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Mladek 2012-06-06 04:58:58 UTC
Created attachment 62669 [details]
Test document

Base is almost unusable in 3.6-alpha1 and master. I am unable to create new database. Also I am not able to access table in an older database.

The strange thing is that I am able to access table from ~/.config/libreoffice/3/user/database/biblio.odb. I wonder if this database is created using another driver.


Steps to reproduce (existing database):

1. Open the attached test.odb
2. Click "Tables" button in the left box

Result: Error message:

         'The connection to the data source "test" could not be established.
          org/hsqldb/lib/FileSystemRuntimeException'



Another steps to reproduce (creating new database)

1. Start LibreOffice
2. Select in menu File/New/Database
3. Make sure that "Create new database" is selected and press the button 
   "Finish"
4. Enter database name, e.g. "test-new.odb" and press "Enter"

Result: Error message (same as above):
        
        'The connection to the data source "test" could not be established.
         org/hsqldb/lib/FileSystemRuntimeException'
Comment 1 Lionel Elie Mamane 2012-06-06 05:09:26 UTC
Darn.

All your examples are about embedded HSQLDB; did you try *any* other database driver?

Yes, biblio.odb is not an embedded HSQLDB database, but is a connection to a DBase 3 database; the data is in file biblio.dbf / .dbt

This suggests *only* (embedded) HSQLDB is broken.

Haven't got a 3.6/3.7 build yet, so it will take me some time before I can take a look.
Comment 2 Petr Mladek 2012-06-06 06:35:28 UTC
It works in the daily build
http://dev-builds.libreoffice.org/daily/Linux-x86_64_11-Release_Configuration/master/2012-05-23_15.09.58/, so it is relatively new regression.
Comment 3 Petr Mladek 2012-06-06 06:55:08 UTC
It was enough to exchange sdbc_hsqldb.jar between the working on non-working build.
Comment 4 Petr Mladek 2012-06-06 07:10:23 UTC
One change is that org/hsqldb/lib/FileSystemRuntimeException.class is missing in the broken sdbc_hsqldb.jar. I guess that it is related to gbuildification.
Comment 5 Petr Mladek 2012-06-06 07:39:28 UTC
--- a/connectivity/Jar_sdbc_hsqldb.mk
+++ b/connectivity/Jar_sdbc_hsqldb.mk
@@ -39,6 +39,8 @@ endif
 
 $(eval $(call gb_Jar_set_packageroot,sdbc_hsqldb,com))
 
+$(eval $(call gb_Jar_add_packagedir,sdbc_hsqldb,org))
+
 $(eval $(call gb_Jar_add_sourcefiles,sdbc_hsqldb,\
        connectivity/com/sun/star/sdbcx/comp/hsqldb/FileSystemRuntimeException \
        connectivity/com/sun/star/sdbcx/comp/hsqldb/NativeInputStreamHelper \

solved the missing org/hsqldb/lib/FileSystemRuntimeException.class.

I am able to create new table now. I am still unable to open the table of the attached test.odb. It fails with the error:

--- cut ---
'The connection to the data source "test" could not be established.

General error: java.lang.UnstatisfiedLinkError:
com.sun.star.sdbcx.hsqldb.StorageFileAccess.isStreamElement(Ljava/lang/String;Ljava/lang/String;)Z
--- cut ---

So, there is another quirk. Also in this case, it helps to use sdbc_hsqldb.jar from http://dev-builds.libreoffice.org/daily/Linux-x86_64_11-Release_Configuration/master/2012-05-23_15.09.58/
Comment 6 Petr Mladek 2012-06-06 07:50:54 UTC
The other difference is that "Class-Path: hsqldb.jar  .." is missing in MANIFEST.MF. Also this looks related to gbuildification.
Comment 7 Petr Mladek 2012-06-06 08:32:36 UTC
It started to work after I added the Class-path into MANIFEST.MF. The fix is in master and 3-6 branch now.
Comment 8 Not Assigned 2012-06-06 08:32:58 UTC
Petr Mladek committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=203707c0591021d827b1de855f977cdb4c8cfd47&g=libreoffice-3-6

make hsql database working again (fdo#50783)


It will be available in LibreOffice 3.6.
Comment 9 Not Assigned 2012-06-06 08:33:29 UTC
Petr Mladek committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7a86071a9cb2c3ceb8f3efc6345889ae4638a91f

make hsql database working again (fdo#50783)
Comment 10 Terrence Enger 2012-06-08 04:45:17 UTC
The problem persists for me with master commit 96caa3b on ubuntu-natty (11.04).

I did an incremental build.  Should that be sufficient?
Comment 11 Petr Mladek 2012-06-08 04:52:42 UTC
Terrence, I am afraid that incremental build is not sufficient. Please, try to rebuild the whole connectivity module. You might use the following two commands from the root build dir:

    make connectivity.clean
    make connectivity
Comment 12 Rainer Bielefeld Retired 2012-06-09 04:13:18 UTC
Part of problem still visible with WIN 3.6.0Beta, see "Bug 50910 - Impossible to access particular spreadsheet based database table".

This here really "Linux Only"?