⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme_javavm.txt

📁 Debian中文参考手册,系统介绍了Debian系统
💻 TXT
📖 第 1 页 / 共 2 页
字号:
Oracle9i Release 2 (9.2.0) Java Virtual Machine READMETable of Contents1.     Oracle's Enterprise Java Server Platform -- Oracle9i JVM1.1    Documentation1.2    Getting Started1.3    Configuration1.4    Java Compatibility1.5    Compatibility Mode2.     Known Problems2.1    Memory Usage2.2    Accessibility of Server-Resident Java Source2.3    DESCRIBE Problems with Java2.4    Loadjava and Dropjava2.5    Error Reporting2.6    java.version, oracle.jserver.version, and oracle.server.version2.7    Java && in SQL*PLUS2.8    RMI and Sockets2.9    Bug #895586 -- Multibyte Character Output Truncation at 255 Bytes2.10   Bug #1330979 -- Wrong Japanese error message returned in SQLException in Java2.11   Bug #1001690 -- Exception thrown when attaching JDB for debugging2.12   Java Calling SQL and Vice Versa2.13   Java and PL/SQL2.14   Examples2.15   SSL Limitations3.     Natively Compiled Java Code3.1    Upgrade, Downgrade, Import, Export3.2    Security3.3    Acceptable C Compiler Versions3.4    Known issues1. Oracle's Enterprise Java Server Platform -- Oracle9i JVMOracle9i Release 2 (9.2.0) includes a fully functional Java virtualmachine (VM), as well as the Java class libraries for Sun's JavaDevelopment Kit (JDK) 1.2.1.  When combined with Oracle's JDBC andSQLJ, this release provides an enterprise class platform, Oracle9iJVM, for developing and deploying server-based Java applications.1.1  DocumentationSeparate hardcopy and on-line documentation are provided for the majorJava-related components of this release.- Oracle9i Java Developer's Guide- Oracle9i Java Tools Reference- Oracle9i JDBC Developer's Guide and Reference- Oracle9i SQLJ Developer's Guide and Reference- Oracle9i JPublisher User's Guide- Oracle9i Java Stored Procedures Developer's GuideAlways refer to http://www.oracle.com/java for the most up-to-dateinformation on Oracle Java products, including documentation and knownproblems.The Oracle9i Java Developer's Guide provides an overview of all Javaproducts and is an excellent starting point for exploring the Javacapabilities of Oracle9i.  In addition, it containsOracle-specific details of Java that span the individual products:JDBC and SQLJ. Please refer to these documents and their respective README files fordetailed information on each area.  Information on JVM and NCompinformation is covered in this README file.1.2  Getting StartedWe recommend that you follow the examples presented in the Oracle9iJava Developer's Guide to begin.  The demonstrations and examples inORACLE_HOME/javavm/demo include a HelloWorld example for Java StoredProcedures.  Execution of this and other examples will ensure thatyour installation was complete and that Oracle9i JVM is properlyenabled in your database.1.3  ConfigurationThe Java Developer's Guide provides details of installing andconfiguring a Java-enabled database.  Also, refer to the discussion inKnown Problems, Section 3.1, Memory Usage.The primary init.ora parameters that can affect Java usage andperformance are shared_pool_size and java_pool_size.  The memory specified in shared_pool_size is consumed transientlyduring use of loadjava.  The database initialization process (i.e.,executing initjvm.sql against a clean database, as opposed to theinstalled seed database) requires shared_pool_size to be set to 50MBas it loads the Java binaries for approximately 8000 classes andresolves them.  Shared_pool resource is also consumed ascall-specifications are defined, and as dynamically loaded Javaclasses are tracked at runtime.All other Java state during runtime execution of Java is taken fromthe amount allocated using java_pool_size.  This memory includes theshared in-memory representation of Java method and class definitions,as well as the Java objects that are migrated to session space atend-of-call.  In the former case, the memory cost is shared among allusers.  In the latter case, in MTS mode, you will need to adjustjava_pool_size allocations based on the actual amount of state held instatic variables for each session.As in Sun's JDK, the Java compiler (i.e., the compiler, written inJava, that compiles Java source code to Java binaries) is known to bea voracious consumer of memory.  If you intend to compile significantamounts of Java source on the Oracle9i JVM, or you will be deployingcomplex EJB's (which use the Compiler on the server), you shouldconsider increasing java_pool_size.  The default value forjava_pool_size is 20MB.1.4  Java CompatibilityThis release has been thoroughly tested with Sun's Java CompatibilityKit for the JDK 1.3.1.  As discussed in the Java Developer's Guide,the only platform-specific exception to compatibility applies tomaterialization of user interfaces.  It is not appropriate for Javadevelopers to be able to display user interface componentry within theOracle server.  User interfaces by definition imply the presence of auser to interact with Oracle on the server.  Since no such user is, ingeneral, present while Oracle is executing, it would be inappropriateto allow arbitrary user code to bring up a user interface which mightrequire a response.  Remember, this restriction does not prevent youfrom writing Java code that references or uses AWT or Swing classes,as long as you do not execute code on the server that attempts tomaterialize a user interface.Oracle is committed to Oracle9i JVM keeping pace with Java and otherInternet standards.1.5  Compatibility ModeTo use Java in the Oracle9i JVM server, you must set    compatibility = 8.1.0or higher.2.  Known ProblemsThe following known problems encompass the VM itself, Java StoredProcedures, and the utilities used by most Java developers, loadjavaand dropjava.  Java interaction with SQL, particularly known problemswith support for SQL-Java type translations, are discussed in the JDBCREADME.2.1  Memory UsageJava introduces a significant development-time vs. runtime memoryusage difference that is not reflected in the installation-timeconfiguration assistance that is provided.  Specifically, theinstalled configuration is limited to minimum, typical, and custominstalls, but there is no means in this release of querying at installtime to determine how you anticipate using Java.During development of Oracle9i JVM applications, you will be using toolssuch as loadjava, which consume memory in different ways than aruntime Java application.  These tools are development-time only toolsand do not enter into the world of runtime applications.  As discussedin the Java Developer's Guide, you may choose a style of developmentusing a client-side IDE, or you may choose to use the Java compiler onthe Oracle9i JVM.  The Compiler, which is adapted from Sun's JDK compiler,is very memory-intensive, and may require you to increasejava_pool_size from the installed configuration value.The following rules of thumb apply:    - You will need more java_pool_size if you are compiling code on      the server than if you are compiling on the client and loading      to the server.  EJB deployment uses the Java compiler on the      server, and therefore requires java_pool_size to be large.    - You will need more shared_pool_size to handle loading large      numbers of classes to the server and resolving them.    - Under MTS, you will need to increase java_pool_size based on      both the number of sessions and the amount of memory held in      Java static variables at end-of-call.    - Your runtime memory requirements at runtime will most likely be      different than those required for Java development.  If you are      doing Java development, we recommend the following settings:    shared_pool_size = 50000000    java_pool_size = 20000000These are the default installation values for the Oracle9i JVMcustom install.If you are deploying a Java application, the memory requirements willbe dependent on the application itself and the number of usersexecuting it concurrently.2.1.1 Insufficient Memory or Resources During initjvm.sql ExecutionIf initjvm.sql executed properly, the total count of Java schemaobjects should be greater than 8,000, as shown by:    connect internal    select count (*) from user_objects where object_type='JAVA CLASS';All classes should be marked VALID, so the number of invalid classesshould be zero, as shown by:    select count(*) from user_objects        where object_type='JAVA CLASS' and status != 'VALID';If initjvm failed you should check your init.ora file to ensure thatthe shared_pool_size and java_pool_size are at least 50MB and 20MBrespectively.  These values may be set incorrectly if you chose theminimal or typical installation, which assumes you are starting with aJava-enabled database.2.1.2  Insufficient Memory During CompilationIf during use of the Compiler under loadjava, or during deployejb, youhave insufficient memory, you should see an error:    A SQL exception occurred while compiling:    <Java class that was being compiled> : ORA-04031:        unable to allocate <some number of> bytes of shared memory         ("shared pool","unknown object","joxlod: init h",            "JOX: ioc_allocate_pal")The cure is to shut down your database and to reset java_pool_size toa larger value.  The mention of "shared pool" in the error message ismisleading.  Reset java_pool_size, not shared_pool_size.2.1.3  Insufficient Memory During Java Class LoadingWhen shared_pool_size is too low to handle the creation of classschema objects, the operation may fail silently, leaving invalidclasses in the database.  During subsequent runtime execution, thesystem will attempt to resolve any classes that are not VALID.  If itis unsuccessful, you may see a ClassNotFoundException or aNoClassDefFoundException at runtime.  Note that these are valid runtimeexceptions that can occur because you failed to install a class on theserver.  They do not necessarily indicate there was any problem withshared_pool_size during loading.  You should always verify that theclass was included in the set you are loading to the server, and youshould consider using the -force option of loadjava to force the classyou're loading to replace the server-resident one.Use the -resolve options of loadjava to request that loadjava attemptresolution of a class when it is loaded. Normally loadjava will printerror messages when resolution fails. If these messages indicate amemory problem or failures such as "connection lost", you can increasethe size of shared_pool_size and java_pool_size and try again.To double check the status of a class that you have created withloadjava, you can connect to the database in the schema containing theclass and do:    select * from user_objects where object_name =         dbms_java.shortname('<classname>') ;Among the columns of user_objects is a status.2.2  Accessibility of Server-Resident Java SourceIn previous Oracle9i JVM releases, server-resident Java source was notaccessible by the standard means used for PL/SQL.  In release 9.2.0,if you create Java source schema objects, you can view the sourceusing user_source.  Specifically:    select distinct type from user_source;now shows Java source.  Note, however, that Java's binary standardallows you to compile Java code on the client and only load binary tothe server.  This is the approach recommended for Java developmentwith Oracle9i JVM.2.3  DESCRIBE Problems with JavaDESCRIBE of package.procedure gives "object does not exist" when themethod has a Java rather than PL/SQL implementation.  DESCRIBE ofpackage lists only PL/SQL procedures and excludes the Java StoredProcedures.2.4  Loadjava and DropjavaLoadjava and Dropjava are java-based utilities you run on theclient-side to load java binaries, source, or jar files to the server,and to drop the corresponding libunits.  They are documented in thehardcopy as well as the online documentation (e.g., the Oracle9i JavaDeveloper's Guide).2.4.1 We recommend that you not load source and binaries together in ajar file.  You cannot load source (.java) and binary (.class) filesfor the same class in the same jar file.2.4.2 An important aspect of Java is its support for a binarystandard.  The Java binary standard allows you to do client-sidedevelopment and only load the Java binaries to the server.  You mayfind that use of a client-side compiler and loadjava to load theresulting binaries provides better performance than use of loadjavawith source.2.4.4 It would be desirable to allow dropjava to drop a package, butno such capability exists.2.4.5 Loading large jar files may require additional shared_pool.  Thecreation of java schema objects consumes memory specified inshared_pool_size.  If you experience a problem loading large jarfiles, consider increasing the value of SHARED_POOL_SIZE as aworkaround.If you feel that there is a problem with loadjava having not properlyloaded and resolved a class, you can examine the state of loadedclasses by connecting as the user who loaded the class (e.g.,scott/tiger) and executing:    select * from user_objects;Properly loaded and resolved classes should show up with status ofVALID.  A shorthand alternative to determine if any classes are notVALID is:    select dbms_java.longname(object_name) from user_objects        where object_type = 'JAVA CLASS' and status != 'VALID';2.5  Error ReportingErrors are often reported in a trace file.  Please examine the tracefile as your first step in isolating problems.2.6 java.version, oracle.jserver.version, and oracle.server.versionIn release 9.2.0, we return "1.3.1" for java.version property, to

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -