looks like a problem w/ my reflection code. please try r4620. 1. it should have a folder lib/ext/dbdatastore/ to put your jdbc jars into.
2. if spatialite still won't work please send a short step-by-step plus example file for me to directly work it out i assume you remember to put the dll(s) into lib/native/x##/ automatically. remind me please. it works w/o the dll's but with them you get some sql macros you wouldn't have otherwise, right? ..ede On 13.12.2015 22:19, Rahkonen Jukka (MML) wrote: > Hi, > > Spatialite store appears on the list and I can create a store with the file > browser. For making the connection I had to copy sqlite-jdbc-3.8.6.jar from > \lib\ext into \lib. However, even now the connection fails with exception: > > java.lang.NoSuchMethodException: > org.sqlite.SQLiteConfig.enableLoadExtension(java.lang.Boolean) > at java.lang.Class.getMethod(Unknown Source) > at > com.vividsolutions.jump.datastore.spatialite.SpatialiteDataStoreDriver.createConnection(SpatialiteDataStoreDriver.java:63) > at > com.vividsolutions.jump.workbench.datastore.ConnectionDescriptor.createConnection(ConnectionDescriptor.java:75) > at > com.vividsolutions.jump.workbench.datastore.ConnectionManager.getOpenConnection(ConnectionManager.java:75) > at > com.vividsolutions.jump.workbench.ui.plugin.datastore.PasswordPrompter.getOpenConnection(PasswordPrompter.java:36) > at > com.vividsolutions.jump.workbench.ui.plugin.datastore.AddDatastoreLayerPanel.loadDatasetList(AddDatastoreLayerPanel.java:270) > at > com.vividsolutions.jump.workbench.ui.plugin.datastore.AddDatastoreLayerPanel.populateDatasetTree(AddDatastoreLayerPanel.java:197) > at > com.vividsolutions.jump.workbench.ui.plugin.datastore.AddDatastoreLayerPanel.getDatasetOutline(AddDatastoreLayerPanel.java:164) > at > com.vividsolutions.jump.workbench.ui.plugin.datastore.AddDatastoreLayerPanel.access$100(AddDatastoreLayerPanel.java:39) > at > com.vividsolutions.jump.workbench.ui.plugin.datastore.AddDatastoreLayerPanel$2.actionPerformed(AddDatastoreLayerPanel.java:67) > at javax.swing.JComboBox.fireActionEvent(Unknown Source) > at javax.swing.JComboBox.setSelectedItem(Unknown Source) > at javax.swing.JComboBox.setSelectedIndex(Unknown Source) > at javax.swing.plaf.basic.BasicComboPopup$Handler.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 javax.swing.plaf.basic.BasicComboPopup$1.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.pumpEventsForFilter(Unknown Source) > at java.awt.WaitDispatchSupport$2.run(Unknown Source) > at java.awt.WaitDispatchSupport$4.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at java.awt.WaitDispatchSupport.enter(Unknown Source) > 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.openjump.core.ui.plugin.file.OpenWizardPlugIn.execute(OpenWizardPlugIn.java:98) > at > com.vividsolutions.jump.workbench.plugin.AbstractPlugIn$1.actionPerformed(AbstractPlugIn.java:342) > 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) > > > -----Alkuperäinen viesti----- > Lähettäjä: edgar.sol...@web.de [mailto:edgar.sol...@web.de] > Lähetetty: 13. joulukuuta 2015 21:40 > Vastaanottaja: jump-pilot-devel@lists.sourceforge.net > Aihe: Re: [JPP-Devel] Adding other spatial databases support in OJ core > > Jukka, > > please try r4614 PLUS.. ede > > On 13.12.2015 19:00, Rahkonen Jukka (MML) wrote: >> Very interesting. Unfortunately r4609 did not build >> http://vorboss.dl.sourceforge.net/project/jump-pilot/OpenJUMP_snapshots/OpenJUMP-20151213-r4609.log. >> >> >> >> -Jukka Rahkonen- >> >> >> >> Nicolas Ribot wrote: >> >> >> >> Hi, >> >> >> >> I made a commit (r4609) adding Spatial databases support for MySQL/MariaDB >> and Spatialite. >> >> >> >> Some points concerning this commit: >> >> >> >> . FilterQuery and Adhoc queries are supported for all spatial databases >> >> . When a wrong WHERE clause is added to a datasource, SQL error is displayed >> and layer is removed from Panel(*) >> >> . Added some icons according to connection type and status: >> >> >> >> Inline images 1 >> >> >> >> . MariaDB: supports WKB and natives binary types, (thanks to code from Larry >> Reeder) >> >> . Spatialite: supports Spatialite binary type, WKB and WKT, supports several >> geometry_column metadata table layout. >> >> . Spatialite database file can be choosen with a FileChooser instead of >> classic server/dbname/user/pwd fields, as they are not relevant for >> Spatialite: >> >> >> >> Inline images 2 >> >> >> >> Microsoft® SQL Server support should come soon. >> >> >> >> (*) Michaël & ede: To manage SQL errors when adding a database layer, I >> modified ImageCacheRenderer: this is actually here the error is detected >> (and by default, only a warning is issued, which is fine: sometime, >> FeatureCollection returns a NoSuchFeatureException because of an extent >> error, and in this case, the layer should be added to the LayerPanel). >> >> >> >> AFAIU, when choosing a layer from a datastore, the OJ Layer is added to the >> panel, then a separate thread tries to load the Features. This thread >> triggers the actual SQL code for the layer. >> >> Instead of testing the layer each time a WHERE clause is added/modified, I >> chose to catch the SQLException in ImageCacheRenderer thread, then I remove >> the layer from the Panel. In case of other error types, layer is added to >> the Panel. >> >> >> >> Nicolas >> >> >> >> >> >> >> >> On 13 December 2015 at 12:20, <edgar.sol...@web.de >> <mailto:edgar.sol...@web.de>> wrote: >> >> the functionally correct approach of course would be adding the layer >> only after the request went trough fine. you can create layers and feature >> collections and throw them away if it wont work out. >> >> ..ede >> >> On 13.12.2015 00:17, Nicolas Ribot wrote: >> > Yes good idea, I will add a test before loading a layer. >> > >> > Nicolas >> > >> > On 12 December 2015 at 20:22, Michaël Michaud >> <m.michael.mich...@orange.fr <mailto:m.michael.mich...@orange.fr> >> <mailto:m.michael.mich...@orange.fr <mailto:m.michael.mich...@orange.fr>>> >> wrote: >> > >> > Hi Nicolas, >> > >> > Thanks for your answer. >> > >> > Just one idea about the problem Jukka has mentionned : >> > Maybe the query should be tested before the Layer is created. >> > A way to do that would be to add (or replace) the LIMIT clause >> with value 0 to have a lightweight query >> > giving the opportunity to catch a SQLException. >> > May not be the cleanest way to solve the problem though (several >> classes to patch). >> > >> > Michaël >> > >> > Le 12/12/2015 16:31, Nicolas Ribot a écrit : >> >> Hi Michaël, >> >> >> >> Thanks for the insight. >> >> >> >> I'm currently refactoring a bit the SpatialDatabases code. >> >> The error you pointed out showed me some problems with current >> code, and as you noted, I have to instantiate a correct, concrete class for >> each detected DSConnection. >> >> >> >> I'm finalising my todo list, but right now, FilterQuery and >> AdhocQuery can be ran on Postgis, Oracle, MySQL and Spatialite databases the >> same way. >> >> >> >> I'm currently finishing the support for Spatialite, that can be >> tricky: geometry column can contain WKT, WKB or native Spatialite binary >> format. Still have to correct the ValueConvert to correctly detect and >> convert each type. >> >> >> >> MySQL support is added with support for both WKB storage, >> internal binary storage (code from DBQuery). >> >> Layer extent is now correctly retrieved but has to be tested on >> big datasets (it merely uses a textual aggregation of all geometries to >> build the resulting envelope). >> >> >> >> I think I will be able to commit fixes soon. >> >> >> >> I'm stuck, though, on the problem Jukka mentioned: if you add a >> wrong where clause to the layer to load, error is detected in the >> com.vividsolutions.jump.workbench.ui.renderer.ImageCachingRenderer( line 90) >> where the error message is displayed in Window toolbar. >> >> I can display an ErrorDialog with SQL error, but do not know how >> to cleanly remove the layer from the panel. >> >> >> >> Nicolas >> >> >> >> >> >> On 12 December 2015 at 15:29, Michaël Michaud >> <m.michael.mich...@orange.fr <mailto:m.michael.mich...@orange.fr> >> <mailto:m.michael.mich...@orange.fr <mailto:m.michael.mich...@orange.fr>>> >> wrote: >> >> >> >> Hi Nicolas, >> >> >> >> I had a look but did not find an easy way to fix the problem. >> >> >> >> In SpatialDatabasesDSConnection you added a comment that it >> is no more necessary to subclass to PostGIS... >> >> >> >> On the other hand, >> >> - SpatialDatabasesDSConnection instantiates >> >> - SpatialDatabasesResultSetConverter which in turn >> instantiates >> >> - SpatialDatabasesFeatureInputStream which instantiates >> >> - SpatialDatabasesResultSetConverter which instiates a new >> >> - SpatialDatabasesValueConverterFactory >> >> >> >> The getConverter method of the later just return null which >> seems the root cause >> >> of my NPE. >> >> >> >> Seems like the concrete class should still be a subclass of >> SpatialDatabasesDSConnection. >> >> What do you think ? >> >> >> >> Another (maybe related) question : In the component to >> connect a new database, there >> >> is a combobox with a single value "PostGIS". Should we add >> other drivers in order to >> >> instantiate proper connection for each driver. There is >> commented code from you in >> >> JumpConfiguration class showing that you already have >> implemented such a solution >> >> in the past) >> >> >> >> Michaël >> >> >> >> >> >> Le 08/12/2015 10:30, Nicolas Ribot a écrit : >> >>> Hi Michaël, >> >>> >> >>> I will look at it. >> >>> >> >>> Nicolas >> >>> >> >> >>> On 7 December 2015 at 23:12, Michaël Michaud >> <<mailto:m.michael.mich...@orange.fr >> <mailto:m.michael.mich...@orange.fr>>m.michael.mich...@orange.fr >> <mailto:m.michael.mich...@orange.fr> <mailto:m.michael.mich...@orange.fr >> <mailto:m.michael.mich...@orange.fr>>> wrote: >> >>> >> >>> Hi >> >>> >> >>> Waw, thanks for this refactoring Nicolas ! >> >>> >> >>> Just noticed the following regression >> >>> >> >>> in the File > Execute Query plugin >> >>> If I try to query a postgis table as I did before, I get >> the following NPE : >> >>> java.lang.NullPointerException >> >>> at >> com.vividsolutions.jump.datastore.spatialdatabases.SpatialDatabasesResultSetConverter.init(SpatialDatabasesResultSetConverter.java:72) >> >>> >> >>> The same NPE occurs with the read/write postgis driver >> >>> >> >>> Any idea ? >> >>> >> >>> Michaël >> >>> >> >>> >> >>> Le 07/12/2015 18:16, Nicolas Ribot a écrit : >> >>>> Hi, >> >>>> >> >>>> Oracle Spatial support has been added to OJ core >> (read-only). >> >>>> It works the same way as Postgis support: define a DB >> connection to Oracle and choose spatial layers from the list of found layers >> to display them in OJ >> >>>> >> >>>> Oracle 9i -> 12c supported (though only tested recently >> with Oracle 11i and 12c). >> >>>> >> >>>> The SpatialDatabases plugin also contains code to >> support MariaDB/MySQL and Spatialite. (SQL Server in the pipe...) >> >>>> >> >>>> I was thinking about adding this code to the core, too. >> >>>> What do you think ? >> >>>> >> >>>> Nicolas >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> ------------------------------------------------------------------------------ >> >>>> Go from Idea to Many App Stores Faster with Intel(R) XDK >> >>>> Give your users amazing mobile app experiences with >> Intel(R) XDK. >> >>>> Use one codebase in this all-in-one HTML5 development >> environment. >> >>>> Design, debug & build mobile apps & 2D/3D high-impact >> games for multiple OSs. >> >>>> >> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 >> >>>> >> >>>> >> >>>> _______________________________________________ >> >>>> Jump-pilot-devel mailing list >> >> >>>> Jump-pilot-devel@lists.sourceforge.net >> <mailto:Jump-pilot-devel@lists.sourceforge.net> >> <mailto:Jump-pilot-devel@lists.sourceforge.net >> <mailto:Jump-pilot-devel@lists.sourceforge.net>> >> >>>> >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> >>> >> >>> >> >>> >> ------------------------------------------------------------------------------ >> >>> Go from Idea to Many App Stores Faster with Intel(R) XDK >> >>> Give your users amazing mobile app experiences with >> Intel(R) XDK. >> >>> Use one codebase in this all-in-one HTML5 development >> environment. >> >>> Design, debug & build mobile apps & 2D/3D high-impact >> games for multiple OSs. >> >>> >> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 >> >>> _______________________________________________ >> >>> Jump-pilot-devel mailing list >> >>> Jump-pilot-devel@lists.sourceforge.net >> <mailto:Jump-pilot-devel@lists.sourceforge.net> >> <mailto:Jump-pilot-devel@lists.sourceforge.net >> <mailto:Jump-pilot-devel@lists.sourceforge.net>> >> >>> >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> >>> >> >>> >> >>> >> >>> >> >>> >> ------------------------------------------------------------------------------ >> >>> Go from Idea to Many App Stores Faster with Intel(R) XDK >> >>> Give your users amazing mobile app experiences with Intel(R) >> XDK. >> >>> Use one codebase in this all-in-one HTML5 development >> environment. >> >>> Design, debug & build mobile apps & 2D/3D high-impact games >> for multiple OSs. >> >>> >> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 >> >>> >> >>> >> >>> _______________________________________________ >> >>> Jump-pilot-devel mailing list >> >>> Jump-pilot-devel@lists.sourceforge.net >> <mailto:Jump-pilot-devel@lists.sourceforge.net> >> <mailto:Jump-pilot-devel@lists.sourceforge.net >> <mailto:Jump-pilot-devel@lists.sourceforge.net>> >> >>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> >> Jump-pilot-devel mailing list >> >> Jump-pilot-devel@lists.sourceforge.net >> <mailto:Jump-pilot-devel@lists.sourceforge.net> >> <mailto:Jump-pilot-devel@lists.sourceforge.net >> <mailto:Jump-pilot-devel@lists.sourceforge.net>> >> >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> >> >> >> >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> >> >> >> >> _______________________________________________ >> >> Jump-pilot-devel mailing list >> >> Jump-pilot-devel@lists.sourceforge.net >> <mailto:Jump-pilot-devel@lists.sourceforge.net> >> <mailto:Jump-pilot-devel@lists.sourceforge.net >> <mailto:Jump-pilot-devel@lists.sourceforge.net>> >> >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> > >> > >> > >> ------------------------------------------------------------------------------ >> > >> > _______________________________________________ >> > Jump-pilot-devel mailing list >> > Jump-pilot-devel@lists.sourceforge.net >> <mailto:Jump-pilot-devel@lists.sourceforge.net> >> <mailto:Jump-pilot-devel@lists.sourceforge.net >> <mailto:Jump-pilot-devel@lists.sourceforge.net>> >> >> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> > >> > >> > >> > >> > >> ------------------------------------------------------------------------------ >> > >> > >> > >> > _______________________________________________ >> > Jump-pilot-devel mailing list >> > Jump-pilot-devel@lists.sourceforge.net >> <mailto:Jump-pilot-devel@lists.sourceforge.net> >> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> > >> >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Jump-pilot-devel mailing list >> Jump-pilot-devel@lists.sourceforge.net >> <mailto:Jump-pilot-devel@lists.sourceforge.net> >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> Jump-pilot-devel mailing list >> Jump-pilot-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> > > ------------------------------------------------------------------------------ > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > ------------------------------------------------------------------------------ > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > ------------------------------------------------------------------------------ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel