Generate Model getting NullPointerException (Maria DB)

I am getting NullPointerException when:

  1. Click Generate model
  2. Select the table
  3. Click Next

I am using MariaDB connector named as mysql-connector-java. The connection works fine and I can create new entities.


[17:55:27.913] Exception has been thrown by com.haulmont.studio.ui.app.a@2b670378:
[17:55:27.915] java.lang.NullPointerException

 at org.mariadb.jdbc.internal.queryresults.resultset.MariaSelectResultSet.close(MariaSelectResultSet.java:483)

 at com.haulmont.studio.backend.d.a.d(SourceFile:601)

 at com.haulmont.studio.backend.d.a.a(SourceFile:220)

 at com.haulmont.studio.backend.d.a.a(SourceFile:112)

 at com.haulmont.studio.backend.d.d.a(SourceFile:125)

 at com.haulmont.studio.backend.d.d.a(SourceFile:133)

 at com.haulmont.studio.ui.b.d.e.a(SourceFile:304)

 at com.haulmont.studio.ui.b.h.buttonClick(SourceFile:527)

 at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)

 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

 at java.lang.reflect.Method.invoke(Method.java:497)

 at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:508)

 at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:198)

 at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:161)

 at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1008)

 at com.vaadin.ui.Button.fireClick(Button.java:377)

 at com.vaadin.ui.Button$1.click(Button.java:54)

 at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)

 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

 ...
[17:55:27.917] Unexpected error
java.lang.NullPointerException

Hi, Igor.

It is a known issue of MariaDB Connector/J 1.5.6.
JDBC driver(1.5.6) sometimes incorrectly closes ResultSet when CUBA Studio gets meta information about database.
You can try to download MariaDB Connector/J 1.4.6, the problem should be solved.

Lifesaver!!! it worked like a charm! Thanks a lot