Issue Type: Bug Bug
Affects Versions: 8.0-RC1
Assignee: Unassigned
Created: 04/Jun/12 9:45 PM
Description:

Here is the stack trace:

java.lang.NullPointerException
at org.geotools.jdbc.JDBCDataStore.createConnection(JDBCDataStore.java:1627)
at org.geotools.jdbc.JDBCDataStore.createTypeNames(JDBCDataStore.java:819)
at org.geotools.data.store.ContentDataStore.entry(ContentDataStore.java:562)
at org.geotools.data.store.ContentDataStore.ensureEntry(ContentDataStore.java:593)
at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:385)
at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:352)
at org.geotools.data.store.ContentDataStore.getSchema(ContentDataStore.java:336)

Looks like we have a logic error where the provided t Transaction is accessed

t.putState(this, estate);

The parameter t is allowed to be null according to the javadocs:

The GeoTools transaction. Can be

Unknown macro: {@code null}
, in that case a new connection will be returned (as if
Unknown macro: {@link Transaction#AUTO_COMMIT}
was provided)

But the source code does not check for that case:

if(t == Transaction.AUTO_COMMIT) {
      Connection cx = createConnection();
      ...
   }
Project: GeoTools
Priority: Major Major
Reporter: Jody Garnett
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to