﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-湘江夜游神-文章分类-ORACLE</title><link>http://www.blogjava.net/sidanzhou/category/23541.html</link><description>Why</description><language>zh-cn</language><lastBuildDate>Tue, 26 Jun 2007 20:16:51 GMT</lastBuildDate><pubDate>Tue, 26 Jun 2007 20:16:51 GMT</pubDate><ttl>60</ttl><item><title>Oracle 的入门书籍和资料【zz】</title><link>http://www.blogjava.net/sidanzhou/articles/126182.html</link><dc:creator>湘江夜游神</dc:creator><author>湘江夜游神</author><pubDate>Tue, 26 Jun 2007 06:14:00 GMT</pubDate><guid>http://www.blogjava.net/sidanzhou/articles/126182.html</guid><description><![CDATA[<div class=post twffan="done">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;介绍几本oracle入门的好书oracle官方文档：<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 《concept》上面讲了oracle的体系和概念，很适合初学者看。 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OCP的教学用书，也就是STUDY GUIDE(SG)。&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Oracle8i 备份恢复手册 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Oracle8高级管理与优化 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Oracle8i PLSQL程序设计&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Oracle8数据库管理员手册以上书本都是机械工业出版社出版。 <br>介绍几个网站 http://tahiti.oracle.com oracle的官方文档 现在http://www.oracle.com.cn/onlinedoc/index.htm也有官方文档，速度奇快 http://metalink.oracle.com/ oracle的技术支持网站。需要购买Oracle服务才能有一个帐号，才能登陆，有大量的Knowledge Base，大量问题解决经验。 http://www.oracle.com oracle的官方网站，可以在这里down oracle的软件、官方文档和获得最新的消息 <br>http://www.dbazine.com/ <br>Oracle的杂志 http://asktom.oracle.com <br>http://www.orafaq.net/ <br><a href="http://www.ixora.com.au/">http://www.ixora.com.au/</a> <br>http://www.oracle-base.com <br>http://www.dba-oracle.com/oracle_links.htm <br>来源：www.oracle.com.cn</div>
<img src ="http://www.blogjava.net/sidanzhou/aggbug/126182.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/sidanzhou/" target="_blank">湘江夜游神</a> 2007-06-26 14:14 <a href="http://www.blogjava.net/sidanzhou/articles/126182.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Jdeveloper 10配置iStore 11.5.2的方法（来自metalink）</title><link>http://www.blogjava.net/sidanzhou/articles/126324.html</link><dc:creator>湘江夜游神</dc:creator><author>湘江夜游神</author><pubDate>Tue, 26 Jun 2007 06:10:00 GMT</pubDate><guid>http://www.blogjava.net/sidanzhou/articles/126324.html</guid><description><![CDATA[Step 1: Zip Java Class files<br><br>cd $COMMON_TOP/java<br><br>zip &#8211;r /tmp/iStoreLib oracle/apps/fnd oracle/apps/jtf oracle/apps/ibe oracle/apps/ar<br>oracle/apps/ibc oracle/adf/mds/adapters/FileConstants.class oracle/cabo/ui/UIConstants.class<br>oracle/fnd com/sun/java/util/collections<br><br>Step2 : Zip JSP Files<br><br>cd $COMMON_TOP/html<br><br>zip /tmp/JSPFiles ibeC*.jsp ibeC*.js jtf*.css jtf*.jsp ibeS*.jsp<br><br>Step3 : Zip Images<br><br>cd $COMMON_TOP/java/oracle/apps/media/<br>zip /tmp/IMGFiles ibe* jtf*<br><br><br>Step 4: Create an Application and a Project in Jdeveloper<br><br>The project directory will be referred to as &lt;project_dir&gt;.<br><br>Step 5: Transfer Files<br><br>Copy DBC file from $APPL_TOP/fnd/11.5.0/secure (usually) in &lt;project_dir&gt;<br>Copy iStoreLib.zip, JSPFiles.zip, IMGFiles.zip into the &lt;project_dir&gt;<br>Create public_html\OA_HTML under the &lt;project_dir&gt; and extract JSPFiles.zip into this folder.<br>Create public_html\OA_MEDIA under the &lt;project_dir&gt; and extract IMGFiles.zip into this folder.<br><br>Step 6: Project Properties Settings<br><br>Adding Libraries to the Project:<br><br>Add iStoreLib.zip in project library<br>Add "Oracle JDBC", "Oracle XML Parser V2", "JSP Runtime" Libraries as well.<br><br>Set J2EE Web Context Root to /<br>Set the JAVA Options to :<br>-DJTFDBCFILE=&lt;project_dir&gt;\&lt;filename.dbc&gt;<br>-Dframework.Logging.system.filename=C:/Temp/fwsys.log<br>-Dservice.Logging.common.filename=C:/Temp/istore.log<br>Set the program arguments to : intra=t<br>Set the Runner Options: Uncheck "Before Running Make Project"<br>Create empty JSP files: amsLitePlacement.jsp, amsWebPlacement.jsp, ibapstng.jsp in<br>project_dir/OA_HTML directory.<br><br>Step 7: Run test scripts <br><br>http://www-apps.us.oracle.com/ibe/Architecture/Diagnostics/ <br>( This is an internal link. Please raise an SR with Oracle Support and request for the scripts)<br><br>Step 8: Remove duplicate JSP directives <br><br>(later version of JSP engine doesn&#8217;t allow duplicatedirectives)<br><br>Remove language="java" attribute from all JSP files<br>Remove errorPage="jtfacerr.jsp" from jtfincl.jsp<br><br>Step 9 : Additional imports <br><br>(later version of JSP engine doesn&#8217;t automatically add these imports)<br><br>Imports in ibeCZzpHeader.jsp:<br>Add the following imports :<br>&lt;%@page import="java.io.*" %&gt;<br>&lt;%@page import="java.lang.*" %&gt;<br><br>Imports in ibeCZzpRuntimeIncl.jsp:<br><br>Add the following imports :<br>&lt;%@page import="java.util.*" %&gt;<br>&lt;%@page import="java.io.*" %&gt;<br>&lt;%@page import="java.lang.*" %&gt;<br><br>Imports in ibeCCkdBHdrBillPay.jsp :<br>&lt;%@page import="java.io.*" %&gt;<br><br>Imports in ibeCCkdHdrBillPayFlex :<br>&lt;%@page import="java.lang.reflect.Field" %&gt;<br><br><br>Step 10: Changes in ibeCAcdWelcome.jsp<br><br>Replace:<br>&lt;%@ include file="ibeCWcpESIBinTop.jsp" &gt; with<br>&lt;%@ include file="ibeCZzpRuntimeIncl.jsp" %&gt;<br>&lt;% boolean _wcESI = true; %&gt;<br>Comment the following:<br>&lt;% @ include file="ibeCWcpESIBinBottom.jsp" %&gt;<br><br>Step 11 : Changes in ibeCZzdBinTop.jsp<br><br>Comment the following:<br>&lt;%@page session="false"%&gt;<br>&lt;% @page errorPage="ibeCZzdError.jsp"%&gt;<br><br>Step 12: Changes in ibeCOtcAtp.jsp<br><br>Change Message references to oracle.apps.fnd.common.Message<br><br>Step 13: Run iStore<br><br>The main entry pages to iStore customer facing UI is ibeCZzdMinisites.jsp. (Other entry page are<br>ibeCZzpEntry.jsp &#8211; for deeplink, and ibeCZzpHome.jsp?minisite=&lt;site id&gt;). Add<br>ibeCZzdMinisites.jsp in your project, compile and run. ibeCZzdMinisites.jsp will redirect to<br>ibeCCtdMinisites.jsp and list of sites will appear on the browser.<br><br>&lt;cookie_domain&gt; is the domain for which iStore cookies will be set &#8211; the IP address or domain of<br>the Windows machine that appears on the browser.<br><br><br>Note<br>1. Top level JSPs are those that are requested by the browser. They appear on the URL and are part<br>of HTTP requests and can be compiled. Compile-time included JSPs are included from other JSP files<br>and cannot be compiled independently. These are included with the tag: &lt;%@ include<br>file="include_1.jsp" %&gt; and are equivalent to a macro. ibeCZzpHeader.jsp, ibeCZzpTop.jsp,<br>ibeCZzpMenu.jsp, ibeCZzdBottom.jsp, etc. are compile-time included JSPs. Run-time in<br>cluded JSPs<br>are included from other JSP files but can be compiled independently. These are included with the<br>following tag: &lt;jsp:include page="&lt;%=include_2.jsp%&gt;" flush="true" /&gt; and are equivalent to a<br>function call. ibeCAcdWelcome.jsp, ibeCCtdSctBrwsBin.jsp, etc. are run-time included JSPs.<br><br>Add top level and run-time included JSP files in your project as needed and compile all files in<br>the project. Alternatively, add all type of JSP files in your project and compile indivi<br>dually. It<br>is not necessary to add and compile all top-level and run-time included JSP files. If a JSP file<br>needed to bring up a page is not pre-compiled, it will be compiled automatically at run time.<br>Pre-compilation will give faster response at runtime.<br><br>2. There are certain instances when Class Not Found Exception is thrown. The Steps below mention<br>the possible solution for the error noticed.<br><br>Example :<br>1. Assuming that the following Exception is observed, java.lang.ClassNotFoundException:<br>_oa__html._ibeCCkdHdrBillPayFlex<br><br>2. Search the project_dir/classes/.jsps/_oa__html for the file :<br>* ibeCCkdHdrBillPayFlex*.*<br>3. Delete the java file and jpa file found in this folder.<br>4. Compile this jsp through jdeveloper<br>5. Now the Errors reported are due to some missing imports in the jsp<br>6. Add the respective import and compile the jsp again. It should compile now without an<br>y errors<br>7. Refresh the browser to observe that the ClassNotFoundException observed in Step1 is not seen.<br><br>This page contains scripts to diagnose problems to bring up Oracle Application instances. The scripts mainly deal with database connect<br>ivity and session creation. Remove .txt from file names.<br><br>Tip: To diagnose from the command line; compile the .java files and run. This is productive when debug<br>ging in JDeveloper.<br><br>DBC File DB Connection <br>1. TestDbcConn.jsp:<br>&lt;%@ page language="java" %&gt;<br>&lt;%@ page import="oracle.apps.fnd.common.*" %&gt;<br>&lt;%@ page import="java.sql.*"%&gt;<br>&lt;%@ page import="java.io.*"%&gt;<br><br>&lt;%<br>try {<br>String dbcFile = java.lang.System.getProperty("JTFDBCFILE");<br>out.println("JTFDBCFILE="+dbcFile+"&lt;br&gt;");<br>if (! new File(dbcFile).canRead()) {<br>out.println("cant read dbc file&lt;br&gt;");<br>return;<br>}<br>WebAppsContext ctx = new WebAppsContext(dbcFile);<br>boolean result = connectToJDBC(out, ctx); <br>ctx.freeWebAppsContext();<br>} catch (Exception ex)<br>{<br>out.println("&lt;PRE&gt;");<br>ex.printStackTrace(new PrintWriter(out));<br>out.println("&lt;/PRE&gt;");<br>}<br>%&gt;<br><br>&lt;%!<br>boolean connectToJDBC(JspWriter o, WebAppsContext ctx)<br>throws IOException, SQLException<br>{<br>AppsEnvironmentStore envStore = (AppsEnvironmentStore)ctx.getEnvStore();<br>String hostname = envStore.getEnv("DB_HOST");<br>String portnum = envStore.getEnv("DB_PORT");<br>String dbname = envStore.getEnv("DB_NAME");<br>if (dbname == null) dbname = envStore.getEnv("TWO_TASK");<br>String gwyuid = envStore.getEnv("GWYUID");<br><br>String jdbcurl = "jdbc:oracle:thin:" + gwyuid + "@" + hostname +<br>":" + portnum + ":" + dbname;<br>o.println("connecting: "+jdbcurl+"&lt;br&gt;");<br>DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());<br>Connection gwyconn = DriverManager.getConnection(jdbcurl);<br>if(gwyconn == null ) { <br>o.println("connection is null"); <br>return false;<br>}<br>o.println("created connection&lt;br&gt;");<br><br>ResultSet rs = null;<br>rs = gwyconn.createStatement().executeQuery("select instance_name from v$instance");<br>if(rs == null) {<br>o.println("result set is null");<br>return false;<br>}<br>rs.next();<br>o.println("instance name: "+rs.getString(1));<br><br>rs.close();<br>gwyconn.close();<br>return true;<br>}<br><br>void printErrorStack(JspWriter o, WebAppsContext ctx) throws IOException {<br>o.println("&lt;PRE&gt;");<br>o.println(ctx.getErrorStack().getAllMessages());<br>o.println("&lt;/PRE&gt;");<br>}<br>%&gt;<br><br><br>WebAppsContext DB Connection:<br>2.TestWacConn.java:<br><br>package mypackage;<br>import oracle.apps.fnd.common.WebAppsContext;<br>import java.io.*;<br>import java.sql.*;<br><br>public class TestWacConn <br>{<br>public static void main(String[] args)<br>throws SQLException<br>{<br>String dbc = System.getProperty("JTFDBCFILE");<br>System.out.println(dbc);<br>WebAppsContext wctx = new WebAppsContext(dbc);<br>Connection conn = wctx.getJDBCConnection();<br>ResultSet rs = null;<br>rs = conn.createStatement().executeQuery("select instance_name from v$instance");<br>if (rs == null) {<br>System.out.println("result set is null");<br>return;<br>}<br>rs.next();<br>System.out.println("instance name: "+rs.getString(1));<br>wctx.freeWebAppsContext();<br>}<br>}<br><br><br>WebAppsContext User Session:<br>3.TestWacSess.java:<br><br>package mypackage;<br>import oracle.apps.fnd.common.WebAppsContext;<br>import java.io.*;<br>import java.sql.*;<br><br>public class TestWacSess <br>{<br>public static void main(String[] args)<br>throws SQLException<br>{<br>String dbc = System.getProperty("JTFDBCFILE");<br>System.out.println(dbc);<br>WebAppsContext wctx = new WebAppsContext(dbc);<br>wctx.createAnonymousSession();<br>System.out.println(wctx.getSessionId());<br>System.out.println(wctx.getSessionCookieName());<br>wctx.releaseJDBCConnection();<br>wctx.freeWebAppsContext();<br>}<br>}<br><br><br>ServletSessionManager User Session:<br><br>TestSsmSess.jsp:<br>&lt;%@page import="oracle.apps.jtf.base.session.*" %&gt;<br>&lt;%@page import="java.io.*" %&gt;<br><br>&lt;% ServletSessionManager.startRequest(request, response, "IBE", true, true); %&gt;<br>&lt;%=ServletSessionManager.getCookieValue(JTFCookie.USER_NAME) %&gt;<br>&lt;% ServletSessionManager.endRequest(request, false); %&gt;<br><br><br><br><br>.<br>QUESTION<br>=========<br>Request for the script at step6 in Note:419887.1.<br>This is used in the test of our iStore configurate.<br><br><br>ANSWER<br>=======<br>E-Commerce Diagnostics<br><br><br>This page contains scripts to diagnose problems to bring up Oracle Applicatio<br>n instances. The<br>scripts mainly deal with database connectivity and session creation. Remove .txt from file names.<br><br>Tip: To diagnose from the command line; compile the .java files and run. This is productive when<br>debugging in JDeveloper.<br><br>DBC File DB Connection<br>1. TestDbcConn.jsp:<br>&lt;%@ page language="java" %&gt;<br>&lt;%@ page import="oracle.apps.fnd.common.*" %&gt;<br>&lt;%@ page import="java.sql.*"%&gt;<br>&lt;%@ page import="java.io.*"%&gt;<br><br>&lt;%<br>try {<br>String dbcFile = java.lang.System.getProperty("JTFDBCFILE");<br>out.println("JTFDBCFILE="+dbcFile+"&lt;br&gt;");<br>if (! new File(dbcFile).canRead()) {<br>out.println("cant read dbc file&lt;br&gt;");<br>return;<br>}<br>WebAppsContext ctx = new WebAppsContext(dbcFile);<br>boolean result = connectToJDBC(out, ctx);<br>ctx.freeWebAppsContext();<br>} catch (Exception ex)<br>{<br>out.println("&lt;PRE&gt;");<br>ex.printStackTrace(new PrintWriter(out));<br>out.println("&lt;/PRE&gt;");<br>}<br>%&gt;<br><br>&lt;%!<br>boolean connectToJDBC(JspWriter o, WebAppsContext ctx)<br>throws IOException, SQLException<br>{<br>AppsEnvironmentStore envStore = (AppsEnvironmentStore)ctx.getEnvStore();<br>String hostname = envStore.getEnv("DB_HOST");<br>String portnum = envStore.getEnv("DB_PORT");<br>String dbname = envStore.getEnv("DB_NAME");<br>if (dbname == null) dbname = envStore.getEnv("TWO_TASK");<br>String gwyuid = envStore.getEnv("GWYUID");<br><br>String jdbcurl = "jdbc:oracle:thin:" + gwyuid + "@" + hostname +<br>":" + portnum + ":" + dbname;<br>o.println("connecting: "+jdbcurl+"&lt;br&gt;");<br>DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());<br>Connection gwyconn = DriverManager.getConnection(jdbcurl);<br>if(gwyconn == null ) {<br>o.println("connection is null");<br>return false;<br>}<br>o.println("created connection&lt;br&gt;");<br><br>ResultSet rs = null;<br>rs = gwyconn.createStatement().executeQuery("select instance_name from v$instance");<br>if(rs == null) {<br>o.println("result set is null");<br>return false;<br>}<br>rs.next();<br>o.println("instance name: "+rs.getString(1));<br><br>rs.close();<br>gwyconn.close();<br>return true;<br>}<br><br>void printErrorStack(JspWriter o, WebAppsContext ctx) throws IOException {<br>o.println("&lt;PRE&gt;");<br>o.println(ctx.getErrorStack().getAllMessages());<br>o.println("&lt;/PRE&gt;");<br>}<br>%&gt;<br><br><br>WebAppsContext DB Connection:<br>2.TestWacConn.java:<br><br>package mypackage;<br>import oracle.apps.fnd.common.WebAppsContext;<br>import java.io.*;<br>import java.sql.*;<br><br>public class TestWacConn<br>{<br>public static void main(String[] args)<br>throws SQLException<br>{<br>String dbc = System.getProperty("JTFDBCFILE");<br>System.out.println(dbc);<br>WebAppsContext wctx = new WebAppsContext(dbc);<br>Connection conn = wctx.getJDBCConnection();<br>ResultSet rs = null;<br>rs = conn.createStatement().executeQuery("select instance_name from v$instance");<br>if (rs == null) {<br>System.out.println("result set is null");<br>return;<br>}<br>rs.next();<br>System.out.println("instance name: "+rs.getString(1));<br>wctx.freeWebAppsContext();<br>}<br>}<br><br><br>WebAppsContext User Session:<br>3.TestWacSess.java:<br><br>package mypackage;<br>import oracle.apps.fnd.common.WebAppsContext;<br>import java.io.*;<br>import java.sql.*;<br><br>public class TestWacSess<br>{<br>public static void main(String[] args)<br>throws SQLException<br>{<br>String dbc = System.getProperty("JTFDBCFILE");<br>System.out.println(dbc);<br>WebAppsContext wctx = new WebAppsContext(dbc);<br>wctx.createAnonymousSession();<br>System.out.println(wctx.getSessionId());<br>System.out.println(wctx.getSessionCookieName());<br>wctx.releaseJDBCConnection();<br>wctx.freeWebAppsContext();<br>}<br>}<br><br><br>ServletSessionManager User Session:<br><br>TestSsmSess.jsp:<br>&lt;%@page import="oracle.apps.jtf.base.session.*" %&gt;<br>&lt;%@page import="java.io.*" %&gt;<br><br>&lt;% ServletSessionManager.startRequest(request, response, "IBE", true, true); %&gt;<br>&lt;%=ServletSessionManager.getCookieValue(JTFCookie.USER_NAME) %&gt;<br>&lt;% ServletSessionManager.endRequest(request, false); %&gt;<br><br>
<img src ="http://www.blogjava.net/sidanzhou/aggbug/126324.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/sidanzhou/" target="_blank">湘江夜游神</a> 2007-06-26 14:10 <a href="http://www.blogjava.net/sidanzhou/articles/126324.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>