Legacy ArcGIS system on Windows 2012 with ArcSDE 10.2.2 won't connect - arcgis

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);

don't see too many GIS questions on here so thats why I clicked. Past Gis and geologist guy here.
I did some research and found this article. Hopefully its an easy fix as it was for this person.
http://www.forumtopics.com/busobj/viewtopic.php?p=1003011
If not I think maybe updating certain drivers that are being utilized by the methods may help. I remember having an issue with some sort of connection and I had to make sure all the drivers matched with what I was using. Also checking to make sure if the drivers I was using were the correct bit.
Sorry I don't have an exact solution, but just trying to help.

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.

Related

Visual studio live share limited functionality

I was looking for a solution to the problem on many internet forums, but I couldn't find it. The topic always ends with the sentence - that we will fix this problem with the next VS update. (Since 2017...). Even after updating VS nothing changes. When I try to share my project with Live share, my guest cannot access the project files and can't open them, he gets an error:
The Output Channel Recipient has limited functionality due to the lack of the dependency service: Microsoft.VisualStudio.Shell.OutputChannelStore (0.1).
C ++ Service has limited functionality due to the lack of a dependency service: Microsoft.VisualStudio.VC.ManagedPackageService.
I use visual studio 2022 community. Since April, there have been a lot of entries about this problem, but somehow there is no solution, anyone knows what's going on?
With current version of VS(which was downloaded on 16.12.2022) live share works correctly.

Compiled Access Program Runs Fine on 7 Computers but Crashes on 3 others

I have written a rather complex application in Microsoft Access. It is split into front end and back end files. To protect my code, I have compiled it and saved it as a runtime .accde file, which I then changed to an .accdr file to ensure it operated as a runtime. I have created two versions of the application: one for those with 32-bit Office installed and one for those with 64-bit office. I have used Inno Setup to package the application, the data file, and other files such as the icon file, the license file, etc., into an installable package, which works just fine.
Among my team of 27 beta testers of this application, so far 6 have downloaded it, and I have tested it on four of my own computers. On seven of these computers, the installation works perfectly and the application runs with no problems.
On the computers of three of my testers, when they try to run it, they get this error message:
The expression On Open you entered as the event property setting produced the following error: Bad file name or number.
* The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
I'm pretty sure I know where the code is that's causing the problem, but cannot for the life of me figure out why the application crashes on those 2 computers but not on others.
The On Open event I suspect of causing the problem checks the linked tables, gets their connect string, then looks at the path for that string for the back end database. If it does not find it there, the procedure pops up a file selector dialog and instructs the user to find the data file, then it relinks all the tables.
If anyone could point me in the right direction to fixing this problem, I would be extremely grateful.
This is typically caused by a reference labelled as MISSING.
You have two (three) options:
Run the application on the offending machines with a full version of Access that lets you debug the code
Create a small test application that lists and verifies the references you use, and run this on the offending machines
Remove those two customers
Thanks to all the contributors here. Because of these folks and additional online research, the latest answer I can find is this:
This error occurs on a small percentage of computers on which the app is installed, and no one has yet figured out why, what causes it, or how to fix it. The workaround is to install the 2013 version of the Access runtime, as later versions will still cause the problem.
At least one of the offending computers is running the Click-to-Run version of Office. Still gathering information, but that's the status as of now.

Recent rash of Microsoft Access database files in an inconsistent state

A large number of our clients operating a split front end/back end Microsoft Access application we built are encountering frequent but intermittent database file corruption issues. When the back end file is opened this message appears: "Microsoft Access has detected that this database is in an inconsistent state, and will attempt to recover the database … "
Opening the database with DAO using Visual Basic code results in error code 3343, "Unrecognized database format."
The repair attempt succeeds and we have not witnessed any data loss or dropping of primary keys, indexes, or relationships. Most cases involve where the back end file is located on a shared network drive. Some searches suggest that the latest Windows 10 update 1803 is suspect. Has anybody else encountered this?
It has recently been reported several times. A very thorough coverage of this issue can be found here.
Strangely, the cure can - at least for some cases - be found in old support threads:
Moved to Server 2012 getting Access Database Corruption
Cannot access shared files or folders on a drive in Windows Server 2012 or Windows Server 2012 R2
Comments:
It’s a bit strange though as the patch to fix the issue is back in May
2014 which is already installed on the server.
I can only think that
something in the latest Windows 10 Build 1803 has brought up the issue
again as it was PC’s that are running that build were causing the
problem.
The fix is adding the following entry into Vospers Server
2012 R2 registry:
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters
Value: DisableLeasing
Type: DWORD
Data: 0x1
We testing this on our server and the problem went away. As soon as we
changed the ‘Disable leasing’ value to ‘0’ again, the problem
returned.
I can’t find a reasonable explanation yet as to why this
has started to happen last week but if it works and doesn’t cause any
further issues elsewhere then I’m ok with that.
Also note that homegroups have been removed from Win10 1803. This may affect rights on shared folders.

