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(ClassLoader.java:1833)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1730)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1044)
    at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.loadLibraries(Toolkit.java:1605)
    at java.awt.Toolkit.<clinit>(Toolkit.java:1627)
    at sun.awt.AppContext$2.run(AppContext.java:240)
    at sun.awt.AppContext$2.run(AppContext.java:226)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.awt.AppContext.initMainAppContext(AppContext.java:226)
    at sun.awt.AppContext.access$200(AppContext.java:112)
    at sun.awt.AppContext$3.run(AppContext.java:306)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.awt.AppContext.getAppContext(AppContext.java:287)
    at com.sun.jmx.trace.Trace.out(Trace.java:180)
    at com.sun.jmx.trace.Trace.isSelected(Trace.java:88)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.isTraceOn(DefaultMBeanServerInterceptor.java:1830)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:929)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:916)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)
    at com.sun.jmx.mbeanserver.JmxMBeanServer$2.run(JmxMBeanServer.java:1195)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.initialize(JmxMBeanServer.java:1193)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.<init>(JmxMBeanServer.java:225)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.<init>(JmxMBeanServer.java:170)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.newMBeanServer(JmxMBeanServer.java:1401)
    at javax.management.MBeanServerBuilder.newMBeanServer(MBeanServerBuilder.java:93)
    at javax.management ...
(more)
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

Comments

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