Experience in integrating java programs in Oracle!

Source: Internet
Author: User
During this period, we developed a tool for internal data processing. It involves integrating java applications in Oracle and summing up some experiences for your reference! The program is divided into two parts. The front-end interface is developed by VBVC to implement data processing configuration and regular record operations. There is nothing to say about this part. Oracle-based data processing hosting platform in the background,

During this period, we developed a tool for internal data processing. It involves integrating java applications in Oracle and summing up some experiences for your reference! The program is divided into two parts. The front-end interface is developed by VB/VC to implement data processing configuration and regular record operations. There is nothing to say about this part. Oracle-based data processing hosting platform in the background,

During this period, we developed a tool for internal data processing. It involves integrating java applications in Oracle and summing up some experiences for your reference!

The program is divided into two parts. The front-end interface is developed by VB/VC to implement data processing configuration and regular record operations. There is nothing to say about this part.

The background uses Oracle as the data processing and hosting platform. During data processing, abstract extraction and splitting of some names and addresses are required. This part is implemented in java, and loadjava makes corresponding processing functions into Oracle.

Here, how to integrate java in Oracle can be easily found on the Internet, which is not detailed here. It mainly focuses on the following details:

1: When loadjava is used, it is best to add the "-genmissing" parameter, so that after the corresponding jar or java file is uploaded, Oracle will immediately load each class. If there is an error, will be listed in detail in the command line immediately, so as to avoid errors in the operation. When an error occurs during running, sometimes the error message is rough and difficult to troubleshoot!

2: If the java program involves reading and writing system environment variables, disks, IO channels, and other resources, you must first authorize the relevant users, generally as follows:

Xecute dbms_java.grant_permission ('xsdpp ', 'sys: java. util. propertyPermission ', 'dic. dir ', 'write') execute DBMS_JAVA.grant_permission ('xsdpp', 'sys: java. io. filePermission ',' <> ', 'read, write, execute, delete'); execute DBMS_JAVA.grant_permission ('xsdpp', 'java. io. filePermission ',' <> ', 'read, write, execute, delete'); execute Dbms_Java.Grant_Permission ('xsdpp', 'sys: java. lang. runtimePermission ', 'writefiledescriptor', ''); execute Dbms_Java.Grant_Permission ('xsdpp ', 'sys: java. lang. runtimePermission ', 'readfilescriptor', ''); execute Dbms_Java.Grant_Permission ('xsdpp ', 'java. io. filePermission ',' <> ', 'read, write, execute, delete'); execute Dbms_Java.Grant_Permission ('xsdpp', 'java. lang. runtimePermission ',' * ', 'writefiledescriptor'); execute Dbms_Java.grant_permission ('xsdpp ', 'java. net. socketPermission ',' *: * ', 'Accept, connect, listen, resolve ');

3: java code version: 9i database only supports jdk1.3, 10g supports 1.4, and 11g and above support jdk1.5, therefore, if the java code that uses features such as generics and enum can only be used at 11 GB, if the actual production system must use a version earlier than 10 GB and does not want to make large-scale modifications to the Code, the open-source tool "movie translator" can be used to perform 1.4 compatible processing on classes above JDK. For this content, you can refer to: http://www.ibm.com/developerworks/cn/java/j-jtp02277.html? S_cmp = techccid & s_tact = 105agx52

Sites for "movie translator": http://retrotranslator.sourceforge.net/

General Usage:

Java-jar retrotranslator-transformer-1.2.9.jar-srcjar M:/Develop/WordSimilarity/dist/WordSimilarity. jar-destjar M:/Develop/WordSimilarity/dist/WordSimilarity14.jar-embed com. navinfo. transformer

4: functions integrated into Oracle functions, such as Word Segmentation, must be set to Global static, which can prevent repeated loading and improve processing efficiency

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.