I think you will need to chat with the module maintainer; or report an issue.
Sorry I don't have a decent J2EE environment handy to test with.
--
Jody Garnett
On Wednesday, 16 March 2011 at 6:55 PM, Francisco wrote:
> Ty Jody, I'm using tomcat. With connection parameters it works fine. An also
> with this:
>
> PostgisNGDataStoreFactory factory = new PostgisNGDataStoreFactory();
>
> parameters.put(PostgisNGDataStoreFactory.DATASOURCE.key, ds);
> JDBCDataStore dt = null;
> try {
> dt = factory.createDataStore(parameters);
> } catch (IOException e1) {
> // TODO Auto-generated catch block
> e1.printStackTrace();
> }
>
>
>
> 2011/3/15 Jody Garnett <[email protected]>
> > Can you do a quick check to see if you have all the needed jars? Try and
> > connect to the JDBC datastore using connection parameters (that will test
> > if the code is all there and the jdbc driver etc...).
> >
> > Other than that you are following the code example on the wiki:
> > - http://docs.codehaus.org/display/GEOTDOC/11+JDBC
> >
> > So if that does not work you may need to check the test cases.
> >
> > Note that I am not sure you have the JNDI_REFNAME value correct. the value
> > used in the code example is for a really bad implementation of JNDI (only
> > really good for test cases). When you are running in your application
> > server (JBoss?) you will need to use the exact value your app server
> > administrator has provided.
> >
> > That key is used to look up the PostgreSQL "DataSource" configured by the
> > app server administrator; allowing several web apps to use the same
> > connection pool.
> >
> > --
> > Jody Garnett
> >
> > On Tuesday, 15 March 2011 at 1:06 AM, Francisco wrote:
> > > Hi List, I'm trying to connect with JNDI using this:
> > > try {
> > > parameters.put(JDBCJNDIDataStoreFactory.DBTYPE.key, "postgis");
> > > parameters.put(JDBCJNDIDataStoreFactory.JNDI_REFNAME.key,
> > > "java:/comp/env/jdbc/pggisdb");
> > >
> > > DataStore store = null;
> > >
> > > store = DataStoreFinder.getDataStore(parameters);
> > > } catch (IOException e2) {
> > > // TODO Auto-generated catch block
> > > e2.printStackTrace();
> > > }
> > >
> > > But, it returns me a null object.
> > > The connection exists and works fine, but with this code I can't
> > > get/create the datastore.
> > > Is anything wrong?
> > > Thanks in advance.
> > > ------------------------------------------------------------------------------
> > > Colocation vs. Managed Hosting
> > > A question and answer guide to determining the best fit
> > > for your organization - today and in the future.
> > > http://p.sf.net/sfu/internap-sfd2d
> > > _______________________________________________
> > > Geotools-gt2-users mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> > >
> >
>
>
> --
> Un día te encontré y al otro te perdí
>
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users