I have created script tool which uses cx_oracle and able to add in arcgis tool box. This tool executed fine in arcgis.
Then i have created gp service using this script and the service is created successfully on arcgis server.
But when i try to execute this gp service from arcgis, there is following error from server logs.
Any suggestions on how to resolve this ?
SEVERE Dec 8, 2016 5:40:27 PM Error executing tool. test/test.GPServer
SEVERE Dec 8, 2016 5:40:27 PM Traceback (most recent call last):
File "C:\arcgisserver\directories\arcgissystem\arcgisinput\test\test.GPServer\extracted\v101\pmms\module1.py",
line 19, in import cx_Oracle ImportError: DLL load failed:
%1 is not a valid Win32 application.
Failed to execute (Script). Failed to execute (Script). test/test.GPServer
I think server is running 64bit.
What is this tool using which is trying to execute something in 32bit.
Having had some recent experience getting GP services to run, its a bit of an art. Stuff can work perfectly as a tool in Desktop, but then just do nothing at all running as a service on the server.
Python is installed with ArcGIS ( i think both are 32 bit).
Any work around for this ?
You need to make sure that the 64 bit version of the cx_oracle module is available on the Server. Once you do that, try to import it using the version of Python included with the Server install, (you can use Idle). If it imports in Idle, your service will work.
Thanks for your reply.
I have installed 64 bit cx_Oracle as mentioned in your link.
cx_Oracle-5.2.1-11g.win-amd64-py2.7.exe (md5)
Then i set path variable to refer C:\Python27\ArcGISx6410.1;C:\Python27\ArcGISx6410.1\Lib\site-packages.
I started IDLE from server install and tried to import cx_Oracle. There is error.
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import cx_Oracle
ImportError: No module named cx_Oracle
>>>
Can you verify that the cx_oracle package exists in the C:\Python27\ArcGISx6410.5\Lib\site-packages folder?
C:\Python27\ArcGISx6410.1\Lib\site-packages folder contains following.
cx_Oracle.pyd --> PYD file
cx_Oracle-5.2.1-py2.7.egg-info --> folder
dependency_links
PKG-INFO
SOURCES
top_level
Hm, to be honest, I don't really understand how that module installs. Perhaps someone else with more knowledge on it can help out. After installing, I was expecting to see a cx_oracle folder, (or something to that effect), with the associated scripts, (_init_.py, etc) in it.
How did you install cx_Oracle? If you are getting an import error, then it isn't installed correctly.
I downloaded the .exe and ran through the setup wizard. It created the folders the OP described, so it sounds like the OP did the same thing. Not sure if the installer is funny or there are other steps required.