ヘッダーをスキップ
Oracle® Fusion Middlewareリリース・ノート
11gリリース1 (11.1.1) for Microsoft Windows (32-Bit)
B55923-08
  ドキュメント・ライブラリへ移動
ライブラリ
製品リストへ移動
製品
目次へ移動
目次

前
 
次
 

32 Oracle Forms

この章では、Oracle Formsに関連する問題について説明します。次のトピックが含まれています。

32.1 一般的な問題および回避策

この項では、一般的な問題および回避策について説明します。次のトピックが含まれています。

32.1.1 以前のリリースとの後方互換性

Forms 6iからのアップグレードの詳細は、『Oracle Fusion Middleware Forms Servicesデプロイメント・ガイド』の「Oracle Forms Services 11gへのアップグレード」の章を参照してください。変更された機能と不要になった機能の詳細は、『Oracle Forms Oracle Forms 6iからOracle Forms 11gへのアップグレード』を参照してください。

Oracle Forms 10g以下のリリースからアップグレードする場合、アップグレード・アシスタントを使用できます。詳細は、『Oracle Fusion Middlewareアップグレード・プランニング・ガイド』および『Oracle Fusion Middleware Oracle Portal, Forms, ReportsおよびDiscovererアップグレード・ガイド』を参照してください。

