I will try the to use the debugger then, although I have never done 
this so I was wondering if you could point me to a wiki or a document 
that discusses this. I'm guessing you run with mvnDebug instead of mvn, 
then attach jdb with jdb --attach 8000. However having tried this I try 
to create breakpoints in the test classes and it doesn't break so not 
quite sure where to go from there. Thanks a lot!

On 06/30/2010 10:07 AM, Andrea Aime wrote:
> Alex Trofast ha scritto:
>>  Thanks for your response Andrea,
>>
>> Regarding FilterFactory I was just really wondering if it made use of 
>> the FilterToSql class when building filters.
>
> Nope, FilterFactory is completely stand alone, does not use anything
> else. It would not make sense for it to use a sql encoding artifact
> either, OGC filters are data storage independent.
>
>> The follow test errors out (JDBCFeatureSourceTest):
>>
>>         FilterFactory ff = dataStore.getFilterFactory();
>>         SortBy sort = ff.sort(aname("stringProperty"), 
>> SortOrder.ASCENDING);
>>         DefaultQuery query = new DefaultQuery();
>>         query.setSortBy(new SortBy[] { sort });
>>
>>         SimpleFeatureCollection features = 
>> featureSource.getFeatures(query); <--- HERE
>>
>> With a NullPointerException. I'm uncertain as to why that is and 
>> having some difficult tracking it down.
>
> If the NPE is really there I guess your featureSource is null.
> Odd, but checks what's going on when the code grabs it.
>
>>
>> The way I build geometries is through a AsBinary(col_name) then in 
>> decodeGeometryValue I do this:
>>
>>         try {
>>             byte bytes[] = rs.getBytes(column);
>>
>>             if(bytes == null) {
>>                 return null;
>>             }
>>             Geometry geom = (Geometry) new WKBReader().read(bytes);
>>             return geom;
>>         }
>>
>> There are no exceptions as far as I can tell so the read is okay. 
>> AsBinary will return WKB as per the specification.
>
> Unfortunately I have no idea. I would have debug step by step through
> the code, but you can do the same as well.
>
> Cheers
> Andrea
>
>


-- 
Alex
http://bit.ly/geodb


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to