Bug 167799 - Use Wizard to Create Table... generate error in Base
Summary: Use Wizard to Create Table... generate error in Base
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:26.2.0
Keywords:
: 170417 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-08-04 03:03 UTC by prrvchr
Modified: 2026-01-22 21:56 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description prrvchr 2025-08-04 03:03:52 UTC
Description:
If in Base you use the wizard to create a table you will see an error on the screen:

Aug 04, 2025 4:54:42 AM com.sun.star.wizards.db.DBMetaData supportsPrimaryKeys
SEVERE: null
java.lang.ClassCastException: class java.lang.Boolean cannot be cast to class com.sun.star.uno.Any (java.lang.Boolean is in module java.base of loader 'bootstrap'; com.sun.star.uno.Any is in unnamed module of loader com.sun.star.lib.unoloader.UnoClassLoader @54bedef2)
        at com.sun.star.wizards.db.DBMetaData.supportsPrimaryKeys(DBMetaData.java:722)
        at com.sun.star.wizards.table.TableWizard.buildSteps(TableWizard.java:225)
        at com.sun.star.wizards.table.TableWizard.startTableWizard(TableWizard.java:346)
        at com.sun.star.wizards.table.CallTableWizard$TableWizardImplementation.trigger(CallTableWizard.java:80)

sdbc.ResultSetBase() 1 method: getCatalogs
sdbc.ResultSetBase() 1 method: getSchemas
warn:legacy.osl:152607:152607:toolkit/source/controls/unocontrolmodel.cxx:374: ImplGetDefaultValue - unknown Property
warn:legacy.osl:152607:152607:toolkit/source/controls/unocontrolmodel.cxx:374: ImplGetDefaultValue - unknown Property
warn:legacy.osl:152607:152607:toolkit/source/controls/unocontrolmodel.cxx:374: ImplGetDefaultValue - unknown Property
warn:toolkit.helper:152607:152607:toolkit/source/helper/unowrapper.cxx:188: UnoWrapper::SetWindowInterface: there is already a WindowPeer/ComponentInterface for this VCL window
Aug 04, 2025 4:54:43 AM com.sun.star.wizards.db.DBMetaData supportsPrimaryKeys
SEVERE: null
java.lang.ClassCastException: class java.lang.Boolean cannot be cast to class com.sun.star.uno.Any (java.lang.Boolean is in module java.base of loader 'bootstrap'; com.sun.star.uno.Any is in unnamed module of loader com.sun.star.lib.unoloader.UnoClassLoader @54bedef2)
        at com.sun.star.wizards.db.DBMetaData.supportsPrimaryKeys(DBMetaData.java:722)
        at com.sun.star.wizards.table.TableWizard.insertFormRelatedSteps(TableWizard.java:329)
        at com.sun.star.wizards.table.TableWizard.startTableWizard(TableWizard.java:349)
        at com.sun.star.wizards.table.CallTableWizard$TableWizardImplementation.trigger(CallTableWizard.java:80)

Steps to Reproduce:
- Launch ./soffice from a terminal.
- Go to Base and use the Wizard to create table.
- You will see the error given in the description.

Actual Results:
Error

Expected Results:
no error


Reproducible: Always


User Profile Reset: No

Additional Info:
I will propose a PR to resolve this.
Comment 1 Commit Notification 2025-08-04 06:12:29 UTC
prrvchr committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ea28f64933fa7c8a3f747da98257ae1f70167a3c

tdf#167799 Fix wizard to create table in Base

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 2 Mike Kaganski 2025-08-04 06:55:10 UTC
(In reply to prrvchr from comment #0)
> Steps to Reproduce:
> - Go to Base and use the Wizard to create table.

Sigh. It seems that you will not start taking the process of filing bugs seriously, until you start to get a stream of similarly awful bug reports yourself.

Yes, you provides a "PR" (no we don't use github, and PRs are not what we use); and you think, that your "description" is enough. But no one will be able to reproduce: your crucial step is squeezed into a meaningless "use the Wizard to create table", without telling the driver you used, or types you defined.

And without that, your "PR" (or, rather, description) will create troubles, when later someone needs to change that code again. They will look into the git history, and find your change; they will seek for the linked bug report, and get here; and they will try to repro, and fail. And they will be unable to conclude, if their new change will break your bug or not.
Comment 3 prrvchr 2025-08-04 12:22:52 UTC
@Noel Grandin thanks for the merge...
Comment 4 prrvchr 2025-08-04 12:30:30 UTC
@ Mike Kaganski I'm sorry I couldn't do better.

However, in Java, I've never seen a cast with an Any, and it seems to me that it can't work. So it's a very simple solution...
Comment 5 Julien Nabet 2026-01-22 21:56:40 UTC
*** Bug 170417 has been marked as a duplicate of this bug. ***