| Oracle Fusion Middlewareリリース・ノート 11gリリース1(11.1.1) for Microsoft Windows x64 B55938-04 |
|
![]() 前 |
![]() 次 |
この章では、Oracle Formsに関連する問題について説明します。内容は次のとおりです。
この項では、一般的な問題および回避方法について説明します。内容は次のとおりです。
Forms 6iからのアップグレードの詳細は、『Oracle Fusion Middleware Forms Services Deployment Guide』の「Oracle Forms Services 11gへのアップグレード」の章を参照してください。変更された機能と不要になった機能の詳細は、『Oracle Forms Upgrading Oracle Forms 6i to 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_INSTANCEのFORMS_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の前に移動します。
この項では、構成に関する問題およびその回避方法について説明します。内容は次のとおりです。
31.2.1項「One-Button-Runの使用時におけるInternet Explorer以外のブラウザのプロキシ設定」
31.2.6項「Safari 5ブラウザでFormsアプリケーションをコールするJavaScriptイベントが機能しない問題」
Internet Explorer以外のサポートされる任意のブラウザでOne-Button-Runを使用している際にFORBIDDENエラーが発生した場合、127.0.0.1(localhost)がブラウザのプロキシ・設定に存在するかどうかを確認してください。127.0.0.1が例外リストに存在しない場合は、追加します。これにより、ブラウザはプロキシ・サーバーを迂回できます。
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によりクライアントで使用されるライブラリが格納される場所へのパスを表し、絶対パスまたはクライアント・ユーザー・ホームに対する相対パスです)。
install.syslibライブラリのダウンロード時に、WebUtilでは、webutil.propertiesファイルをクライアント・ユーザー・ホームに作成します。異なるサーバーでクライアントにライブラリをダウンロードして管理できるように、異なるwebutil.propertiesファイルがクライアント側で保持されます。クライアント上のファイルの名前は、webutil.<HOST>.<CONFIG>.propertiesです(HOSTはサーバー・コンピュータの名前で、CONFIGはformsweb.cfgの構成セクションの名前です)。
WinRunnerがインストールされているクライアント上でJDKバージョン1.6.0_12以上を使用すると、Formsを実行できません。
この問題を回避するには、2つの環境変数_JAVA_OPTIONSおよびJAVA_TOOLS_OPTIONSの名前を変更します。たとえば、これらの名前をtest_JAVA_OPTIONSおよびtest_JAVA_TOOLS_OPTIONSに変更します。これにより、WinRunnerは無効化されますが、Formsは実行できます。
file://プロトコルに基づいてInternet Explorer 7、またはInternet Explorer 8で開かれたフレーム付きHTMLファイルでは、JavaScript通信は機能しません。
この問題を回避するには、フレームのURLでマシン名のかわりにIPアドレスを使用します。たとえば、testform.htmで、次の部分を変更します。
<frame noresize="noresize" src="http://testform.us.oracle.com:8888/forms/java/js2frm1.html" name="fr2" frameborder="0"> <frame noresize="noresize" src="http://testform.us.oracle.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">
WindowsのSafari 5ブラウザでJavaScriptをFormsアプリケーションと統合して使用する場合、Formsからブラウザ上で稼働するJavaScriptへの通信は機能しますが、JavaScriptからのアプレットのコールは機能しません。
回避方法として、次の手順を実行します。
base.htmを使用していることを確認します。
base.htmで、<APPLET>タグをラップする<NOSCRIPT></NOSCRIPT>タグを削除します。
この項では、ドキュメントの訂正箇所を示します。内容は次のとおりです。
セキュア・モードでのユーザーIDの引渡しに関する次の情報は、Oracle Forms Builderオンライン・ヘルプに追加する必要があります。
Formsコンパイラを使用する場合の引数としてユーザーIDを渡すこと(frmcmpまたはfrmcmp_batch)によって、セキュリティが脆弱になることがあります。コンパイラでは、すでに使用可能な対話式ダイアログ・モードに加えて、標準入力による接続文字列も受け入れられます。ユーザーIDをセキュア・モードで渡すには、次の手順を実行します。
環境変数FORMS_STDIN_PASSWORDを1に設定します。
接続文字列を入力せずにコンパイラを実行します。コンパイラの開始後に接続文字列を入力します。
リダイレクトを使用してコンパイラを実行し、パスワードをコンパイラに渡します。(これは特に、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
このスクリプトはパスワード保護のためのサンプルであり、一部のプラットフォームや構成では、セキュリティの脆弱性は解決しないことがあります。
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("");
}
}