12 comments
Comment actions Permalink

Stefan,

Thanks a lot for the very nice plugin. Very good job! But may I ask you
to fix a long lasting problem, when you update the state of some UI
components directly from the QueryPanel.ExecutionThread? You should use
SwingUtilities.invokeLater instead. Every time I try to query my
database I get an exception.

Thanks,
/kesh

Stefan Stiller wrote:

I've just uploaded the newest release of my JDBC/SQL plugin.

http://www.intellij.org/twiki/bin/view/Main/SQLQueryPlugin

Changes:

  • Bugfixes

  • Added driver for Firebird database (Thanks to Sergey Bervinov)


Bye,
Stefan.


0
Comment actions Permalink

Stefan Stiller wrote:

I've just uploaded the newest release of my JDBC/SQL plugin.

http://www.intellij.org/twiki/bin/view/Main/SQLQueryPlugin

Changes:

  • Bugfixes

  • Added driver for Firebird database (Thanks to Sergey Bervinov)


Bye,
Stefan.


Great work Stefan,

unfortunately my problem with 'bad' BLOBs is stil, there.
here is the exception I get now with SQL 1.2.1 and IDEA 856 when
executing a SELECT * from a table with BLOBS:

Connecting (jdbc:oracle:thin:@testlabpc1:1521:MMDB)...
Connecting (jdbc:oracle:thin:@testlabpc1:1521:MMDB)...
java.io.StreamCorruptedException: invalid stream header
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.(Unknown Source) at com.kiwisoft.db.BLOBWrapper$AdvancedObjectInputStream.(Unknown Source) at com.kiwisoft.db.BLOBWrapper.(Unknown Source) at com.kiwisoft.idea.ResultSetTableModel.createData(Unknown Source) at com.kiwisoft.idea.ResultSetTableModel.(Unknown Source) at com.kiwisoft.idea.QueryPanel.executeSelect(Unknown Source) at com.kiwisoft.idea.QueryPanel.access$1700(Unknown Source) at com.kiwisoft.idea.QueryPanel$ExecutionThread.run(Unknown Source) java.lang.NullPointerException at java.lang.Class.isAssignableFrom(Native Method) at com.kiwisoft.idea.ResultSetTableModel.createData(Unknown Source) at com.kiwisoft.idea.ResultSetTableModel.]]>(Unknown Source)
at com.kiwisoft.idea.QueryPanel.executeSelect(Unknown Source)
at com.kiwisoft.idea.QueryPanel.access$1700(Unknown Source)
at com.kiwisoft.idea.QueryPanel$ExecutionThread.run(Unknown Source)

and the result is that there is no display - see the attached screenshot
after the query has finished

thanks,
Edo



Attachment(s):
Clipboard01.png
0
Comment actions Permalink

I use the plugin in for my daily work but never get the exception. It's
possible that this is a platform issue. Can you tell me which operating
system you are using?

Thanks,
Stefan.

kesh wrote:

Stefan,

Thanks a lot for the very nice plugin. Very good job! But may I ask you
to fix a long lasting problem, when you update the state of some UI
components directly from the QueryPanel.ExecutionThread? You should use
SwingUtilities.invokeLater instead. Every time I try to query my
database I get an exception.

Thanks,
/kesh

Stefan Stiller wrote:

>> I've just uploaded the newest release of my JDBC/SQL plugin.
>>
>> http://www.intellij.org/twiki/bin/view/Main/SQLQueryPlugin
>> Changes:
>> * Bugfixes
>> * Added driver for Firebird database (Thanks to Sergey Bervinov)
>>
>> Bye,
>> Stefan.



0
Comment actions Permalink

Feature request

when browsing teh structure of the database,
can you please add a context menu 'paste name in current query text'

that allows to paste names fro tabels iand columents ... so simplifying
the creation of SQL for short-of-memory users ;) ?


thanks,
Edo


0
Comment actions Permalink

Edoardo Comar wrote:

Feature request

when browsing teh structure of the database,
can you please add a context menu 'paste name in current query text'

that allows to paste names fro tabels iand columents ... so simplifying
the creation of SQL for short-of-memory users ;) ?


thanks,
Edo

alternatively, (maybe simpler since copy and paste from the db structure
is already allowed) ... but please put the the displayed string value
rather than the toString() in the clipboard (which results in
com.kiwisoft.db.DatabaseTable@10e215 being pasted ;)

