By following GeoTools tutorials I have been able to create a custom GeoTools
datastore compiled against GT v2.3.5. I tested by creating a main() method
for my DataStore that was able to succesfully acess all the features I was
expecting.
I am now trying to use that datastore with GeoServer 1.5.4 running on
Windows XP. I created a .jar file that contains the file
META-INF/services/org.geotools.data.DataStoreFactorySpi, which points to my
DataStore Factory class.
I then put that .jar file in GeoServer 1.5.4\webapps\geoserver\WEB-INF\lib
and fired up geoserver. I went to Config->Data->DataStores->new. I don't see
my DataStore Factory's display name in the Feature Data Set drop down menu.
I then tried another custom datastore that was nothing more than the
.properties file demo datastore with the display name changed. That worked,
so I know the problem is not GeoServer
I have tried using the logger, thowing exceptions and simple
System.out.println, just to get some output from my datastore factory. I
never see any of my logs, exceptions or prints in the command window that
appears when I start GeoServer
The only clue I have that GeoServer noticed the new .jar file is the Data
graphic on the left side of the screen when I am in the config pages.
Normally, I see Data: followed by a fully green progress bar. When my .jar
file is in place the last 8th of that progress bar is grey instead of green.
How do you debug a datastore? I need some way of finding out where it is
failing.
--
View this message in context: http://www.nabble.com/Debug-custom-DataStore-tp14582417p14582417.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Hi Richard,
Apologies for the late reply. Your email was stuck in our message queue.
Unfortunately the easiest way to debug a datastore is to set up a
development environment and run GeoServer in a debugger. However that
may not be your cup of tea.
Where are you putting your logging statements and exceptions? I
recommend you put one in the canProcess() method of your datastore
factory. YOu should also note that if you throw an exception from this
method geoServer will recover and simply ignore your datasatore. So some
logging or a sysout might be better.
Also I would be happy to look at your datastore and see if I can load it
up over here. I am already set up with a development environment so i
would be happy to give your datastore a try.
-Justin
Richard Stanfield wrote:
By following GeoTools tutorials I have been able to create a custom GeoTools
datastore compiled against GT v2.3.5. I tested by creating a main() method
for my DataStore that was able to succesfully acess all the features I was
expecting.
I am now trying to use that datastore with GeoServer 1.5.4 running on
Windows XP. I created a .jar file that contains the file
META-INF/services/org.geotools.data.DataStoreFactorySpi, which points to my
DataStore Factory class.
I then put that .jar file in GeoServer 1.5.4\webapps\geoserver\WEB-INF\lib
and fired up geoserver. I went to Config->Data->DataStores->new. I don't see
my DataStore Factory's display name in the Feature Data Set drop down menu.
I then tried another custom datastore that was nothing more than the
.properties file demo datastore with the display name changed. That worked,
so I know the problem is not GeoServer
I have tried using the logger, thowing exceptions and simple
System.out.println, just to get some output from my datastore factory. I
never see any of my logs, exceptions or prints in the command window that
appears when I start GeoServer
The only clue I have that GeoServer noticed the new .jar file is the Data
graphic on the left side of the screen when I am in the config pages.
Normally, I see Data: followed by a fully green progress bar. When my .jar
file is in place the last 8th of that progress bar is grey instead of green.
How do you debug a datastore? I need some way of finding out where it is
failing.
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org