Hello,
I am new to Jython/FDM development, but have an extensive experience with VB and C#.
I did my first Jython script this morning, that opens a log file and then extract only the data client wants to see. I used Eclipse and this worked pretty fine.
Now, I try to go a bit further and open the log as it were on the server.
Accordingly, I used the following code:
import java.math.BigDecimal as BigDecimal
import java.sql as sql
import com.hyperion.aif.scripting.API as API
fdmAPI = API()
conn = None
conn = sql.DriverManager.getConnection("jdbc:oracle:thin:@<myserver>:1521/<user>, "FDMEE", "QAFDMEE20151")
conn.setAutoCommit(False)
fdmAPI.initializeDevMode(conn);
fdmContext = fdmAPI.initContext(BigDecimal(1353))
INBOXDIR = fdmContext["INBOXDIR"] # read server configuration.
vPstrNasPath = "\\" + INBOXDIR[:26] + "\\\\EPMNASQA\\\\"
The problem is the line : import com.hyperion.aif.scripting.API as API.
I copied all the aif jars from server to my laptop and imported them to my project via menu.
However, the line has a red dot in Eclipse and when I click on it, I see: Unresolved Import: API
When I run the code, there is a following error:
Traceback (most recent call last):
File "C:\Users\<my user>\workspace\CAEScripts\Code\AfterBach_ELIM.py", line 8, in <module>
import com.hyperion.aif.scripting.API as API
ImportError: No module named hyperion
What should I do in order to make this work?
Thanks,
Mike