後方互換性の詳細は、My Oracle Supportノート113987.1(http://myoraclesupport.oracle.com)を参照してください。

どのリリースのOracle Formsからアップグレードするかにかかわらず、現在のアプリケーションを再コンパイルしてOracle Formsを再起動する必要があります。

Forms BuilderをJAWSと組み合せて使用すると、アイテムを作成するために[Ctrl]を押しながら[Insert]を押すショートカット・キーは、機能しません。この問題を回避するには、メニューのニーモニック・キーを使用します。[Alt]を押しながら[E]を押すと、「編集」メニューが開き、次に[R]を押すと「作成」を選択してアイテムを作成できます。

FormsとReportsを異なるインスタンスで構成している場合、シェルでORACLE_HOMEおよびORACLE_INSTANCEの正しい値を設定し、Windowsのショートカット・メニューではなくシェルからForms Builderを起動する必要があります。この操作を行わないと、Forms Builder内からのReports Builderの起動に失敗します。

Oracle WebLogic管理対象サーバーを再起動する前に、そのサーバーにより起動されたすべてのJVMコントローラ・プロセス(dejvm)を停止する必要があります。そうしないと、停止後にWLS_FORMSが再起動しません。

Forms Servicesで2つのOracleインスタンスを構成しており、Windowsマシンで単一のORACLE_HOMEを使用している場合、2番目のORACLE_INSTANCEFORMS_ORACLE_INSTANCEレジストリ・エントリが優先的に使用されます。Forms Builderコンポーネントは、2番目のORACLE_INSTANCEで構成することをお薦めします。

Formsの複数のバージョンがインストールされているWindowsマシン上では、最初にインストールしたOracle Formsがデフォルトで実行されません。これは、Fusion MiddlewareをWindowsにインストールすると、新規の$ORACLE_HOME/binがシステム変数PATHの先頭に追加されるためです。後続のインストールによって、システム変数PATHの先頭に$ORACLE_HOME/binが追加されます。前にインストールしたバージョンを実行するための回避策として、システム変数PATHを編集します。使用する$ORACLE_HOME/binを変数PATHの前に移動します。

32.2 構成の問題および回避策

この項では、構成に関する問題およびその回避策について説明します。次のトピックが含まれています。

32.2.1 One-Button-Runの使用時におけるInternet Explorer以外のブラウザのプロキシ設定

Internet Explorer以外のサポートされる任意のブラウザでOne-Button-Runを使用している際にFORBIDDENエラーが発生した場合、127.0.0.1 (localhost)がブラウザのプロキシ・設定に存在するかどうかを確認してください。127.0.0.1が例外リストに存在しない場合は、追加します。これにより、ブラウザはプロキシ・サーバーを迂回できます。

32.2.2 WebUtilクライアント・ファイルで可能な宛先ディレクトリの構成

WebUtilでは、Windows上のJREまたはJVMのbinディレクトリに、またはLinux上のJREのlibディレクトリにinstall.syslibライブラリをダウンロードします。この場所は、webutil.cfgのパラメータinstall.syslib.location.client.<OS> = <Path on client machine>で指定できます(<Path on client machine>は、WebUtilによりクライアントで使用されるライブラリが格納される場所へのパスを表し、絶対パスまたはクライアント・ユーザー・ホームに対する相対パスです)。

32.2.3 異なるライブラリで名前が変更されるwebutil.propertiesファイル

install.syslibライブラリのダウンロード時に、WebUtilでは、webutil.propertiesファイルをクライアント・ユーザー・ホームに作成します。異なるサーバーでクライアントにライブラリをダウンロードして管理できるように、異なるwebutil.propertiesファイルがクライアント側で保持されます。クライアント上のファイルの名前は、webutil.<HOST>.<CONFIG>.propertiesです(HOSTはサーバー・コンピュータの名前で、CONFIGformsweb.cfgの構成セクションの名前です)。

32.2.4 JDK 1.6.0_12の存在するクライアントにWinRunnerもあるとFormsが動作しない問題

WinRunnerがインストールされているクライアント上でJDKバージョン1.6.0_12以上を使用すると、Formsを実行できません。

この問題を回避するには、2つの環境変数_JAVA_OPTIONSおよびJAVA_TOOLS_OPTIONSの名前を変更します。たとえば、これらの名前をtest_JAVA_OPTIONSおよびtest_JAVA_TOOLS_OPTIONSに変更します。これにより、WinRunnerは無効化されますが、Formsは実行できます。

32.2.5 IEのフレーム付きHTMLファイルでJavaScript通信が機能しない問題

file://プロトコルに基づいてInternet Explorer 7、またはInternet Explorer 8で開かれたフレーム付きHTMLファイルでは、JavaScript通信は機能しません。

この問題を回避するには、フレームのURLでマシン名のかわりにIPアドレスを使用します。たとえば、testform.htmで、次を変更します:

<frame noresize="noresize" 
 src="http://testform.us.example.com:8888/forms/java/js2frm1.html" name="fr2" 
 frameborder="0"> 
   <frame noresize="noresize" 
 src="http://testform.us.example.com:8888/forms/frmservlet?play=&record=forms& 
 form=js2frm1&userid=scott/tiger@adt10220" name="fr1" frameborder="0">

変更後:

<frame noresize="noresize" 
 src="http://<IP address>:8888/forms/java/js2frm1.html" name="fr2" 
 frameborder="0"> 
   <frame noresize="noresize" 
 src="http://<IP address>:8888/forms/frmservlet?play=&record=forms&form=js2fr 
 m1&userid=scott/tiger@adt10220" name="fr1" frameborder="0">

32.2.6 Safari 5ブラウザでFormsアプリケーションをコールするJavaScriptイベントが機能しない問題

WindowsのSafari 5ブラウザでJavaScriptをFormsアプリケーションと統合して使用する場合、Formsからブラウザ上で稼働するJavaScriptへの通信は機能しますが、JavaScriptからのアプレットのコールは機能しません。

回避策として、次の手順を実行します。

  1. base.htmを使用していることを確認します。

  2. base.htmで、<APPLET>タグをラップする<NOSCRIPT></NOSCRIPT>タグを削除します。

32.3 ドキュメントの訂正箇所

この項では、ドキュメントの訂正箇所を示します。次のトピックが含まれています。

32.3.1 セキュア・モードでのユーザーIDの引渡し

セキュア・モードでのユーザーIDの引渡しに関する次の情報は、Oracle Forms Builderオンライン・ヘルプに追加する必要があります。

Formsコンパイラを使用する場合の引数としてユーザーIDを渡すこと(frmcmpまたはfrmcmp_batch)によって、セキュリティが脆弱になることがあります。コンパイラでは、すでに使用可能な対話式ダイアログ・モードに加えて、標準入力による接続文字列も受け入れられます。ユーザーIDをセキュア・モードで渡すには、次を実行します:

  1. 環境変数FORMS_STDIN_PASSWORDを1に設定します。

  2. 接続文字列を入力せずにコンパイラを実行します。コンパイラの開始後に接続文字列を入力します。

  3. リダイレクトを使用してコンパイラを実行し、パスワードをコンパイラに渡します。(これは特に、1スクリプトで複数のFormsをコンパイルする際に役立ちます。)例:

        #!/bin/sh
         echo "Enter userid"
         read -s myuserid
         for i in 'ls *.fmb'
         do
         echo Compiling Form $i ....
         frmcmp_batch.sh batch=yes module=$i module_type=form compile_all=yes <<<
              "$myuserid"
         done
    

このスクリプトはパスワード保護のためのサンプルであり、一部のプラットフォームや構成では、セキュリティの脆弱性は解決しないことがあります。

32.3.2 JDAPIプログラミング例

Forms Developerオンライン・ヘルプのJDAPIプログラミング例は、次のコードに更新する必要があります。

import java.io.File; 
import java.io.PrintWriter; 
import java.io.FileWriter; 
import java.text.MessageFormat; 
 
import oracle.forms.jdapi.*; 
 
/** 
* Dumps passed forms JdapiObjects to an output stream as text. 
* 
* Set command line options for more output, else only the 
* basic form tree structure will be dumped. 
* 
* See printUsage for command line options. 
*/ 
public class FormDumper 
{ 
/** 
* Need this to parse the command line options 
* 
* The string represents valid command options as detailed in the 
* Getopt class 
*/ 
 
boolean m_dumpAllProps = false; 
boolean m_dumpBoolProps = false; 
boolean m_dumpNumProps = false; 
boolean m_dumpTextProps = false; 
boolean m_dumpPropNames = false; 
String m_dumpPath = null; 
/** 
* Output stream, default to STDOUT */ 
private PrintWriter m_out = new PrintWriter(System.out, true); 
 
/** 
* Use this to indent children 
*/ 
private String m_indentation = ""; 
 
/** 
* Constructor 
*/ 
public FormDumper() 
{ 
 
} 
 
/** 
* Special constructor that does not take command line arguments. 
* 
* @param out The output writer where to send dump information. 
*/ 
public FormDumper(PrintWriter out) 
{ 
m_out = out; 
m_dumpAllProps = true; 
m_dumpBoolProps = true; 
m_dumpNumProps = true; 
m_dumpTextProps = true; 
m_dumpPropNames = true; 
} 
 
/** 
* Set the dump path. 
* 
* @param path The file where the dumper must send the information 
*/ 
public void setDumpPath(String path) 
{ 
m_dumpPath = path; 
} 
 
/** 
* Indirect output 
*/ 
public void println(String s) 
{ 
m_out.println(s); 
} 
 
/** 
* Dump a form to the output stream 
*/ 
public void dumpForm(String filename) 
throws Exception 
{ 
FormModule fmb = FormModule.open(filename); 
System.out.println("Dumping module " + fmb.getName()); 
 
if (m_dumpPath != null) 
{ 
// use this form's FILE name to name the dump file 
String thisFormName = new File(filename).getName(); 
thisFormName = thisFormName.substring(0, (thisFormName.length()-4)); 
StringBuffer dmpFilename = new StringBuffer(); 
dmpFilename.append(m_dumpPath); 
 
if (!dmpFilename.toString().endsWith("/")) 
{ 
dmpFilename.append("/"); 
} 
dmpFilename.append(thisFormName); 
 
m_out = new PrintWriter(new FileWriter(dmpFilename.toString()), true); 
} 
 
// Call the actual 'dump' method 
dump(fmb); 
 
// Dump the coordinate system used by the module 
m_indentation = " "; 
dump(new Coordinate(fmb)); 
m_indentation = ""; 
println("Dumped " + fmb.getName()); 
 
// Close the module 
fmb.destroy(); 
} 
 
/** 
* Recursively dump a forms JdapiObject and its children to the output stream 
*/ 
protected void dump(JdapiObject jo) 
{ 
String className = jo.getClassName(); 
 
// print out a context line for the JdapiObject 
// If it is a coordinate system, it does not have a name 
 
if(className.equals("Coordinate")) 
{ 
println(m_indentation + "Coordinate System "); 
} 
else 
{ 
println(m_indentation + className + " " + jo.getName()); 
} 
 
// Property classes need special treatment 
if(className.equals("PropertyClass")) 
{ 
dumpPropertyClass((PropertyClass)jo); 
} 
else // Generically dump the required property types only 
{ 
if (m_dumpTextProps) 
{ 
dumpTextProps(jo); 
} 
if (m_dumpBoolProps) 
{ 
dumpBoolProps(jo); 
} 
 
if (m_dumpNumProps) 
{ 
dumpNumProps(jo); 
} 
// Additionally, dump any Item list elements 
if(className.equals("Item")) 
{ 
dumpListElements((Item)jo); 
} 
} 
 
// use Form's metadata to get a list of all the child JdapiObjects this 
JdapiObject can have 
JdapiMetaObject meta = JdapiMetadata.getJdapiMetaObject(jo.getClass()); 
JdapiIterator props = meta.getChildObjectMetaProperties(); 
JdapiMetaProperty prop = null; 
JdapiIterator iter = null; 
JdapiObject child = null; 
 
// loop through every possible kind of child JdapiObject this JdapiObject 
//can have 
while(props.hasNext()) 
{ 
prop = (JdapiMetaProperty)props.next(); 
// only bother if we can access these JdapiObjects 
if(!prop.allowGet()) 
{ 
continue; 
} 
 
// get the actual values for the current child JdapiObject type, 
// e.g. get the Items on a Block 
iter = jo.getChildObjectProperty(prop.getPropertyId()); 
 
// null is returned if there are no property values 
if(iter != null) 
{ 
// loop over every child value 
while(iter.hasNext()) 
{ 
child = (JdapiObject)iter.next(); 
// recursively navigate to it 
m_indentation += " "; 
dump(child); 
if(m_indentation.length()>2) 
m_indentation = m_indentation.substring(0, m_indentation.length()-2) 
; 
} 
} 
} 
} 
/** 
* Dump list elements 
* 
* The JdapiObject is an item; if it is a list item, 
* dump the list elements. 
* 
* @param item 
*/ 
private void dumpListElements(Item item) 
{ 
if( item.getItemType() == JdapiTypes.ITTY_LS_CTID) 
{ 
if (m_dumpPropNames)
 { 
println(m_indentation + "dumping list elements"); 
} 
for(int i = 1; i <= item.getListElementCount(); i++) 
{ 
String label = item.getElementLabel(i); 
String value = item.getElementValue(i); 
println( m_indentation + " " + i + ": '" + label + "' '" + value + "'"); 
} 
} 
} 
/** 
* Dump the property class properties
 */ 
private void dumpPropertyClass(PropertyClass pc) 
{ 
String propertyVal = null; 

// test for every single possible property 
// this is a bit hacky :) 
for(int propertyId = 1; propertyId < JdapiTypes.MAXIMUM_PTID; ++propertyId) 
{ 
if(!pc.hasProperty(propertyId))
{ 
continue; // this property is not in the set 
} 
if(pc.hasDefaultedProperty(propertyId) && !m_dumpAllProps) 
{ 
continue; 
} 
Class pt = JdapiMetaProperty.getPropertyType(propertyId); 
if(pt == Boolean.class) 
{ 
if(m_dumpBoolProps) 
{ 
propertyVal = String.valueOf(pc.getBooleanProperty(propertyId)); 
} 
} 
else if(pt == Integer.class) 
{ 
if(m_dumpNumProps) 
{ 
propertyVal = String.valueOf(pc.getIntegerProperty(propertyId)); 
} 
} 
else if(pt == String.class) 
{ 
if(m_dumpTextProps) 
{ 
propertyVal = pc.getStringProperty(propertyId); 
} 
} 
if(null != propertyVal) 
{ 
if (m_dumpPropNames) 
{ 
println(m_indentation + " " + JdapiMetaProperty.getPro 
pertyName(propertyId) + " " + 
propertyVal); 
} 
else 
{ 
println(m_indentation + propertyVal); 
} 
propertyVal = null; 
} 
} // End loop over every property 
} 
/** 
* Dump the source JdapiObject text properties 
*/ 
private void dumpTextProps(JdapiObject jo) 
{ 
JdapiMetaObject meta = JdapiMetadata.getJdapiMetaObject(jo.getClass()); 
JdapiIterator props = meta.getStringMetaProperties(); 
// for each text property 
while(props.hasNext()) 
{ 
JdapiMetaProperty prop = (JdapiMetaProperty) props.next(); 
int propertyId = prop.getPropertyId(); 
String propertyVal = null; 
try 
{ 
propertyVal = jo.getStringProperty(propertyId); 
} 
catch(Exception e) 
{ 
println(m_indentation + "Could_not_get_property " + 
JdapiMetaProperty.getPropertyName(propertyId)); 
continue; 
} 
if ( jo.hasProperty(propertyId) 
&& (m_dumpAllProps || !(jo.hasDefaultedProperty(propertyId)) ) ) 
{ 
if(m_dumpPropNames) 
{ 
println( m_indentation + " " + JdapiMetaProperty. 
getPropertyName(propertyId) + " " + 
propertyVal); 
} 
else 
{ 
println(m_indentation + propertyVal); 
} 
} 
} 
} 
/** 
* Dump the source JdapiObject boolean properties 
*/ 
private void dumpBoolProps(JdapiObject jo) 
{ 
JdapiMetaObject meta = JdapiMetadata.getJdapiMetaObject(jo.getClass()); 
JdapiIterator props = meta.getBooleanMetaProperties(); 
// for each boolean property 
while(props.hasNext()) 
{ 
JdapiMetaProperty prop = (JdapiMetaProperty) props.next(); 
int propertyId = prop.getPropertyId(); 
boolean propertyVal = false; 
try 
{ 
propertyVal = jo.getBooleanProperty(propertyId); 
} 
catch(Exception e) 
{ 
println(m_indentation + "Could_not_get_property " + 
JdapiMetaProperty.getPropertyName(propertyId)); 
continue; 
} 
if ( jo.hasProperty(propertyId) 
&& (m_dumpAllProps ) ) 
{ 
if(m_dumpPropNames) 
{ 
println(m_indentation + " " + JdapiMetaProperty. 
getPropertyName(propertyId) + " " + 
propertyVal); 
} 
else 
{ 
println(m_indentation + propertyVal); 
} 
} 
} 
} 
/** 
* Dump the source JdapiObject numeric properties 
*/ 
private void dumpNumProps(JdapiObject jo) 
{ 
JdapiMetaObject meta = JdapiMetadata.getJdapiMetaObject(jo.getClass()); 
JdapiIterator props = meta.getIntegerMetaProperties(); 
// for each numeric property 
while(props.hasNext()) 
{ 
JdapiMetaProperty prop = (JdapiMetaProperty) props.next(); 
int propertyId = prop.getPropertyId(); 
int propertyVal = 0; 
try 
{ 
propertyVal = jo.getIntegerProperty(propertyId); 
} 
catch(Exception e) 
{ 
println(m_indentation + "Could_not_get_property " + 
JdapiMetaProperty.getPropertyName(propertyId)); 
continue; 
} 
if ( jo.hasProperty(propertyId) 
&& (m_dumpAllProps || !(jo.hasDefaultedProperty(propertyId)) ) ) 
{ 
if (m_dumpPropNames) 
{ 
println(m_indentation + " " + JdapiMetaProperty.getPropertyName(pr 
opertyId) + " " + 
propertyVal); 
} 
else 
{ 
println(m_indentation + propertyVal); 
} 
} 
} 
} 
/** 
* Output usage info to STDOUT 
*/ 
public void printUsage() 
{ 
System.out.println(""); 
System.out.println("Jdapi Form Dumper Utility"); 
System.out.println("Valid arguments:"); 
System.out.println("-a : dump all properties, not just overridden ones"); 
System.out.println("-b : dump boolean properties"); 
System.out.println("-n : dump numeric properties"); 
System.out.println("-t : dump text properties"); 
System.out.println("-p : dump property names, not just values"); 
System.out.println("-o : file path to output to"); 
} 
/** 
* Main method 
*/ 
public static void main(String[] args) 
throws Exception 
{ 
FormDumper dmp = new FormDumper(); 
for (int i = 0; i < args.length; i++) 
{ 
dmp.dumpForm(args[i]); 
} 
System.out.println(""); 
System.out.println("Dumps complete"); 
System.out.println(""); 
} 
} 

32.3.3 項目内に入力できる文字数に影響を与える変更とその回避策

Oracle Forms Builderオンライン・ヘルプに、次の情報を追加する必要があります。

  1. Form Builder (frmbld)を使用してフォームが作成されると、項目のプロパティ「問合せ長」のデフォルト値は0になります。その後フォームが11g以前のリリースでコンパイルされると、この値(0)によって、「問合せ長」のデフォルト値が「最大長」プロパティの値になります。Oracle Forms 11gでは、「問合せ長」のデフォルト値が、「最大長」プロパティの値に2を加算した値になります。以前のリリースの動作に戻す場合は、フォームのコンパイル時に環境変数FORMS_QUERY_LENGTH_DELTAを'0'に設定する必要があります。

  2. DATE書式マスクによって、テキスト項目またはコンボ・ボックスに入力できる文字数が決まります。通常、この数は出力書式マスクおよび許容されるすべての入力書式マスクに必要な最大文字数になります。コンボ・ボックスまたは書式マスクが設定されていないテキスト項目に対して、入力書式マスクと出力書式マスクがどのように選択されるかについては、日付用の書式要素に関する項を参照してください。FORMS_USER_DATE_FORMATまたはFORMS_USER_DATETIME_FORMAT環境変数では、複数の入力書式マスクが指定される場合があります。また、Oracle Forms Builderオンライン・ヘルプに含まれるSQLリファレンスの書式モデルに関する項で、文字列から日付への変換規則の説明に記載されているとおり、FXを含まないどの入力書式マスクに対しても、代替書式マスクを使用できます。

    前述の説明に含まれる規則には、例外が1つあります。文字列から日付への変換規則の説明に記載されている動作では、数字の月(MM形式のマスク要素)または省略形の月(MON形式のマスク要素)のかわりに、月のスペル全体を入力することも許可されます。ただしこの場合、テキスト項目またはコンボ・ボックスに入力できる文字数は、省略形の月のみを入力できる長さになります。

    11gR1以前のリリースでは、入力DATE書式マスクは考慮されません。10gR2 (10.1.2)では、エンド・ユーザーがDATE項目に入力できる文字数は、出力書式マスクによってのみ決まります。Forms 6i (6.0.8)では、DATE項目の「最大長」プロパティも考慮されます。

回避策

前述の説明に含まれる動作の変更は、DATE項目のAuto-Skipプロパティを設定したユーザーに影響を与える場合があります。このリリースでは、エンド・ユーザーがより多くの文字を特定のDATE項目に入力できる場合があります。この場合、自動スキップは11gR1以前とは異なり発生しません。自動スキップを確実に発生させるには、項目に使用する書式マスクに、FX修飾子をFXYYYY/MM/DDのように追加します。項目固有の書式マスクがない場合(つまり、項目のプロパティ・パレットまたはプログラムに書式マスクが設定されていない場合)、項目の書式マスクは環境変数から取得されます。FORMS_USER_DATE_FORMATおよびFORMS_USER_DATETIME_FORMAT環境変数は、DATE書式マスクに影響を与える可能性があるどのNLS環境変数よりも優先されるため、これらの変数を使用することをお薦めします。

FX修飾子を指定すると、SQLリファレンスの書式モデルに関する項で、文字列から日付への変換規則の説明に記載されている、代替書式マスクが許可されなくなります。また、FORMS_USER_DATE_FORMAT環境変数およびFORMS_USER_DATETIME_FORMAT環境変数は、縦線で区切られた代替の書式マスク(FXDD-MON-YYYY|FXMON-DD-YYYYなど)を明示的に指定できます。(FORMS_OUTPUT_DATE_FORMAT環境変数およびFORMS_OUTPUT_DATETIME_FORMAT環境変数が設定されていない場合、出力書式マスクは、FORMS_USER_DATE_FORMAT環境変数およびFORMS_USER_DATETIME_FORMAT環境変数のそれぞれに指定された最初の書式マスクから取得されます。)