Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Scripting BefImport failing

v.nonesJun 11 2015 — edited Jun 12 2015

Hi everyone,

I am new on FDMEE and I am having some issues launching fdmee scripts.
The operation is the same for all the files except for the ones in DSLEMAFIN, where I added a line trying to eliminate the double quotation marks of all the members of my file. When I launch the whole thing, it says in the log:


2015-06-11 11:12:58,106 INFO  [AIF]: Executing the following script: \\hypiagdesdata.corp.iberia.es\FDMEE/data/scripts/event/BefImport.py

2015-06-11 11:12:58,127 ERROR [AIF]: The script has failed to execute:

2015-06-11 11:12:58,852 FATAL [AIF]: Error in Launch GL Load Balances Data

2015-06-11 11:12:58,866 INFO  [AIF]: FDMEE Process End, Process ID: 2367

But if I launch only the script that affects the files in DSLLOAD location, it works and process the whole file.

Could anybody please help me with this?

import os
import re

if fdmContext["LOCNAME"] == "DSLLOAD":
     fdmAPI.logInfo(fdmContext["LOCNAME"])
     try:
          filename = fdmContext["FILENAME"]
          inbox = fdmContext["INBOXDIR"]
          #filedir = fdmContext["FILEDIR"]
          fdmAPI.logInfo(filename)
          fdmAPI.logInfo(inbox)
          file = inbox + "\\DSLLOAD\\" + filename
         file_out = inbox + "\\DSLLOAD\\" + filename + ".out"
          #file = inbox + "\\" + filedir + "\\"+filename
          #file_out = inbox + "\\" + filedir + "\\"+filename + ".out"
          fdmAPI.logInfo(file)
          fin = open(file,"r")
          fout = open(file_out,"w")
          for line in fin:
               lineSplit=line.split(",")
               #fdmAPI.logInfo(lineSplit[1])
               lineIni=lineSplit[0]+","+lineSplit[1]+","+lineSplit[2]+","+lineSplit[3]+","+lineSplit[4]+","+lineSplit[5]+","+lineSplit[6]
               fout.write(lineIni+",PAX_QTY,"+lineSplit[7]+"\n")
               fout.write(lineIni+",AVL_SEAT_QTY,"+lineSplit[8]+"\n")
               fout.write(lineIni+",RPK_QTY,"+lineSplit[9]+"\n")
               fout.write(lineIni+",ASK_QTY,"+lineSplit[10]+"\n")
               fout.write(lineIni+",TOTAL_FLT_NOS,"+lineSplit[11]+"\n")
               fout.write(lineIni+",TOTAL_FLT_LEGS,"+lineSplit[12])
          fin.close()
          fout.close()
     except IOError, err:
         fdmAPI.logError("My error"+ str(err))

     os.remove(file)
     os.rename(file_out,file)

if fdmContext["LOCNAME"] == "DSLEMAFIN":
     fdmAPI.logInfo(fdmContext["LOCNAME"])
     try:
          filename = fdmContext["FILENAME"]
          inbox = fdmContext["INBOXDIR"]
          #filedir = fdmContext["FILEDIR"]
          fdmAPI.logInfo(filename)
          fdmAPI.logInfo(inbox)
          file = inbox + "\\DSLEMAFIN\\" + filename
          file_out = inbox + "\\DSLEMAFIN\\" + filename + ".out"
          #file = inbox + "\\" + filedir + "\\"+filename
          #file_out = inbox + "\\" + filedir + "\\"+filename + ".out"
          fdmAPI.logInfo(file)
          fin = open(file,"r")
          fout = open(file_out,"w")
          for line in fin:

               line=line.replace('"','')
               lineSplit=line.split(",")
               #fdmAPI.logInfo(lineSplit[1])
               lineIni=lineSplit[0]+","+lineSplit[1]+","+lineSplit[2]+","+lineSplit[3]+","+lineSplit[4]+","+lineSplit[5]+","+lineSplit[6]+","+lineSplit[7]","+lineSplit[8]
               fout.write(lineIni+",psj_qty,"+lineSplit[9]+"\n")
               fout.write(lineIni+",avl_seat_qty,"+lineSplit[10]+"\n")
               fout.write(lineIni+",rpk,"+lineSplit[11]+"\n")
               fout.write(lineIni+",ask,"+lineSplit[12])
          fin.close()
          fout.close()
     except IOError, err:
         fdmAPI.logError("My error"+ str(err))

     os.remove(file)
     os.rename(file_out,file)


