我是报表设计器的新手,正在尝试创建我的第一个报表。我创建了一个 JDBC 数据源,但是当我尝试预览查询时,我得到一个错误异常:
java.lang.NullPointerException
当我的查询没有“加入”时,我可以预览结果,所以我认为这与此有关。我的 sql 查询如下所示:
select
table1.column_x, --data type: tinyint
table2.column_y --data type: varchar(max)
from schema_name.table_one as table1
left join schema_name.table_two as table2
on table1.table_two_key = table2.key
当我没有从第二个表中选择任何内容时,它将返回预览结果:
select
table1.column_x
from schema_name.table_one as table1
left join schema_name.table_two as table2
on table1.table_two_key = table2.key
当我从第二个表中选择要选择的键时,它也会返回预览结果:
select
table1.column_x,
table2.key --data type: bigint
from schema_name.table_one as table1
left join schema_name.table_two as table2
on table1.table_two_key = table2.key
我正在使用报表设计器 3.9.0。
有 3 个空点异常,这是我通过单击“复制到剪贴板”得到的结果:
java.lang.NullPointerException at javax.swing.JTable.prepareRenderer(Unknown Source) at javax.swing.plaf.basic.BasicTableUI.paintCell(Unknown Source) at javax.swing.plaf.basic.BasicTableUI.paintCells(Unknown Source) at javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source) at javax.swing.plaf.ComponentUI.update(Unknown Source) at javax.swing.JComponent.paintComponent(Unknown Source) at javax.swing.JComponent.paint( Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JViewport.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source ) 在 javax.swing.JComponent.paint(Unknown Source) 在 javax.swing.JComponent.paintChildren(Unknown Source) 在 javax.swing.JComponent.paint(Unknown Source) 在 javax.swing.JComponent。paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JLayeredPane.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paintToOffscreen( Unknown Source) 在 javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source) 在 javax.swing.RepaintManager$PaintManager.paint(Unknown Source) 在 javax.swing.RepaintManager.paint(Unknown Source) 在 javax.swing.JComponent。油漆(未知来源)在 java.awt.GraphicsCallback$PaintCallback.run(未知来源)在 sun.awt.SunGraphicsCallback.runOneComponent(未知来源)在 sun.awt.SunGraphicsCallback.runComponents(未知来源)在 java.awt.Container。在 javax.swing.RepaintManager 的 java.awt.Window.paint(Unknown Source) 上的paint(Unknown Source)。javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source) at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source) at java.awt.event 的paintDirtyRegions(Unknown Source)。 InvocationEvent.dispatch(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。 pumpEventsForFilter(Unknown Source) at java.awt.Dialog$1.run(Unknown Source) at java.awt.Dialog$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Dialog。 show(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component。setVisible(Unknown Source) at java.awt.Window.setVisible(Unknown Source) at java.awt.Dialog.setVisible(Unknown Source) at org.pentaho.reporting.libraries.designtime.swing.background.DataPreviewDialog.showData(DataPreviewDialog. java:133) at org.pentaho.reporting.ui.datasources.jdbc.ui.JdbcDataSourceDialog$PreviewAction.actionPerformed(JdbcDataSourceDialog.java:141) 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.plaf.basic.BasicButtonListener.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(未知源)在 java.awt.EventDispatchThread.pumpEventsForFilter(未知源)在 java.awt。EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.Dialog$1.run(Unknown Source) at java.awt.Dialog$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt。 Dialog.show(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component.setVisible(Unknown Source) at java.awt.Window.setVisible(Unknown Source) at java.awt.Dialog。 setVisible(Unknown Source) at org.pentaho.reporting.libraries.designtime.swing.CommonDialog.performEdit(CommonDialog.java:156) at org.pentaho.reporting.ui.datasources.jdbc.ui.JdbcDataSourceDialog.performConfiguration(JdbcDataSourceDialog.java :759) 在 org.pentaho.reporting.designer.core.actions.report.AddDataFactoryAction 的 org.pentaho.reporting.ui.datasources.jdbc.JdbcDataSourcePlugin.performEdit(JdbcDataSourcePlugin.java:67)。actionPerformed(AddDataFactoryAction.java:79) 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 (未知源) 在 java.awt.AWTEventMulticaster.mouseReleased(未知源) 在 java.awt.Component.processMouseEvent(未知源) 在 javax.swing.JComponent.processMouseEvent(未知源) 在 java.awt.Component.processEvent(Unknown源)在 java.awt.Container.processEvent(未知源)在 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 ) 在 java.awt.EventQueue.dispatchEvent(Unknown Source) 在 java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) 在 java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) 在 java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) 在java.awt.EventDispatchThread。java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) 的 pumpEvents(Unknown Source)
java.lang.NullPointerException at javax.swing.JTable.prepareRenderer(Unknown Source) at javax.swing.plaf.basic.BasicTableUI.paintCell(Unknown Source) at javax.swing.plaf.basic.BasicTableUI.paintCells(Unknown Source) at javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source) at javax.swing.plaf.ComponentUI.update(Unknown Source) at javax.swing.JComponent.paintComponent(Unknown Source) at javax.swing.JComponent.paint( Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JViewport.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source ) 在 javax.swing.JComponent.paint(Unknown Source) 在 javax.swing.JComponent.paintChildren(Unknown Source) 在 javax.swing.JComponent.paint(Unknown Source) 在 javax.swing.JComponent。paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JLayeredPane.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paintToOffscreen( Unknown Source) 在 javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source) 在 javax.swing.RepaintManager$PaintManager.paint(Unknown Source) 在 javax.swing.RepaintManager.paint(Unknown Source) 在 javax.swing.JComponent。油漆(未知来源)在 java.awt.GraphicsCallback$PaintCallback.run(未知来源)在 sun.awt.SunGraphicsCallback.runOneComponent(未知来源)在 sun.awt.SunGraphicsCallback.runComponents(未知来源)在 java.awt.Container。在 javax.swing.RepaintManager 的 java.awt.Window.paint(Unknown Source) 上的paint(Unknown Source)。javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source) at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source) at java.awt.event 的paintDirtyRegions(Unknown Source)。 InvocationEvent.dispatch(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。 pumpEventsForFilter(Unknown Source) at java.awt.Dialog$1.run(Unknown Source) at java.awt.Dialog$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Dialog。 show(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component。setVisible(Unknown Source) at java.awt.Window.setVisible(Unknown Source) at java.awt.Dialog.setVisible(Unknown Source) at org.pentaho.reporting.libraries.designtime.swing.background.DataPreviewDialog.showData(DataPreviewDialog. java:133) at org.pentaho.reporting.ui.datasources.jdbc.ui.JdbcDataSourceDialog$PreviewAction.actionPerformed(JdbcDataSourceDialog.java:141) 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.plaf.basic.BasicButtonListener.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(未知源)在 java.awt.EventDispatchThread.pumpEventsForFilter(未知源)在 java.awt。EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.Dialog$1.run(Unknown Source) at java.awt.Dialog$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt。 Dialog.show(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component.setVisible(Unknown Source) at java.awt.Window.setVisible(Unknown Source) at java.awt.Dialog。 setVisible(Unknown Source) at org.pentaho.reporting.libraries.designtime.swing.CommonDialog.performEdit(CommonDialog.java:156) at org.pentaho.reporting.ui.datasources.jdbc.ui.JdbcDataSourceDialog.performConfiguration(JdbcDataSourceDialog.java :759) 在 org.pentaho.reporting.designer.core.actions.report.AddDataFactoryAction 的 org.pentaho.reporting.ui.datasources.jdbc.JdbcDataSourcePlugin.performEdit(JdbcDataSourcePlugin.java:67)。actionPerformed(AddDataFactoryAction.java:79) 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 (未知源) 在 java.awt.AWTEventMulticaster.mouseReleased(未知源) 在 java.awt.Component.processMouseEvent(未知源) 在 javax.swing.JComponent.processMouseEvent(未知源) 在 java.awt.Component.processEvent(Unknown源)在 java.awt.Container.processEvent(未知源)在 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 ) 在 java.awt.EventQueue.dispatchEvent(Unknown Source) 在 java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) 在 java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) 在 java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) 在java.awt.EventDispatchThread。java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) 的 pumpEvents(Unknown Source)
java.lang.NullPointerException 在 javax.swing.JTable.prepareRenderer(Unknown Source) 在 javax.swing.ToolTipManager$insideTimerAction.actionPerformed(Unknown Source) 在 javax.swing.JTable.getToolTipText(Unknown Source) 在 javax.swing.Timer。 fireActionPerformed(Unknown Source) at javax.swing.Timer$DoPostEvent.run(Unknown Source) at java.awt.event.InvocationEvent.dispatch(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.pumpEventsForFilter(Unknown Source) at java.awt.Dialog$1.run(Unknown Source) at java.awt.Dialog java.awt.Dialog 的 java.security.AccessController.doPrivileged(Native Method) 的 $3.run(Unknown Source)。show(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component.setVisible(Unknown Source) at java.awt.Window.setVisible(Unknown Source) at java.awt.Dialog.setVisible( Unknown Source) at org.pentaho.reporting.ui.datasources.jdbc.ui.JdbcDataSourceDialog$PreviewAction.actionPerformed(JdbcDataSourceDialog .java:141) 在 javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) 在 javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) 在 javax.swing.DefaultButtonModel 的 javax.swing.AbstractButton.fireActionPerformed(Unknown Source)。 setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.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 ) 在 java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) 在 java.awt.Container.dispatchEventImpl(Unknown Source) 在 java.awt.Window.dispatchEventImpl(Unknown Source) 在 java.awt.Component.dispatchEvent(Unknown Source) 在java.awt.EventDispatchThread 中的 java.awt.EventQueue.dispatchEvent(Unknown Source)。pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.Dialog$1.run(Unknown Source) at java.awt.Dialog$3。在 java.awt.Dialog.show(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component.setVisible( Unknown Source) at java.awt.Window.setVisible(Unknown Source) at java.awt.Dialog.setVisible(Unknown Source) at org.pentaho.reporting.libraries.designtime.swing.CommonDialog.performEdit(CommonDialog.java:156)在 org.pentaho.reporting.ui.datasources.jdbc.JdbcDataSourcePlugin 的 org.pentaho.reporting.ui.datasources.jdbc.ui.JdbcDataSourceDialog.performConfiguration(JdbcDataSourceDialog.java:759)。performEdit(JdbcDataSourcePlugin.java:67) at org.pentaho.reporting.designer.core.actions.report.AddDataFactoryAction.actionPerformed(AddDataFactoryAction.java:79) 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.AWTEventMulticaster.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(未知源)在 java.awt.Component 的 javax.swing.JComponent.processMouseEvent(未知源)。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(未知源) 在 java.awt.LightweightDispatcher.retargetMouseEvent(未知源) 在 java.awt.LightweightDispatcher.processMouseEvent(未知源) 在 java.awt.LightweightDispatcher.dispatchEvent(未知源) 在 java.awt.Container.dispatchEventImpl(未知源) ) 在 java.awt.Window.dispatchEventImpl(Unknown Source) 在 java.awt.Component.dispatchEvent(Unknown Source) 在 java.awt.EventQueue.dispatchEvent(Unknown Source) 在 java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) 在java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) 在 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)