📄 readme_javavm.txt
字号:
correspond to the JDK default. If you have been using the presence of"Oracle" in java.version to determine whether your code is running onOracle9i JVM as opposed to the client, then you should switch to testingwhether the oracle.jserver.version property is non-null. (In release8.1.5, the value of java.version was "Oracle Server 1.1.6". In release8.1.6, 8.1.7 and 9.0.1 the value of java.version was "1.2.1"). Theproperty oracle.server.version is now deprecated. It was set in 8.1.5,8.1.6 and 8.1.7 for backward compatibility reasons only.2.7 Java && in SQL*PLUSSQL*PLUS interprets Java && as substitution variables. The workaroundis to use loadjava to load source or to use loadjava to load binaries.If you want to write Java source in SQL*Plus, you can "set define off"first.2.8 RMI and SocketsPlease refer to the Java Developer's Guide for information on O/SResources, Sockets, and RMI support in this release. RMI is fullysupported, but you need to understand the implications of its use onyour ability to build scalable server applications. Socket supportbeyond end-of-call is discussed in the Java Developer's Guide.2.9 Bug #895586 -- Multibyte Character Output Truncation at 255 BytesIf you use dbms_java.set_output to redirect System.out.println() tostandard output, and the 255th byte is part of a multibyte character,this character will be broken into 2 one byte characters in theoutput. The workaround is to break your output into smaller pieces.2.10 Bug #1330979 -- Wrong Japanese error message returned in SQLException in JavaIf you are using multi byte character set, the exception messagereturned by java.sql.SQLException may be mangled.2.11 Bug #1001690 -- Exception thrown when attaching JDB for debuggingWhen doing a call to DBMS_JAVA.START_DEBUGGING() and attaching withJDB, a java.security.AccessControlException is thrown if you do nothave the required permissions. To grant these permissions to a user,you need to do:SQL> call dbms_java.grant_permission('SCOTT', 'SYS:oracle.aurora.security.JServerPermission', 'Debug', null);To confirm that this permission is in effect, you can do:SQL> select type_name, name, enabled from user_java_policy where type_name like '%JServerPermission%';and should see Debug/ENABLED among the granted JServerPermission types.2.12 Java Calling SQL and Vice VersaPlease refer to the JDBC README for details on limitations in "SQLCall-in". There are known problems with usage of some data types andtheir translation between Java and SQL. In general, these are notJDBC problems, but are the responsibility of the Aurora runtimemachinery. We have chosen to document the problems in the JDBC README(ORACLE_HOME\jdbc\readme.txt) because JDBC users are the most likelyto encounter the problems.2.13 Java and PL/SQLRefer to the "Java Stored Procedures" documentation for details ofPL/SQL and Java interaction. It is a known feature of call-specdefinition that there is no checking at definition time between themethod signature provided in the call-spec and the method which willbe invoked at runtime. The design is such that mismatches are onlydetected at runtime.2.14 ExamplesWe provide numerous examples showing how to use Java StoredProcedures. The examples can be found underORACLE_HOME/javavm/demo. Before running these examples, you need to have the JDK commands forjava, javac in your PATH as decribed above in 3.13. You also need tohave ORACLE_HOME, CLASSPATH, JAVA_HOME, LD_LIBRARY_PATH setcorrectly. Lastly, you should check the values for java_pool_size andshared_poll_size, in the init.ora file. These should be at least 50mbeach.Also note that within each Makefile, there are two differentclasspaths defined - one for JDK1.1.x and one for JDK1.2. Beforerunning an example, you should edit the Makefile (or batchfiles on NT)and verify that the relevant MAKE_CLASSPATH for your JDK installationis uncommented.All the samples should work, without any modifications, as describedin their individual readme. Please do read the readme, as some of thepreparations include things like creating a demo user "CLERK", beforebeing able to run. 2.15 SSL Limitations2.15.1 Using SSL client side authentication when making an SSL calloutfrom one server into another server is not supported in this release.2.15.2 In this release, "SSL_CREDENTIAL" login is not supported. Forexample, the code: env.put (Context.SECURITY_AUTHENTICATION, ServiceCtx.SSL_CREDENTIAL)does not work and should be replaced with: env.put (Context.SECURITY_AUTHENTICATION, ServiceCtx.SSL_LOGIN)3. JAccelerator ("NComp"). Natively Compiled Java CodeThis release contains all core Java classes, plus the JDBC, and SQLJJava classes in natively compiled form. (Note: swing and awt classes,which are included only for compatibility on the server, are notnatively compiled). As described in the Java Developer's Guide, thenatively compiled code is dynamically opened at runtime using sharedobject libraries from the ORACLE_HOME/javavm/admin directory.3.1 Upgrade, Downgrade, Import, ExportJava code that you natively compile in this release will not beautomatically upgraded in future Oracle releases. To move to a newOracle release, you will need to upgrade and then natively compile thecode again in the upgraded server. Similarly, import and export ofJava code between Oracle databases does not include the nativelycompiled form of your Java code. In these cases, as long as the O/Sand platform are the same, you should redeploy the deployment jarfiles that you created originally to install natively compiled Javacode in another location.3.2 SecurityDeployment of natively compiled code in the server is protected by aJava privilege, as described in the documentation. You shouldunderstand that this privilege should only be granted when the partyinstalling or supplying the natively compiled code is well-known andtrusted. The code generation process employed to produce the sharedlibraries is provided by and tested extensively by Oracle; however,unlike interpreted Java code and PL/SQL programs, native code isexecuted from shared libraries that are dynamically opened at runtime.The right to install such shared libraries should be closelycontrolled.3.3 Acceptable C Compiler VersionsPlease review the Settings_<OperatingSystem>.properties file on yourplatform to determine what C compiler Oracle has certified forsupported use with Oracle9i JVM Accelerator in this release. Oracle hascontinuing work to certify more C compilers against this and futurereleases and will make such information available on Oracle TechNet onan ongoing basis.3.4 Known issues3.4.1 JDK releases to avoid. If there is a choice, avoid, for the purpose of ncomping, Solarisreleases of JDK 1.1.7p, 1.2, 1.2.1p, 1.2.2_05a and 1.1.3 with nativethreads. We found problems using these releases, but have used 1.1.6and 1.2.2_07 successfully.3.4.2 C compiler out of memory during C compilationDuring compilation of very large packages, C compilers may be gettingout of memory. You can switch to the non-bundling mode, compiling eachclass separately, by omittingmakefile.maker = $(one.c.unit.per.dll.makefile.maker)in files javavm/jahome/Settings_solaris.propertiesand javavm/jahome/Settings_sunos.properties3.4.3 The flag -update does not work with jdk 1.1.x command-line option-update of 'ncomp' does not work with jdk 1.1.x because the 'jar'facility in these releases does not provide command-line option -u.3.4.4 KNOWN BUG: Having a dot in directory name of deployment jaraborts deploymentIf you pass a full-path deployment jar name to deploync, you'll getincorrect results if the directories in the path or the deployment jarcontain '.': deploync ... /foo.bar/mydepl.jar deploync ... /foo_bar/my.depl.jar Workaround(1) avoid using '.' in directories and jar names, Workaround(2): use -d: deploync ... -d /foo.bar mydepl.jar3.4.5 Half of my package previously ncomped now is not!If your app is in 2 jars, and for package P half of its classes are inthe first jar and half in the second, then after ncomping the secondjar you'll find the classes from the first jar un-ncomped. This isbecause ncomp deploys dlls on a per-package basis. To avoid such situations, structure the source jars in such way thatall classes for a given package P are in a single jar. This alsooffers the best possible performance.3.4.6 All toplevels are in the same package UnnamedPackage!Beware of toplevel classes: if you have a toplevel class X, previouslyncomped, and then you separately ncomped a toplevel class Y, X willbecome un-ncomped. This is because all toplevel classes are consideredin a special package "UnnamedPackage".3.4.7 "nothing needs ncomping because nothing is in package P"If your source jar contains packages with non of classes present ontothe server, ncomp will report that each individual class isNOT_FOUND_IN_SCHEMA yet each packages is ALREADY_NCOMPED:NOT_FOUND_IN_SCHEMA oracle/aurora/mts/iiop/ORBNOT_FOUND_IN_SCHEMA oracle/aurora/mts/iiop/SessIiopService...ALREADY_NCOMPED oracle/aurora/mts/iiop/In this particular case the meaning of this ALREADY_NCOMPED is morelike "nothing needs ncomping because nothing is there"3.4.8 ncomp says NEED_NCOMPING, and then it freezes?After reporting a series of NEED_NCOMPING, ncomp keeps silent until itcreates the deployment jar and is ready to deploy. Depending on themachine, this delay can look like a freeze. To see what is going on,tail file ncomp.log. Another solution is to redirect the output to thescreen with -verbose.3.4.9 Solaris-specific Settings_*.properties filesOn Solaris we ship two platform-specific Settings_*.properties files. Settings_solaris.propertiesand Settings_sunos.propertiesFile Settings_solaris.properties is picked up by JDKs 1.1.x, fileSettings_sunos.properties is picked up by JDKs 1.2.x3.4.10 Managing filespace in javavm/adminThe 9.2.0 release of user interface to ncomp does not attempt tomanage the dlls in javavm/admin directory. Because dlls have uniquenames, over time there javavm/admin might accumulate a number ofobsolete dlls.For each given package in a given schema, only the most recentlydeployed dll is in use. You can detect which dlls are in use byanalyzing table jaccelerator$dlls or by running the following script:#!/bin/sh# list of ncomp dlls in useusage () { echo "libs used by ncomped classes foo/bar*" echo "usage: $0 foo/bar" exit 1}if [ $# -lt 1 ]; then usage; fiDIR=`dirname $0`cat >$DIR/DLLsReport.java <<EOJAVApackage oracle.jaccelerator.utl;import oracle.aurora.rdbms.Schema;import oracle.aurora.rdbms.ClassHandle;import oracle.aurora.rdbms.Handle;import oracle.aurora.rdbms.ObjectTypeChangedException;import oracle.sql.CHAR;import java.io.*;import java.util.Date;import java.sql.*;import oracle.jdbc.driver.*;public class DLLsReport { public static String dll (String schemaAndName) throws SQLException { int colonIdx = schemaAndName.indexOf(':'); String name = schemaAndName.substring(colonIdx + 1); String schema = schemaAndName.substring(0, colonIdx); String result = "bad handle"; ClassHandle h = Handle.lookupClass(name, Schema.lookup(schema)); if (h == null) { result = "null handle" + h; } else { result = h.getNcompDllNameAsCHAR().toString(); } return result; }}EOJAVAset -xloadjava -oci8 -resolve -user internal/change_on_install $DIR/DLLsReport.javasvrmgrl <<EOIconnect internal/change_on_installcreate or replace function isvnc_get_class_dll (pkg varchar2) return VARCHAR2 as language java name 'oracle.jaccelerator.utl.DLLsReport.dll(java.lang.String) return java.lang.String';/show errors;select distinct isvnc_get_class_dll(OWNER || ':' || dbms_java.longname(OBJECT_NAME)) from all_objects where OBJECT_TYPE = 'JAVA CLASS' and dbms_java.longname(OBJECT_NAME) like '$1%' ;EOI-- End of README --
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -