Skip to Main Content

Oracle Forms

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Playing Audio - Forms 12c new features

buggleboy007Nov 16 2020 — edited Nov 16 2020

Hello Michael,
We wish to play an audio that has been recorded when a specific form is launched. This is what we have done:
a) recorded a file and named it as po.mp3
b) gave the file to middleware who then signed it into a jar file (as mentioned in the new features document). These were his words "The file is accessible from /apps/retail/base/12c/icons on the server, or http://srv-fm1:7777/forms/icons/audio.jar"
c) based on the above, I called the file in WHEN-NEW-FORM-INSTANCE as :
PLAY_AUDIO('po.mp3'); This resulted in no luck.
so tried: PLAY_AUDIO('http://srv-fm1:7777/forms/icons/audio.jar/po.mp3');;) Even this resulted in no luck.
Is there anything else that needs to be done that is missing? Please advice.
Thanks in advance!
PS: For a known issue mentioned by Oracle for Forms: 12.2.1.1.0 (which is what we are using)
2.3.9 Oracle Forms does not play Audio Files using URL served by WebLogic Server
Oracle Forms audio functionality does not works if the URL, to obtain an audio files, is served by Oracle WebLogic Server. The audio file will fail to load.
The URL for the audio files must be served by the Oracle HTTP Server. Audio files delivered in JAR file can use URL served by either Oracle WebLogic Server or Oracle HTTP Server.
I checked with my DBA if the above is causing an issue and here was his reply:
We are using weblogic. We run Oracle HTTP Server on top of the WLS_FORMS / WLS_REPORTS managed servers.

This post has been answered by Michael Ferrante-Oracle on Nov 17 2020
Jump to Answer

Comments

662454
Result of my own research is, that utl_file.fcopy isn't meant for copying binary files as xls or pdf files are. Copied file's length had changed a bit which can be explained by fcopy putting CR+LF characters after each "line". Whatever line it finds in a binary file. Thus, it's not suitable for my needs.

The DBMS_FILE_TRANSFER package won't do either, because it requieres directory objects as source and destination. Because physical file structure provides a special folder for each file and its versions, I would have to dynamically (re-)create directory objects for each copy process. This could be done by dynamic DDL but can't be done because of the whole process being started by a trigger which doesn't allow the auto commit of DDL statements. Yes, I could wrap that in an autonomous transaction but, well, that seems to be no good practise. And more, the copy method of that package relies on a very specific file size in exact multiples of 512 bit (I didn't quite get the reason for that).

Seems, I will have to put all that files (which are more than 1000 an more than 2GB) in BLOBs. Wonder, what problems that will give to me...

Yet, any hints and opinions are still welcome.

Regards
Claus.
662454
Problem solved by using DBMS_SCHEDULER ablilities.

Claus.
Rnr-Oracle
To expand on what I assume the solution was (for reference).

The poster probably used the dbms_scheduler get_file and put_file functions which are new in 11g.

They allow files to be copied to/from the operating system as a particular user. The username and password of the operating system must be stored in the database as a credential object using dbms_scheduler.create_credential.

Hope someone finds this useful,
Ravi.
662454
Hi there

We are driving a 10g version, so I wasn't able using the get_file/put_file methods. No, I just created an executable type job and provided a rather lengthy string as job action.
This action string contains calling cmd.exe witch again calls copy.bat.
Like that:
"c:\winnt\system32\cmd.exe /q c:\copy.bat path\to\sourcefile path\to\destinationfile > nul"

No other parameters for cmd.exe should be provided, in contradiction to what other examples say. Copy.bat is a wrapper batch file for native copy command.

That's all.

Claus.
1 - 4

Post Details

Added on Nov 16 2020
19 comments
1,025 views