thanks
Edo

0
Comment actions Permalink

I'm sorry to tell you this, but now I can't use it at at all:

1. Select would work with empty tables only. I.e. it would
correctly generate two tabs with query outline (SQL
statement & number of rows) and the result itself which
is an empty table. If table is not empty then only outline
tab would show up (without number of rows). Query
result tab would never show up.
2. Non-result set queries seem to work fine. After "delete * from table"
I can go back to select and see my empty table. If I insert a row
through the plugin then select would suddenly start working.
(Invoking "select count(*) from table" works, but does not fix
the problem. May be it has to be modification query?)
3. Formats don't work correctly with Long numbers. For example
584341862672762882 would show up as 802h or 100000000010b
or 4002o. Looks like you're using int[s] to hold intermediate
results somewhere. It must be BigDecimal everywhere.
4. If format is applied then CopyToClipboard would not
copy formatted string, but default decimal.

No exceptions show up in the log.
That's all for now. I'm rolling back to 1.2.0 and manual
formatting, but thanks anyway.

--Oleg


"Stefan Stiller" <stefan@sstiller.de> wrote in message news:27492268.1057905593554.JavaMail.itn@is.intellij.net...

I've just uploaded the newest release of my JDBC/SQL plugin.

>

http://www.intellij.org/twiki/bin/view/Main/SQLQueryPlugin

>

Changes:

  • Bugfixes

  • Added driver for Firebird database (Thanks to Sergey Bervinov)

>

Bye,
Stefan.



0
Comment actions Permalink

It shouldn't be the platform issue. This is the way swing works. You
should modify the state of any UI components only from within the
swing's dispatch thread.

/kesh

Here is the exception stack trace:

ERROR - plication.impl.ApplicationImpl - Assertion failed:
Access is allowed from event dispatch thread only.
ERROR - plication.impl.ApplicationImpl - IntelliJ IDEA
(Aurora) Build #859
ERROR - plication.impl.ApplicationImpl - JDK: 1.4.2
ERROR - plication.impl.ApplicationImpl - VM: Java HotSpot(TM)
ClientVM
ERROR - plication.impl.ApplicationImpl - Vendor: Sun
Microsystems Inc.
ERROR - plication.impl.ApplicationImpl - OS: Windows XP
ERROR - plication.impl.ApplicationImpl -
java.lang.Throwable
at
com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:72)
at
com.intellij.openapi.application.b.d.assertIsDispatchThread(d.java:29
2)
at com.intellij.ui.dl.c(dl.java:10)
at com.intellij.ui.d.getDefaultComponent(d.java:2)
at com.intellij.openapi.wm.a.a.a(a.java:15)
at com.intellij.openapi.wm.a.a.a(a.java:9)
at com.intellij.ui.w.getDefaultComponent(w.java:23)
at com.intellij.openapi.wm.a.a.a(a.java:15)
at com.intellij.openapi.wm.a.a.a(a.java:9)
at com.intellij.ui.w.getDefaultComponent(w.java:4)
at com.intellij.openapi.wm.a.a.a(a.java:15)
at com.intellij.openapi.wm.a.a.a(a.java:9)
at com.intellij.ui.w.getDefaultComponent(w.java:23)
at com.intellij.openapi.wm.a.a.a(a.java:15)
at com.intellij.openapi.wm.a.a.a(a.java:9)
at com.intellij.ui.w.getComponentAfter(w.java:18)
at java.awt.Component.nextFocusHelper(Unknown Source)
at java.awt.Container.nextFocusHelper(Unknown Source)
at java.awt.Component.nextFocus(Unknown Source)
at java.awt.Component.transferFocus(Unknown Source)
at java.awt.Component.doAutoTransfer(Unknown Source)
at java.awt.Component.autoTransferFocus(Unknown Source)
at java.awt.Component.disable(Unknown Source)
at javax.swing.JComponent.disable(Unknown Source)
at java.awt.Component.enable(Unknown Source)
at java.awt.Component.setEnabled(Unknown Source)
at javax.swing.JComponent.setEnabled(Unknown Source)
at javax.swing.AbstractButton.setEnabled(Unknown Source)
at
javax.swing.AbstractButton$ButtonActionPropertyChangeListener.propert
yChange(Unknown Source)
at
javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unkno
wn Source)
at
javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unkno
wn Source)
at javax.swing.AbstractAction.firePropertyChange(Unknown Source)
at javax.swing.AbstractAction.setEnabled(Unknown Source)
at com.kiwisoft.idea.QueryPanel$ExecutionThread.run(Unknown Source)