MS Access 2016 Treeview error: "No object in this control element. Runtime error 438"

I have a problem to open the treeview in MS Access. I think it's since the last windows update.
I'm getting an error message when I start the program:
"There is no object in this control element. Runtime error 438: Object
does not support this property or method."
The debugger marks one line yellow in the vba code: CreateTree TreeView0.Nodes.
I didn't change anything since the last time. There it has still worked.
I did the following steps, but they all didn't help:
reinstalled MS Access
repaired MS Access
exchanged the C:\Windows\SysWOW64\MSCOMCTL.ocx, unregistered and registered it
updated VB6 to the latest version
added the database again
I hope that someone can help me!
This is a known new bug in mscomctl.ocx in many localisations - if not all, including English.
From one of the reportings:
Now they are experiencing the problem also with MSI installations of
Office 2016 which have been updated by the Windows update of Aug 1. On
these systems mscomctl.oxc seems to not have been updated as it still
showed version 6.1.98.46.
They had to disinstall the update of Aug 1
(KB4011051 -> no mention there of this issue) to get rid of the
problem.
There is at this moment no info from MS when and how it will be corrected.
This may be a better long term solution for you.
https://www.access-treeview.com/
Wish you the best
Another alternative TreeView control is here: http://www.vbforums.com/showthread.php?698563-CommonControls-(Replacement-of-the-MS-common-controls)
This is because you have 64bit version of MS Office installed. Install 32bit version and you'll see TreeView and others again.

COMExcepton occurred trying to create a new instance of Microsoft.Office.Interop.Word.Application

I am trying to create a word document using visual basic. I have found that this can be done using the Microsoft.Office.Interop.Word objects.
I have found some tutorials online (https://support.microsoft.com/en-us/kb/316384) about how to create a word document programmatically.
I have created a simple windows form application. When a button is clicked the word document will be created. I made sure to add the reference to Microsoft.Office.Interop.Word in my application.
My problem is that an error keeps getting thrown at this point:
app = New Microsoft.Office.Interop.Word.Application
The error is:
COMException occurred
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
Additional information: Retrieving the COM class factory for component with CLSID (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: ox80080005 (COE_SERVER EXEC FAILURE)).
I have read that the following needs to be done, so I have made sure that word 2013 is installed on my machine and I have set the target CPU to x64 inside the application's properties.
If anyone has any insight to what I am missing or if I am doing something wrong I would appreciate the help.
Update:
I have tested my code on another machine and it works. So the source of this error is not the code.
Update: Pt. 2
I've been doing some more research (http://www.microsoft.com/technet/support/ee/transform.aspx?ProdName=Windows+Operating+System&ProdVer=5.2&EvtID=10010&EvtSrc=DCOM&LCID=1033) and I believe I may be getting closer to the source of the problem. I've gone into the registry and it seems that the local server it is failing to communicate with is pointing to WINWORD.exe which makes sense. What does not make sense is that it is looking for the wrong WINWORD.exe. I am going to try and fix this so it is pointing to the WINWORD.exe for Word 2013 instead of Word 2010.
Solution
What ended up fixing my problem was preforming a quick repair on office. I went to control panel, programs and features, selected office, pressed the change button, and selected quick repair. Do not know what caused things to get messed up, but this did fix my problem.
Where do you run the code? Is it a Windows service or ASP.NET application?
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution. Read more about that in the Considerations for server-side Automation of Office article.
You may find existing threads with the same issue described:
System.Runtime.InteropServices.COMException (0x80080005): Retrieving the COM class factory for component with CLSID
Office Automation in .NET - COMException 80080005
Word Automation with ASP.NET
Finally, if all the mentioned information is not relevant to your case I'd suggest repairing Office. It looks like something is wrong with its windows registry keys.