Trying to use Derby with LibreOffice Base -- can't start AWT [closed]

asked 2014-03-05 17:46:59 +0200

jrop gravatar image

updated 2015-09-11 21:41:52 +0200

Alex Kemp gravatar image

I am trying to use Apache Derby with LibreOffice Base. I am on OSX. I have gone into Preferences -> Advanced, and added derby.jar to the class path. However, when I create a new connection, I select JDBC, and enter org.apache.derby.jdbc.EmbeddedDriver as the driver class. When I click "Test Class", it replies "The JDBC Driver could not be loaded".

Below is what I see when inspecting standard out (or standard error):

2014-03-05 09:37:17.365 soffice[1972:507] Apple AWT Java VM was loaded on first thread -- can't start AWT.
Exception in thread "Thread-1" java.lang.InternalError: Can't start the AWT because Java was started on the first thread.  Make sure StartOnFirstThread is not specified in your application's Info.plist or on the command line
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(
    at java.lang.ClassLoader.loadLibrary(
    at java.lang.Runtime.loadLibrary0(
    at java.lang.System.loadLibrary(
    at Method)
    at java.awt.Toolkit.loadLibraries(
    at java.awt.Toolkit.<clinit>(
    at sun.awt.AppContext$
    at sun.awt.AppContext$
    at Method)
    at sun.awt.AppContext.initMainAppContext(
    at sun.awt.AppContext.access$200(
    at sun.awt.AppContext$
    at Method)
    at sun.awt.AppContext.getAppContext(
    at com.sun.jmx.trace.Trace.out(
    at com.sun.jmx.trace.Trace.isSelected(
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.isTraceOn(
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(
    at com.sun.jmx.mbeanserver.JmxMBeanServer$
    at Method)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.initialize(
    at com.sun.jmx.mbeanserver.JmxMBeanServer.<init>(
    at com.sun.jmx.mbeanserver.JmxMBeanServer.<init>(
    at com.sun.jmx.mbeanserver.JmxMBeanServer.newMBeanServer(
    at ...
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2016-02-20 06:33:02.690848


No idea if you can use Derby with Base on OSX, but that AWT error comes from the AWT wanting to attach to the first thread of the LO process in order to instantiate the JVM, unfortunately this is already taken by the Apple JVM. This was a known problem with older versions of LibreOffice - which version are you using ?

Alex Thurgood gravatar imageAlex Thurgood ( 2014-10-21 18:07:30 +0200 )edit