/kesh

Stefan Stiller wrote:

I use the plugin in for my daily work but never get the exception. It's
possible that this is a platform issue. Can you tell me which operating
system you are using?

Thanks,
Stefan.

kesh wrote:

>> Stefan,
>>
>> Thanks a lot for the very nice plugin. Very good job! But may I ask
>> you to fix a long lasting problem, when you update the state of some
>> UI components directly from the QueryPanel.ExecutionThread? You should
>> use SwingUtilities.invokeLater instead. Every time I try to query my
>> database I get an exception.
>>
>> Thanks,
>> /kesh
>>
>> Stefan Stiller wrote:
>>
>>> I've just uploaded the newest release of my JDBC/SQL plugin.
>>>
>>> http://www.intellij.org/twiki/bin/view/Main/SQLQueryPlugin
>>> Changes:
>>> * Bugfixes
>>> * Added driver for Firebird database (Thanks to Sergey Bervinov)
>>>
>>> Bye,
>>> Stefan.
>>
>>
>>


0
Comment actions Permalink

I don't directly modify the state of an UI component. I just set an
action to disabled.

Bye, Stefan.

kesh wrote:

It shouldn't be the platform issue. This is the way swing works. You
should modify the state of any UI components only from within the
swing's dispatch thread.

/kesh

Here is the exception stack trace:

ERROR - plication.impl.ApplicationImpl - Assertion failed:
Access is allowed from event dispatch thread only.
ERROR - plication.impl.ApplicationImpl - IntelliJ IDEA
(Aurora) Build #859
ERROR - plication.impl.ApplicationImpl - JDK: 1.4.2
ERROR - plication.impl.ApplicationImpl - VM: Java HotSpot(TM)
ClientVM
ERROR - plication.impl.ApplicationImpl - Vendor: Sun
Microsystems Inc.
ERROR - plication.impl.ApplicationImpl - OS: Windows XP
ERROR - plication.impl.ApplicationImpl -
java.lang.Throwable
at
com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:72)
at
com.intellij.openapi.application.b.d.assertIsDispatchThread(d.java:29
2)
at com.intellij.ui.dl.c(dl.java:10)
at com.intellij.ui.d.getDefaultComponent(d.java:2)
at com.intellij.openapi.wm.a.a.a(a.java:15)
at com.intellij.openapi.wm.a.a.a(a.java:9)
at com.intellij.ui.w.getDefaultComponent(w.java:23)
at com.intellij.openapi.wm.a.a.a(a.java:15)
at com.intellij.openapi.wm.a.a.a(a.java:9)
at com.intellij.ui.w.getDefaultComponent(w.java:4)
at com.intellij.openapi.wm.a.a.a(a.java:15)
at com.intellij.openapi.wm.a.a.a(a.java:9)
at com.intellij.ui.w.getDefaultComponent(w.java:23)
at com.intellij.openapi.wm.a.a.a(a.java:15)
at com.intellij.openapi.wm.a.a.a(a.java:9)
at com.intellij.ui.w.getComponentAfter(w.java:18)
at java.awt.Component.nextFocusHelper(Unknown Source)
at java.awt.Container.nextFocusHelper(Unknown Source)
at java.awt.Component.nextFocus(Unknown Source)
at java.awt.Component.transferFocus(Unknown Source)
at java.awt.Component.doAutoTransfer(Unknown Source)
at java.awt.Component.autoTransferFocus(Unknown Source)
at java.awt.Component.disable(Unknown Source)
at javax.swing.JComponent.disable(Unknown Source)
at java.awt.Component.enable(Unknown Source)
at java.awt.Component.setEnabled(Unknown Source)
at javax.swing.JComponent.setEnabled(Unknown Source)
at javax.swing.AbstractButton.setEnabled(Unknown Source)
at
javax.swing.AbstractButton$ButtonActionPropertyChangeListener.propert
yChange(Unknown Source)
at
javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unkno
wn Source)
at
javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unkno
wn Source)
at javax.swing.AbstractAction.firePropertyChange(Unknown Source)
at javax.swing.AbstractAction.setEnabled(Unknown Source)
at com.kiwisoft.idea.QueryPanel$ExecutionThread.run(Unknown Source)

