Null Pointer Exception When Opening SQL Scratchpad
book
Article ID: KB0082815
calendar_today
Updated On:
Products
Versions
TIBCO Data Virtualization
All Versions
Description
Getting Null Pointer Exception when opening SQL Scratchpad
java.lang.NullPointerException at com.compositesw.ui.modeler.editor.adhocsql.AdhocSQLHistoryModel.initializeModel(AdhocSQLHistoryModel.java:29) at com.compositesw.ui.modeler.editor.adhocsql.AdhocSQLHistoryModel.<init>(AdhocSQLHistoryModel.java:24) at com.compositesw.ui.modeler.editor.adhocsql.AdhocSQLHistoryList.<init>(AdhocSQLHistoryList.java:16) at com.compositesw.ui.modeler.editor.adhocsql.AdhocSQLHistoryView.<init>(AdhocSQLHistoryView.java:42) at com.compositesw.ui.modeler.editor.adhocsql.AdhocSQLTextView.<init>(AdhocSQLTextView.java:81) at com.compositesw.ui.modeler.editor.adhocsql.AdhocSQLEditor.initEditor(AdhocSQLEditor.java:148) at com.compositesw.ui.modeler.editor.adhocsql.AdhocSQLEditor.edit(AdhocSQLEditor.java:72) at com.compositesw.ui.common.editor.EditorManager.edit(EditorManager.java:125) at com.compositesw.ui.common.editor.EditorManager.edit(EditorManager.java:93) at com.compositesw.ui.modeler.editor.adhocsql.OpenAdhocSQLEditorAction.doit(OpenAdhocSQLEditorAction.java:25) at com.compositesw.ui.common.action.ActionManager.doAction(ActionManager.java:464) at com.compositesw.ui.common.action.CsAction.invoke(CsAction.java:222) at com.compositesw.ui.common.action.CsAction.actionPerformed(CsAction.java:375) 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.AWTEventMulticaster.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.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$200(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(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)
Solution: The nullpointer exception happens when CIS Studio’s Scratchpad component tries to locate and open the history SQL files in the user’s home folder.
Resolution# 1:
Please focus on the following check points in the system that hosts the Studio process:
- The user account that starts the Studio’s javaw process, typically via starting the batch script <Studio_INSTALL>/bin/studio.bat
- The user’s home folder in the file system, usually in a regular Windows installation, it is located in the folder <System Drive>/Users/<User_Name>
- The Studio’s history data is stored in the User’s home folder <System Drive>/Users/<User_Name>/.compositesw
- Studio’s Scratchpad history SQL data files are stored in the folder <System Drive>/Users/<User_Name>/.compositesw/adhocsql/history/
- So please check if these folders are really in place in the system and most importantly, whether these folders are REAL folders as those regular Windows paths.
Resolution# 2: Add following option to the COMPOSITE_OPTS variable in studio.bat and restart the studio.