I tried to replicate this with SQurreL 1.2 beta 4 and Syntax plugin
0.11. After altering my prefs.xml to have an empty fontInfo-tag I get
the same NPE as Joseph when I try to connect.
--
Dennis Lundberg
Joseph Boyd wrote:
> Here's some more information regarding my problem with the syntax
> highlighting plugin and squirrel.
>
> The prefs.xml file I have has an empty <fontInfo> element under
> SessionProperties.
>
> <sessionProperties
> Class=
> "net.sourceforge.squirrel_sql.client.session.properties.SessionProperties"
> >
>
> --snipped--
>
> <fontInfo/>
>
>
> If I replace it with the default fontInfo section that is created for a
> 'new' squirrel user (one without a prefs.xml file present), my problem
> goes away :
>
>
> <fontInfo Class="net.sourceforge.squirrel_sql.fw.gui.FontInfo">
> <family>Monospaced</family>
> <isBold>false</isBold>
> <isItalic>false</isItalic>
> <size>12</size>
> </fontInfo>
>
> I've looked at the source, and see that a new SessionProperties object
> gets a default (non-null) FontInfo object created for it. I believe my
> having an empty <fontInfo/> tag in my prefs.xml cause the XMLBeanReader
> to assign assign call sessionProperties.setFontInfo(null).
>
> I'm not sure how to best adjust the code to deal with the problem, but I
> believe you can re-produce my problem by editing your prefs.xml and
> change the <fontInfo> section into an empty tag :
>
> <fontInfo/>
>
>
> Hope all of this helps.
>
>
>
> ...Joseph Boyd
> Lead Application Developer
> accessIndiana..."linking hoosiers to government"
> http://www.IN.gov
> 10 West Market St., Suite 600
> Indianapolis, IN 46204
>
>
> Colin Bell wrote:
>
>> Hi Joseph,
>>
>> I've got the application dump you did, I didn't let it through to the
>> list because of the size. I'll take a look and try to duplicate your
>> problem tonight or tomorrow night.
>>
>
>
>
> On Sat, 2003-11-22 at 01:24, Joseph Boyd wrote:
>
>> I am still getting NPE's when using the Syntax plugin (0.11)
>>
>> The stack trace from the NPE's is at the end of this message. The NPE
>> is happening because the
>> _session.getProperties().getFontInfo()
>> call is returning null;
>>
>>
>> Does anybody have any suggestions as to the correct way to fix this?
>> I can make the NPE go away by not running the code that depends on the
>> FontInfo object, but I've no idea what that will break.
>>
>>
>> ...Joseph Boyd
>>
>>
>> java.lang.NullPointerException
>> at
>> net.sourceforge.squirrel_sql.plugins.syntax.oster.OsterTextControl.initStyles(OsterTextControl.java:289)
>>
>> at
>> net.sourceforge.squirrel_sql.plugins.syntax.oster.OsterTextControl.<init>(OsterTextControl.java:125)
>>
>> at
>> net.sourceforge.squirrel_sql.plugins.syntax.oster.OsterSQLEntryPanel.<init>(OsterSQLEntryPanel.java:76)
>>
>> at
>> net.sourceforge.squirrel_sql.plugins.syntax.oster.OsterSQLEntryAreaFactory.createSQLEntryPanel(OsterSQLEntryAreaFactory.java:74)
>>
>> at
>> net.sourceforge.squirrel_sql.client.session.mainpanel.SQLPanel.createGUI(SQLPanel.java:1010)
>>
>> at
>> net.sourceforge.squirrel_sql.client.session.mainpanel.SQLPanel.<init>(SQLPanel.java:173)
>>
>> at
>> net.sourceforge.squirrel_sql.client.session.mainpanel.SQLTab.getComponent(SQLTab.java:78)
>>
>> at
>> net.sourceforge.squirrel_sql.client.session.mainpanel.SQLTab.getSQLPanel(SQLTab.java:128)
>>
>> at
>> net.sourceforge.squirrel_sql.client.session.mainpanel.SQLTab.setSession(SQLTab.java:89)
>>
>> at
>> net.sourceforge.squirrel_sql.client.session.mainpanel.SQLTab.<init>(SQLTab.java:50)
>>
>> at
>> net.sourceforge.squirrel_sql.client.session.MainPanel.<init>(MainPanel.java:109)
>>
>> at
>> net.sourceforge.squirrel_sql.client.session.SessionSheet.createGUI(SessionSheet.java:346)
>>
>> at
>> net.sourceforge.squirrel_sql.client.session.SessionSheet.<init>(SessionSheet.java:104)
>>
>> at
>> net.sourceforge.squirrel_sql.client.session.SessionInternalFrame.createGUI(SessionInternalFrame.java:130)
>>
>> at
>> net.sourceforge.squirrel_sql.client.session.SessionInternalFrame.<init>(SessionInternalFrame.java:57)
>>
>> at
>> net.sourceforge.squirrel_sql.client.session.SessionWindowManager.createInternalFrame(SessionWindowManager.java:105)
>>
>> at
>> net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand$Runner.run(ConnectToAliasCommand.java:453)
>>
>> at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
>> at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
>> at
>> java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
>>
>> at
>> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
>>
>> at
>> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
>> at
>> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
>> at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
>>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
> Free Linux Tutorials. Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> Squirrel-sql-develop mailing list
> Squ...@li...
> https://lists.sourceforge.net/lists/listinfo/squirrel-sql-develop
|