/kesh

Stefan Stiller wrote:

>> I use the plugin in for my daily work but never get the exception.
>> It's possible that this is a platform issue. Can you tell me which
>> operating system you are using?
>>
>> Thanks,
>> Stefan.
>>
>> kesh wrote:
>>
>>> Stefan,
>>>
>>> Thanks a lot for the very nice plugin. Very good job! But may I ask
>>> you to fix a long lasting problem, when you update the state of some
>>> UI components directly from the QueryPanel.ExecutionThread? You
>>> should use SwingUtilities.invokeLater instead. Every time I try to
>>> query my database I get an exception.
>>>
>>> Thanks,
>>> /kesh
>>>
>>> Stefan Stiller wrote:
>>>
>>>> I've just uploaded the newest release of my JDBC/SQL plugin.
>>>>
>>>> http://www.intellij.org/twiki/bin/view/Main/SQLQueryPlugin
>>>> Changes:
>>>> * Bugfixes
>>>> * Added driver for Firebird database (Thanks to Sergey Bervinov)
>>>>
>>>> Bye,
>>>> Stefan.
>>>
>>>
>>>
>>>
>>


0
Comment actions Permalink

As you see from the stack trace UI component(AbstractButton in this
case) registers itself as a listener to any modifications of the
action's state. When you change the state of the action, AbstractButton
access the UI Api which must be done only from the swing dispatch
thread. So use SwingUnilities.invokeLater method to modify your action's
state. :)

/kesh

Stefan Stiller wrote:

I don't directly modify the state of an UI component. I just set an
action to disabled.

Bye, Stefan.

kesh wrote:

>> It shouldn't be the platform issue. This is the way swing works. You
>> should modify the state of any UI components only from within the
>> swing's dispatch thread.
>>
>> /kesh
>>
>> Here is the exception stack trace:
>>
>> ERROR - plication.impl.ApplicationImpl - Assertion failed:
>> Access is allowed from event dispatch thread only.
>> ERROR - plication.impl.ApplicationImpl - IntelliJ IDEA
>> (Aurora) Build #859
>> ERROR - plication.impl.ApplicationImpl - JDK: 1.4.2
>> ERROR - plication.impl.ApplicationImpl - VM: Java
>> HotSpot(TM) ClientVM
>> ERROR - plication.impl.ApplicationImpl - Vendor: Sun
>> Microsystems Inc.
>> ERROR - plication.impl.ApplicationImpl - OS: Windows XP
>> ERROR - plication.impl.ApplicationImpl -
>> java.lang.Throwable
>> at
>> com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:72)
>> at
>> com.intellij.openapi.application.b.d.assertIsDispatchThread(d.java:29
>> 2)
>> at com.intellij.ui.dl.c(dl.java:10)
>> at com.intellij.ui.d.getDefaultComponent(d.java:2)
>> at com.intellij.openapi.wm.a.a.a(a.java:15)
>> at com.intellij.openapi.wm.a.a.a(a.java:9)
>> at com.intellij.ui.w.getDefaultComponent(w.java:23)
>> at com.intellij.openapi.wm.a.a.a(a.java:15)
>> at com.intellij.openapi.wm.a.a.a(a.java:9)
>> at com.intellij.ui.w.getDefaultComponent(w.java:4)
>> at com.intellij.openapi.wm.a.a.a(a.java:15)
>> at com.intellij.openapi.wm.a.a.a(a.java:9)
>> at com.intellij.ui.w.getDefaultComponent(w.java:23)
>> at com.intellij.openapi.wm.a.a.a(a.java:15)
>> at com.intellij.openapi.wm.a.a.a(a.java:9)
>> at com.intellij.ui.w.getComponentAfter(w.java:18)
>> at java.awt.Component.nextFocusHelper(Unknown Source)
>> at java.awt.Container.nextFocusHelper(Unknown Source)
>> at java.awt.Component.nextFocus(Unknown Source)
>> at java.awt.Component.transferFocus(Unknown Source)
>> at java.awt.Component.doAutoTransfer(Unknown Source)
>> at java.awt.Component.autoTransferFocus(Unknown Source)
>> at java.awt.Component.disable(Unknown Source)
>> at javax.swing.JComponent.disable(Unknown Source)
>> at java.awt.Component.enable(Unknown Source)
>> at java.awt.Component.setEnabled(Unknown Source)
>> at javax.swing.JComponent.setEnabled(Unknown Source)
>> at javax.swing.AbstractButton.setEnabled(Unknown Source)
>> at
>> javax.swing.AbstractButton$ButtonActionPropertyChangeListener.propert
>> yChange(Unknown Source)
>> at
>> javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unkno
>> wn Source)
>> at
>> javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unkno
>> wn Source)
>> at javax.swing.AbstractAction.firePropertyChange(Unknown Source)
>> at javax.swing.AbstractAction.setEnabled(Unknown Source)
>> at com.kiwisoft.idea.QueryPanel$ExecutionThread.run(Unknown
>> Source)
>>
>> /kesh
>>
>> Stefan Stiller wrote:
>>
>>> I use the plugin in for my daily work but never get the exception.
>>> It's possible that this is a platform issue. Can you tell me which
>>> operating system you are using?
>>>
>>> Thanks,
>>> Stefan.
>>>
>>> kesh wrote:
>>>
>>>> Stefan,
>>>>
>>>> Thanks a lot for the very nice plugin. Very good job! But may I ask
>>>> you to fix a long lasting problem, when you update the state of some
>>>> UI components directly from the QueryPanel.ExecutionThread? You
>>>> should use SwingUtilities.invokeLater instead. Every time I try to
>>>> query my database I get an exception.
>>>>
>>>> Thanks,
>>>> /kesh
>>>>
>>>> Stefan Stiller wrote:
>>>>
>>>>> I've just uploaded the newest release of my JDBC/SQL plugin.
>>>>>
>>>>> http://www.intellij.org/twiki/bin/view/Main/SQLQueryPlugin
>>>>> Changes:
>>>>> * Bugfixes
>>>>> * Added driver for Firebird database (Thanks to Sergey Bervinov)
>>>>>
>>>>> Bye,
>>>>> Stefan.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>


