I'm currently working on a legacy system that's being rewritten by another contractor. Our mandate is to just keep the lights on until the rewrite is complete. So I understand all of what I'm listing is very old and out of date.
We have a java process that makes a direct connection to a 10.1 SDE. On windows 2008 server it works fine and everything is great. With windows 2008 coming to end of life we have to move to Windows 2012 or 2016. We have a sandbox setup for both environments. But using the same exact setup as on the Windows 2008 server, we get a very generic error
We believe the problem is in the connection binaries of the ArcSDE 10.2.2 library we are using.
The technologies we are using that seem to encapsulate the process that's failing: Oracle 12c, IBM Java 7, Geotools 10.6, and ArcSDE 10.2.2 (With a few ArcSDE 9.3 dll's thrown in, this may be key but we aren't sure. Specifically sdejavautil.dll)
The error we are getting is:
2019-12-11 22:56:31,454 ERROR [Thread-19] wfdss.framework.gis.geotools.ArcSDEFacade (ArcSDEFacade.java:165) - org.geotools.arcsde.ArcSdeException: Can't create connection to 10.1.10.92 for Session #1[SDE error -51 Unknown error][Error desc=DATABASE LEVEL ERROR OCCURRED.][Extended desc=Unknown error
]
at org.geotools.arcsde.session.Session$CreateSeConnectionCommand.execute(Session.java:621)
at org.geotools.arcsde.session.Session$CreateSeConnectionCommand.execute(Session.java:575)
at org.geotools.arcsde.session.Session.issue(Session.java:180)
at org.geotools.arcsde.session.Session.<init>(Session.java:166)
at org.geotools.arcsde.session.SessionPool$SeConnectionFactory.makeObject(SessionPool.java:384)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)
at org.geotools.arcsde.session.SessionPool.<init>(SessionPool.java:155)
at org.geotools.arcsde.session.SessionPoolFactory.createPool(SessionPoolFactory.java:69)
at org.geotools.arcsde.ArcSDEDataStoreFactory.createDataStore(ArcSDEDataStoreFactory.java:268)
at org.geotools.arcsde.ArcSDEDataStoreFactory.createDataStore(ArcSDEDataStoreFactory.java:259)
at wfdss.framework.gis.geotools.ArcSDEFacade.getDataStore(ArcSDEFacade.java:176)
at wfdss.framework.gis.geotools.ArcSDEFacade.getFeatureSource(ArcSDEFacade.java:154)
at wfdss.framework.gis.geotools.ArcSDEFacade.getTransform(ArcSDEFacade.java:738)
at wfdss.framework.gis.geotools.ReferenceShape.getProjectedGeometryBasedOnReferencePoint(ReferenceShape.java:593)
at wfdss.framework.gis.geotools.CommonGeoOps.getDistanceInMilesBetweenPointAndPoly(CommonGeoOps.java:2819)
at wfdss.framework.database.assessment.IncidentShapeBizFacade.checkIfFirePerimeterExceedsMaxDistToPtOfOrigin(IncidentShapeBizFacade.java:96)
at wfdss.framework.gis.ShapeFileHandler.uploadShape(ShapeFileHandler.java:556)
at wfdss.framework.gis.ShapeFileHandler.processShapes(ShapeFileHandler.java:255)
at wfdss.framework.gis.ShapeFileHandler.processUpload(ShapeFileHandler.java:199)
at wfdss.framework.gis.service.ShapeService$ShapeThread.shapeUpload(ShapeService.java:824)
at wfdss.framework.gis.service.ShapeService$ShapeThread.run(ShapeService.java:462)
at java.lang.Thread.run(Thread.java:795)
Caused by: com.esri.sde.sdk.client.SeException: Unknown error
at com.esri.sde.sdk.client.SeConnection.x(Unknown Source)
at com.esri.sde.sdk.client.SeConnection.<init>(Unknown Source)
at org.geotools.arcsde.session.Session$CreateSeConnectionCommand.execute(Session.java:610)
... 21 more
The line of code that's failing is below. Again, all of the passed in params are the same as what's working on 2008. Something inside the createDataStore method is failing. Just looking for ideas if anyone has anything to share if they had a similar experience.
ArcSDEDataStoreFactory.createDataStore(dataStoreParams);
The answer ended up being that we needed to install the SDE and JDK binaries using the "compatibility" setting for the install exe.
To do that you just right click on any exe, go to properties, there's a "compatibility" tab. Then just choose the version of windows you want to make ti compatible with.