if fdmContext["LOCNAME"] == "DSLTAKEOFFMR":
     fdmAPI.logInfo(fdmContext["LOCNAME"])
    try:
          filename = fdmContext["FILENAME"]
          inbox = fdmContext["INBOXDIR"]
          #filedir = fdmContext["FILEDIR"]
          fdmAPI.logInfo(filename)
          fdmAPI.logInfo(inbox)
          file = inbox + "\\DSLTAKEOFFMR\\" + filename
          file_out = inbox + "\\DSLTAKEOFFMR\\" + filename + ".out"
          #file = inbox + "\\" + filedir + "\\"+filename
          #file_out = inbox + "\\" + filedir + "\\"+filename + ".out"
          fdmAPI.logInfo(file)
          fin = open(file,"r")
          fout = open(file_out,"w")
          for line in fin:
               lineSplit=line.split(",")
               #fdmAPI.logInfo(lineSplit[1])
               lineIni=lineSplit[0]+","+lineSplit[1]+","+lineSplit[2]+","+lineSplit[3]+","+lineSplit[4]+","+lineSplit[5]+","+lineSplit[6]+","+lineSplit[7]+","+lineSplit[8]
               fout.write(lineIni+",GC_KM_DIS,"+lineSplit[9]+"\n")
               fout.write(lineIni+",FIRST_SEAT_QTY,"+lineSplit[10]+"\n")
               fout.write(lineIni+",CLUB_SEAT_QTY,"+lineSplit[11]+"\n")
               fout.write(lineIni+",WTP_SEAT_QTY,"+lineSplit[12]+"\n")
               fout.write(lineIni+",ECON_SEAT_QTY,"+lineSplit[13]+"\n")
               fout.write(lineIni+",BLOCK_HRS_DUR,"+lineSplit[14]+"\n")
               fout.write(lineIni+",TAXI_HRS_DUR,"+lineSplit[15]+"\n")
               fout.write(lineIni+",TAXI_OUT_HRS_DUR,"+lineSplit[16]+"\n")
               fout.write(lineIni+",TAXI_IN_HRS_DUR,"+lineSplit[17]+"\n")
               fout.write(lineIni+",FLY_HRS_DUR,"+lineSplit[18]+"\n")
               fout.write(lineIni+",PAX_FIRST_QTY,"+lineSplit[19]+"\n")
               fout.write(lineIni+",PAX_CLUB_QTY,"+lineSplit[20]+"\n")
               fout.write(lineIni+",PAX_WTP_QTY,"+lineSplit[21]+"\n")
               fout.write(lineIni+",PAX_ECON_QTY,"+lineSplit[22]+"\n")
               fout.write(lineIni+",PAX_NR_QTY,"+lineSplit[23]+"\n")
               fout.write(lineIni+",ASK_FIRST,"+lineSplit[24]+"\n")
               fout.write(lineIni+",ASK_CLUB,"+lineSplit[25]+"\n")
               fout.write(lineIni+",ASK_WTP,"+lineSplit[26]+"\n")
               fout.write(lineIni+",ASK_ECON,"+lineSplit[27]+"\n")
               fout.write(lineIni+",OPS,"+lineSplit[28]+"\n")
               fout.write(lineIni+",RPK_FIRST,"+lineSplit[29]+"\n")
               fout.write(lineIni+",RPK_CLUB,"+lineSplit[30]+"\n")
               fout.write(lineIni+",RPK_WTPLUS,"+lineSplit[31]+"\n")
               fout.write(lineIni+",RPK_ECON,"+lineSplit[32]+"\n")
               fout.write(lineIni+",RPK_NR,"+lineSplit[33])
          fin.close()
          fout.close()
     except IOError, err:
         fdmAPI.logError("My error"+ str(err))

     os.remove(file)
     os.rename(file_out,file)

Thank you!

Valeria

This post has been answered by v.nones on Jun 12 2015
Jump to Answer

Comments

Mahmoud_Rabie

Hi Marussig

APEX 18.1 has an easy way to debug

Dimitri Gielis Blog (Oracle Application Express - APEX): Error!?! What's going in APEX? The easiest way to Debug and Tra…

In addition, you could make the ORA errors appear friendly

How to provide user friendly messages for ORA errors

I hope that helps

Regards

Mahmoud

marussig

Thanks. The problem persist and is not in my app. I think I need to create a bug report somewhere. This "- ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error: character string buffer too small" raise somewhere from system plsql package on copy app. Do you have some more recommendations? Otherwise my app runs fine.

Thanks again

- ora_sqlerrm: ORA-06502: PL/SQL: numeric or value error: character string buffer too small

ORA-06512: at "APEX_180100.WWV_FLOW_APPLICATION_INSTALL", line 267

ORA-06512: at "APEX_180100.WWV_FLOW_IMP_PARSER", line 1397

revion-sr-13072018-2.jpg

Mahmoud_Rabie

I think it is a bug.

Please rename the thread title by adding [BUG] to get attention of APEX team.

Carsten Czarski-Oracle

Hi,

was that debug output taken from an APEX 18.1 instance ...?

And what is the Alias name of the application ...?

Best regards

-Carsten

marussig

Hi,

app name: Application 107 - iskram055

Yes debug output was taken from an APEX 18.1 instance

Thanks

Answer

HI,

OK - the error stack you have shared indicates that something is not OK with the Application Alias ...

Bildschirmfoto 2018-07-13 um 14.42.25.png

-) Can you export the app ...?

-) Can you import it back ...?

-) What happens if you clear the Application Alias field before copying ...?

Best regards

-Carsten

Marked as Answer by marussig · Sep 27 2020
marussig

Hm... that's app alias:

F_1348921352961353191356821211571363221363881283511376111179841188256536792338122888126859150153155161162163165166168169170171174172175176177178179180189191193194195184185190196197198199200201202204205206207208209210211212213214215216217218219220116117157

I changed it and it works!!!

---

Summary: before copying should at least be checked app alias !

Thanks

Export is ok, import is ok

Hi,

the Application Alias is limited to 255 characters. And when an application is being copied and the Alias does not equal the application ID, then the new application ID is appended to the existing alias. Looking at your alias, it seems that this application has been copied quite a few times.

The final copy operation would then extend the alias to more than 255 characters thus we see that error ... a corner case, but an interesting one  

Best regards

-Carsten

marussig

That is right. I've made copies more times because of upgrades app.

1 - 9
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 10 2015
Added on Jun 11 2015
3 comments
511 views