0
Comment actions Permalink

Thanks for the superb plugin. I use it every day!

I encountered odd behavior. When my query returns rows with null String data, SQLQueryPlugin does only show tab with query. There is no tab for results.

If I rephrase my query so that the row with null(s) is displayed after any row that has no null values, everything is fine. It's just when row with null(s) is returned first.

To be more clear:

I have table with following columns: firstname (String), surname (String), age (int).

My table has following rows of data:

Foo Bar 10
]]> test 20

if I do query with "select * from mytable order by age asc" everything is fine.
If I do query with "select * from mytable order by age desc" no results are returned.

Oh, and plugin version is 1.2.1 and the database is HSQLDB running on own JVM (with another querytool, there is no problems, so I doubt it is the DB).

Thanks.

0
Comment actions Permalink

Sorry there is a little bug in my plugin, but I already fixed it and
will release the next version probably at the end of this week.

Thanks, Stefan

Pasi Parviainen wrote:

Thanks for the superb plugin. I use it every day!

I encountered odd behavior. When my query returns rows with null String data, SQLQueryPlugin does only show tab with query. There is no tab for results.

If I rephrase my query so that the row with null(s) is displayed after any row that has no null values, everything is fine. It's just when row with null(s) is returned first.

To be more clear:

I have table with following columns: firstname (String), surname (String), age (int).

My table has following rows of data:

Foo Bar 10
<null> test 20

if I do query with "select * from mytable order by age asc" everything is fine.
If I do query with "select * from mytable order by age desc" no results are returned.

Oh, and plugin version is 1.2.1 and the database is HSQLDB running on own JVM (with another querytool, there is no problems, so I doubt it is the DB).

Thanks.


0
Comment actions Permalink

Stefan Stiller wrote:

Sorry there is a little bug in my plugin, but I already fixed it and
will release the next version probably at the end of this week.

OK, I'll be waiting.


Thanks, Stefan

Thank You. :)

Pasi Parviainen

0

Please sign in to leave a comment.