I found the problem. I had this jar file: appserv-rt.jar In my library path. When I removed it it ran offline just fine but now won't run online. Ugh. I will ask the Java App Server group in my project on how to programatically set the jndi stuff and unset it when I am offline. I am the GeoTools and display developer. So I don't know anything about Corba.
Thanks for pointing me in the right direction. It was a library after all just not a GeoTools library. Maybe this will help someone else who is working with j2ee apps. Greg ----- Original Message ----- From: Jody Garnett <jody.garn...@gmail.com> Date: Tuesday, December 16, 2008 9:37 pm Subject: Re: [Geotools-devel] Corba COMM_FAILURE error trying to using GeoTools application offline To: Greg Machala <greg.mach...@noaa.gov> Cc: geotools-devel@lists.sourceforge.net > Greg Machala wrote: > > I still cannot get my application to run offline. > > > I run several other GeoTools based applications offline all the time; > > perhaps I am asking you to repeat yourself but can you mention what > version of Java and what platform you are on? Also the JNDI stuff is > often configured at the JRE level ... could another application have > messed you up? > > I am working on Java 5 right now BTW. > > Jody > > I have tweaked on my libraries some more and migrated to a > > setAreaOfInterest(ReferencedEnvelope) instead of the deprecated > > setAreaOfInterest(Envelope) > > Here are my current gt libs: > > ------------------------------------- > > geoapi-nogenerics-2.1.0.jar gt2-render-2.4.4.jar > > gt2-api-2.4.4.jar gt2-shapefile-renderer-2.4.4.jar > > gt2-coverage-2.4.4.jar jsr108-0.01.jar > > gt2-epsg-hsql-2.4.4.jar jts-1.8.jar > > gt2-main-2.4.4.jar log4j-1.2.12.jar > > gt2-metadata-2.4.4.jar vecmath-1.3.1.jar > > gt2-referencing-2.4.4.jar > > ------------------------------------- > > > > It still gives the corba issues trying to do a jndi lookup. > > Can you turn off the jndi lookup with some hashmap setting? > > In this trace here: > > > org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createDataSource > ThreadedEpsgFactory.java:306) > > I can look at gt source code and I see why it is throwing an initial > context exception > > but why does it need to do a lookup? I have created my crs from > scratch and > > have included the espg library for offline use the gt2-epsg-hsql jar > file. > > > > Here is where I am stuck: > > --------------------- > > GTRenderer renderer; > > CoordinateReferenceSystem crs; > > > > crs = Utilities.getCRS(); // Gets the crs from WKT in Utilities.java > > map = new DefaultMapContext(mapLayers, crs); > > ReferencedEnvelope refEnv = new ReferencedEnvelope(envelope, crs); > > map.setAreaOfInterest(ReferencedEnvelope); > > renderer.setContext(map); > > renderer.paint(g, paintArea, refEnv); <---- Throws the exception below: > > > > > > > >> Dec 16, 2008 12:07:05 PM > com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init> > >> WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: > socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700" > >> org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 > completed: No > >> at > >> com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2690) > >> at > >> com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2711) > >> SEtting radar legend visible true > >> at > >> com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:261) > >> at > >> com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:274) > >> at > >> com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:130) > >> at > >> com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:192) > >> at > >> com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:181) > >> at > >> com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:325) > >> at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112) > >> at > >> org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69) > >> at > >> com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:127) > >> at > >> com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:182) > >> at > >> com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:339) > >> at javax.naming.InitialContext.lookup(InitialContext.java:392) > >> at > >> org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createDataSource(ThreadedEpsgFactory.java:306) > >> at > >> org.geotools.referencing.factory.epsg.FactoryOnHSQL.createDataSource(FactoryOnHSQL.java:204) > >> at > >> org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore0(ThreadedEpsgFactory.java:384) > >> at > >> org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:476) > >> at > >> org.geotools.referencing.factory.DeferredAuthorityFactory.getBackingStore(DeferredAuthorityFactory.java:138) > >> at > >> org.geotools.referencing.factory.BufferedAuthorityFactory.isAvailable(BufferedAuthorityFactory.java:232) > >> at > >> org.geotools.referencing.factory.DeferredAuthorityFactory.isAvailable(DeferredAuthorityFactory.java:126) > >> at > >> org.geotools.factory.FactoryRegistry.isAvailable(FactoryRegistry.java:681) > >> at > >> org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:513) > >> at > >> org.geotools.factory.FactoryRegistry.getServiceImplementation(FactoryRegistry.java:447) > >> at > >> org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:376) > >> at > >> org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.java:137) > >> at > >> org.geotools.referencing.ReferencingFactoryFinder.getAuthorityFactory(ReferencingFactoryFinder.java:216) > >> at > >> org.geotools.referencing.ReferencingFactoryFinder.getCoordinateOperationAuthorityFactory(ReferencingFactoryFinder.java:472) > >> at > >> org.geotools.referencing.operation.AuthorityBackedFactory.getAuthorityFactory(AuthorityBackedFactory.java:167) > >> at > >> org.geotools.referencing.operation.AuthorityBackedFactory.isAvailable(AuthorityBackedFactory.java:444) > >> at > >> org.geotools.factory.FactoryRegistry.isAvailable(FactoryRegistry.java:681) > >> at > >> org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:513) > >> at > >> org.geotools.factory.FactoryRegistry$1.filter(FactoryRegistry.java:190) > >> at > >> javax.imageio.spi.FilterIterator.advance(ServiceRegistry.java:793) > >> at > >> javax.imageio.spi.FilterIterator.<init>(ServiceRegistry.java:787) > >> at > >> javax.imageio.spi.ServiceRegistry.getServiceProviders(ServiceRegistry.java:491) > >> at > >> org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:194) > >> at > >> org.geotools.referencing.ReferencingFactoryFinder.getFactories(ReferencingFactoryFinder.java:174) > >> at > >> org.geotools.referencing.ReferencingFactoryFinder.getCoordinateOperationFactories(ReferencingFactoryFinder.java:331) > >> at > >> org.geotools.referencing.operation.BufferedCoordinateOperationFactory.getBackingFactory(BufferedCoordinateOperationFactory.java:196) > >> at > >> org.geotools.referencing.operation.BufferedCoordinateOperationFactory.getBackingFactory(BufferedCoordinateOperationFactory.java:214) > >> at > >> org.geotools.referencing.operation.BufferedCoordinateOperationFactory.initializeHints(BufferedCoordinateOperationFactory.java:227) > >> at > >> org.geotools.referencing.operation.AbstractCoordinateOperationFactory.getImplementationHints(AbstractCoordinateOperationFactory.java:230) > >> at > >> org.geotools.factory.FactoryRegistry.usesAcceptableHints(FactoryRegistry.java:564) > >> at > >> org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:518) > >> at > >> org.geotools.factory.FactoryRegistry.getServiceImplementation(FactoryRegistry.java:447) > >> at > >> org.geotools.factory.FactoryRegistry.getServiceProvider(FactoryRegistry.java:376) > >> generating loop images > >> at > >> org.geotools.factory.FactoryCreator.getServiceProvider(FactoryCreator.java:137) > >> at > >> org.geotools.referencing.ReferencingFactoryFinder.getFactory(ReferencingFactoryFinder.java:192) > >> at > >> org.geotools.referencing.ReferencingFactoryFinder.getCoordinateOperationFactory(ReferencingFactoryFinder.java:319) > >> at > >> org.geotools.geometry.TransformedDirectPosition.<init>(TransformedDirectPosition.java:169) > >> at > >> org.geotools.referencing.GeodeticCalculator.<init>(GeodeticCalculator.java:262) > >> at > >> org.geotools.referencing.GeodeticCalculator.<init>(GeodeticCalculator.java:239) > >> at > >> org.geotools.renderer.lite.RendererUtilities.calculateScale(RendererUtilities.java:600) > >> at > >> org.geotools.renderer.lite.RendererUtilities.calculateScale(RendererUtilities.java:454) > >> at > >> org.geotools.renderer.shape.ShapefileRenderer.computeScale(ShapefileRenderer.java:1442) > >> at > >> org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:1296) > >> at > >> org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:262) > >> at > >> org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:1486) > >> at > >> gov.noaa.nws.displayGUI.ThreadedRenderer.render(ThreadedRenderer.java:790) > >> at > >> gov.noaa.nws.displayGUI.ThreadedRenderer.run(ThreadedRenderer.java:505) > >> Caused by: java.lang.RuntimeException: java.net.ConnectException: > Connection refused > >> > >> On Tue, 2008-12-16 at 19:00 +1100, Jody Garnett wrote: > >> > >>> I would guess that it is trying to check JNDI for a local EPSG > database; > >>> are you sure you only have one epsg jar on the classpath as > described in > >>> the developers guide? The epsg-wkt and epsg-hsql jars can work in > > >>> unplugged form. The epsg-postgres jar will need network access - > if you > >>> provide connection information it will use it; if not it will use > a JNDI > >>> lookup and try and hunt it down (producing the kind of error you > see here). > >>> > >>> Jody > >>> > >>> Michael Bedward wrote: > >>> > >>>> Hi Greg, > >>>> > >>>> I know nothing about CORBA but it looks like the app is dying > when it > >>>> tries to create the EPSG database (in your temp directory unless > >>>> you've set a system property for it to be elsewhere). > >>>> > >>>> Do you have the necessary jars included ? e.g. gt-epsg-hsql > >>>> > >>>> Is your temp directory set to be somewhere other than your local > drive ? > >>>> > >>>> Michael > >>>> > >>>> > >>>> org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createDataSource(ThreadedEpsgFactory.java:306) > >>>> > >>>> > >>>>> at > >>>>> org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore0(ThreadedEpsgFactory.java:384) > >>>>> at > >>>>> org.geotools.referencing.factory.epsg.ThreadedEpsgFactory.createBackingStore(ThreadedEpsgFactory.java:476) > >>>>> at > >>>>> org.geotools.referencing.factory.DeferredAuthorityFactory.getBackingStore(DeferredAuthorityFactory.java:138) > >>>>> at > >>>>> org.geotools.referencing.factory.BufferedAuthorityFactory.isAvailable(BufferedAuthorityFactory.java:232) > >>>>> at > >>>>> org.geotools.referencing.factory.DeferredAuthorityFactory.isAvailable(DeferredAuthorityFactory.java:126) > >>>>> at > >>>>> org.geotools.factory.FactoryRegistry.isAvailable(FactoryRegistry.java:681) > >>>>> at > >>>>> org.geotools.factory.FactoryRegistry.isAcceptable(FactoryRegistry.java:513) > >>>>> at > >>>>> org.geotools.factory.FactoryRegistry$1.filter(FactoryRegistry.java:190) > >>>>> at > >>>>> javax.imageio.spi.FilterIterator.advance(ServiceRegistry.java:793) > >>>>> at > >>>>> javax.imageio.spi.FilterIterator.<init>(ServiceRegistry.java:787) > >>>>> at > >>>>> javax.imageio.spi.ServiceRegistry.getServiceProviders(ServiceRegistry.java:491) > >>>>> at > >>>>> org.geotools.factory.FactoryRegistry.getServiceProviders(FactoryRegistry.java:197) > >>>>> at > >>>>> org.geotools.referencing.ReferencingFactoryFinder.getFactories(ReferencingFactoryFinder.java:174) > >>>>> at > >>>>> org.geotools.referencing.ReferencingFactoryFinder.getCRSAuthorityFactories(ReferencingFactoryFinder.java:452) > >>>>> at > >>>>> org.geotools.referencing.DefaultAuthorityFactory.getBackingFactory(DefaultAuthorityFactory.java:81) > >>>>> at > >>>>> org.geotools.referencing.DefaultAuthorityFactory.<init>(DefaultAuthorityFactory.java:62) > >>>>> at org.geotools.referencing.CRS.getAuthorityFactory(CRS.java:176) > >>>>> at org.geotools.referencing.CRS.decode(CRS.java:410) > >>>>> at > >>>>> org.geotools.data.coverage.grid.AbstractGridFormat.<clinit>(AbstractGridFormat.java:97) > >>>>> at > >>>>> gov.noaa.nws.displayGUI.SvrClrGui.initComponents(SvrClrGui.java:1054) > >>>>> at gov.noaa.nws.displayGUI.SvrClrGui.<init>(SvrClrGui.java:197) > >>>>> at gov.noaa.nws.displayGUI.SvrClrGui.main(SvrClrGui.java:343) > >>>>> Caused by: java.lang.RuntimeException: java.net.SocketException: > Network is unreachable > >>>>> > >>>>> > >>>>> > >>>>> -----------------------------ATTACHED CODE---------------------------- > >>>>> package test; > >>>>> > >>>>> import java.util.logging.Level; > >>>>> import java.util.logging.Logger; > >>>>> import org.geotools.data.coverage.grid.AbstractGridFormat; > >>>>> import org.opengis.referencing.crs.CoordinateReferenceSystem; > >>>>> > >>>>> /** > >>>>> * > >>>>> * @author greg > >>>>> */ > >>>>> public class Main { > >>>>> > >>>>> /** > >>>>> * @param args the command line arguments > >>>>> */ > >>>>> public static void main(String[] args) { > >>>>> try { > >>>>> System.out.println("Starting"); > >>>>> CoordinateReferenceSystem crs = > >>>>> AbstractGridFormat.getDefaultCRS(); > >>>>> System.out.println("crs="+crs.toString()); > >>>>> } catch (Exception ex) { > >>>>> > Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); > >>>>> } > >>>>> > >>>>> } > >>>>> > >>>>> } > >>>>> > >>>>> > >>>>> > >>>>> ------------------------------------------------------------------------------ > >>>>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las > Vegas, Nevada. > >>>>> The future of the web can't happen without you. Join us at > MIX09 to help > >>>>> pave the way to the Next Web now. Learn more and register at > >>>>> > >>>>> _______________________________________________ > >>>>> Geotools-devel mailing list > >>>>> Geotools-devel@lists.sourceforge.net > >>>>> > >>>>> > >>>>> > >>>>> > >>>> ------------------------------------------------------------------------------ > >>>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las > Vegas, Nevada. > >>>> The future of the web can't happen without you. Join us at MIX09 > to help > >>>> pave the way to the Next Web now. Learn more and register at > >>>> > >>>> _______________________________________________ > >>>> Geotools-devel mailing list > >>>> Geotools-devel@lists.sourceforge.net > >>>> > >>>> > >>>> > >>> ------------------------------------------------------------------------------ > >>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las > Vegas, Nevada. > >>> The future of the web can't happen without you. Join us at MIX09 > to help > >>> pave the way to the Next Web now. Learn more and register at > >>> > >>> _______________________________________________ > >>> Geotools-devel mailing list > >>> Geotools-devel@lists.sourceforge.net > >>> > >>> > >> ------------------------------------------------------------------------------ > >> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, > Nevada. > >> The future of the web can't happen without you. Join us at MIX09 > to help > >> pave the way to the Next Web now. Learn more and register at > >> > >> _______________________________________________ > >> Geotools-devel mailing list > >> Geotools-devel@lists.sourceforge.net > >> > >> > > > > > ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel