java.sql.SQLException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

MySQL doesn't support some types of characters (such as emojis) with the utf8 encoding. You need to be on MySQL 5.5+ and force utf8mb4 (everywhere, client and server). You can do this sending the query "SET NAMES utf8mb4". Check this https://goo.gl/3E2qzg

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • I created a connection in PSW with my standard mysql information. The same works from PRD. I was using the mysql-connector provided in the tomcat/lib folder of the BI-Server: mysql-connector-java-5.0.7.jar If I replace it with the one in the data-integration-server (mysql-connector-java-3.1.14-bin.jar), connection is fine. While the test works, clicking OK and using the JDBC Explorer and/or a new schema, no db schemas are returned. Error: 23:44:45,955 ERROR [JdbcMetaData] setAllTables java.sql.SQLException: java.lang.NullPointerException at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910) at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPrepared Statement.java:766) at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:874) at com.mysql.jdbc.Statement.createResultSetUsingServerFetch(Statement.ja va:520) at com.mysql.jdbc.Statement.executeQuery(Statement.java:1133) at com.mysql.jdbc.DatabaseMetaData.extractForeignKeyFromCreateTable(Data baseMetaData.java:1141) at com.mysql.jdbc.DatabaseMetaData$5.forEach(DatabaseMetaData.java:3231) at com.mysql.jdbc.DatabaseMetaData$IterateBlock.doForAll(DatabaseMetaDat a.java:76) at com.mysql.jdbc.DatabaseMetaData.getImportedKeys(DatabaseMetaData.java :3219) at mondrian.gui.JdbcMetaData.setAllTables(JdbcMetaData.java:291) at mondrian.gui.JdbcMetaData.setAllSchemas(JdbcMetaData.java:258) at mondrian.gui.JdbcMetaData.<init>(JdbcMetaData.java:67) at mondrian.gui.Workbench.getNewJdbcMetadata(Workbench.java:1975) at mondrian.gui.Workbench.newJDBCExplorerMenuItemActionPerformed(Workben ch.java:1153) at mondrian.gui.Workbench.access$300(Workbench.java:94) at mondrian.gui.Workbench$13.actionPerformed(Workbench.java:612) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.AbstractButton.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
    via by Anthony Carter,
  • I created a connection in PSW with my standard mysql information. The same works from PRD. I was using the mysql-connector provided in the tomcat/lib folder of the BI-Server: mysql-connector-java-5.0.7.jar If I replace it with the one in the data-integration-server (mysql-connector-java-3.1.14-bin.jar), connection is fine. While the test works, clicking OK and using the JDBC Explorer and/or a new schema, no db schemas are returned. Error: 23:44:45,955 ERROR [JdbcMetaData] setAllTables java.sql.SQLException: java.lang.NullPointerException at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910) at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPrepared Statement.java:766) at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:874) at com.mysql.jdbc.Statement.createResultSetUsingServerFetch(Statement.ja va:520) at com.mysql.jdbc.Statement.executeQuery(Statement.java:1133) at com.mysql.jdbc.DatabaseMetaData.extractForeignKeyFromCreateTable(Data baseMetaData.java:1141) at com.mysql.jdbc.DatabaseMetaData$5.forEach(DatabaseMetaData.java:3231) at com.mysql.jdbc.DatabaseMetaData$IterateBlock.doForAll(DatabaseMetaDat a.java:76) at com.mysql.jdbc.DatabaseMetaData.getImportedKeys(DatabaseMetaData.java :3219) at mondrian.gui.JdbcMetaData.setAllTables(JdbcMetaData.java:291) at mondrian.gui.JdbcMetaData.setAllSchemas(JdbcMetaData.java:258) at mondrian.gui.JdbcMetaData.<init>(JdbcMetaData.java:67) at mondrian.gui.Workbench.getNewJdbcMetadata(Workbench.java:1975) at mondrian.gui.Workbench.newJDBCExplorerMenuItemActionPerformed(Workben ch.java:1153) at mondrian.gui.Workbench.access$300(Workbench.java:94) at mondrian.gui.Workbench$13.actionPerformed(Workbench.java:612) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.AbstractButton.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
    via by Anthony Carter,
  • Hello, we encountered an error when using MySQL with the database-structure macro. We used only the dataSource parameter: {database-structure:dataSource=waveDS} Confluence-Version: 4.3.5 Stacktrace: {noformat} 2014-01-29 09:35:51,110 ERROR [TP-Processor6] [confluence.plugins.plantuml.AbstractDatabaseStructureMacroImpl] sqlException SQLException waveDS -- url: /confluence/display/~username/PlantUML+Database+Structure+Test | page: 15466510 | userName: username| referer: http://eudesgjra1wp/confluence/pages/createpage.action?spaceKey=~username&fromPageId=2293975 | action: viewpage java.sql.SQLException: Table not specified. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:926) at com.mysql.jdbc.DatabaseMetaData.getImportedKeys(DatabaseMetaData.java:3305) at org.apache.tomcat.dbcp.dbcp.DelegatingDatabaseMetaData.getImportedKeys(DelegatingDatabaseMetaData.java:314) at de.griffel.confluence.plugins.plantuml.AbstractDatabaseStructureMacroImpl.getForeignKeys(AbstractDatabaseStructureMacroImpl.java:393) at de.griffel.confluence.plugins.plantuml.AbstractDatabaseStructureMacroImpl.createDotForDatabaseStructure(AbstractDatabaseStructureMacroImpl.java:101) at de.griffel.confluence.plugins.plantuml.DatabaseStructureMacroV4$1.executePlantUmlMacro(DatabaseStructureMacroV4.java:81) at de.griffel.confluence.plugins.plantuml.AbstractDatabaseStructureMacroImpl.execute(AbstractDatabaseStructureMacroImpl.java:73) at de.griffel.confluence.plugins.plantuml.DatabaseStructureMacroV4.execute(DatabaseStructureMacroV4.java:77) at sun.reflect.GeneratedMethodAccessor920.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.atlassian.confluence.macro.xhtml.XhtmlMacroManager$ResourceAwareMacroInvocationHandler.invoke(XhtmlMacroManager.java:220) at $Proxy1372.execute(Unknown Source) at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshal(ViewMacroMarshaller.java:88) at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshal(ViewMacroMarshaller.java:24) at com.atlassian.confluence.content.render.xhtml.UnmarshalMarshalFragmentTransformer.transform(UnmarshalMarshalFragmentTransformer.java:27) at com.atlassian.confluence.content.render.xhtml.transformers.DefaultFragmentTransformer.transform(DefaultFragmentTransformer.java:106) at com.atlassian.confluence.content.render.xhtml.storage.StorageXhtmlTransformer.transform(StorageXhtmlTransformer.java:43) at com.atlassian.confluence.content.render.xhtml.TransformerChain.transform(TransformerChain.java:41) at com.atlassian.confluence.content.render.xhtml.PluggableTransformerChain.transform(PluggableTransformerChain.java:53) at com.atlassian.confluence.content.render.xhtml.DefaultRenderer.render(DefaultRenderer.java:80) at com.atlassian.confluence.content.render.xhtml.DefaultRenderer.render(DefaultRenderer.java:68) at com.atlassian.confluence.content.render.xhtml.DefaultRenderer.render(DefaultRenderer.java:58) at com.atlassian.confluence.content.render.xhtml.DeviceTypeAwareRenderer.render(DeviceTypeAwareRenderer.java:42) at com.atlassian.confluence.pages.actions.ViewPageAction.execute(ViewPageAction.java:245) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:64) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.xwork.interceptors.XsrfTokenInterceptor.intercept(XsrfTokenInterceptor.java:100) at com.atlassian.confluence.xwork.ConfluenceXsrfTokenInterceptor.intercept(ConfluenceXsrfTokenInterceptor.java:25) {noformat}
    via by David Franke,
  • JDBC:Connection Issue When Run program
    via Stack Overflow by hamel123
    ,
  • After End Of Result set error?
    via by Unknown author,
  • GitHub comment 598#140930847
    via GitHub by g0t4
    ,
    • java.sql.SQLException: java.lang.NullPointerException at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910) at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:766) at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:874) at com.mysql.jdbc.Statement.createResultSetUsingServerFetch(Statement.java:520) at com.mysql.jdbc.Statement.executeQuery(Statement.java:1133) at com.mysql.jdbc.DatabaseMetaData.extractForeignKeyFromCreateTable(DatabaseMetaData.java:1141) at com.mysql.jdbc.DatabaseMetaData$5.forEach(DatabaseMetaData.java:3231) at com.mysql.jdbc.DatabaseMetaData$IterateBlock.doForAll(DatabaseMetaData.java:76) at com.mysql.jdbc.DatabaseMetaData.getImportedKeys(DatabaseMetaData.java:3219) at mondrian.gui.JdbcMetaData.setAllTables(JdbcMetaData.java:291) at mondrian.gui.JdbcMetaData.setAllSchemas(JdbcMetaData.java:258) at mondrian.gui.JdbcMetaData.<init>(JdbcMetaData.java:67) at mondrian.gui.Workbench.getNewJdbcMetadata(Workbench.java:1975) at mondrian.gui.Workbench.newJDBCExplorerMenuItemActionPerformed(Workbench.java:1153) at mondrian.gui.Workbench.access$300(Workbench.java:94) at mondrian.gui.Workbench$13.actionPerformed(Workbench.java:612) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.AbstractButton.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(UnknownSource) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

    Users with the same issue

    ivanszkypeter
    470 times, last one,
    linxiaolong
    1 times, last one,
    rocday
    1 times, last one,
    slash
    1 times, last one,
    zbalint
    4 times, last one,
    145 more bugmates