Changes for page Oracle Installation

Last modified by Vincent Massol on 2023/12/07

<
From version < 16.1 >
edited by Thomas Mortagne
on 2019/06/03
To version < 17.1 >
edited by Vincent Massol
on 2020/01/10
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.ThomasMortagne
1 +XWiki.VincentMassol
Content
... ... @@ -54,6 +54,38 @@
54 54  {{/info}}
55 55  )))
56 56  
57 += Installing Oracle from a VM =
58 +
59 +An easy to test Oracle is to use a VM. Here are some easy steps:
60 +
61 +* [[Download the VM from the Oracle web site>>http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html]]
62 +* Install [[VirtualBox>>https://www.virtualbox.org/]] and import the VM in it
63 +* Note: I had to configure the VM network settings to use the "Bridged Adapter" instead of "NAT" in order to be able see it from my host machine
64 +* Start the VM and log in as ##oracle##/##oracle##
65 +* Note that IP address printed in the shell that opens up, for example: 192.168.0.49
66 +* In the shell, starts the manager: ##emctl start dbconsole##
67 +* Execute all the instructions above in the shell to create the ##xwiki## database (don't forget to download the JDBC driver and put it in ##WEB-INF/lib##). Tip: Put the following in a file (for example ##xwiki.sql## located on the Desktop) and execute {{code}}echo @Desktop/xwiki.sql | sqlplus system/oracle@orcl{{/code}}:(((
68 +{{code}}
69 +drop user xwiki cascade;
70 +create user xwiki identified by xwiki;
71 +select * from dba_data_files;
72 +create tablespace xwiki datafile '/home/oracle/app/oracle/oradata/orcl/xwiki01.dbf' size 1m autoextend on maxsize 1g;
73 +alter user xwiki default tablespace xwiki temporary tablespace temp;
74 +alter user xwiki quota unlimited on xwiki;
75 +grant create session to xwiki;
76 +grant create table to xwiki;
77 +grant create sequence to xwiki;
78 +{{/code}}
79 +)))
80 +* From your host machine, point your browser on http:~/~/192.168.0.49:1158/em and connect as ##system/oracle##
81 +* In your XWiki's ##hibernate.cfg.xml##, use:(((
82 +{{code}}
83 +<property name="connection.url">jdbc:oracle:thin:@192.168.0.49:1521:orcl</property>
84 +{{/code}}
85 +)))
86 +* Don't forget to drop the Oracle JDBC driver in your ##WEB-INF/lib## directory!
87 +* Enjoy ;)
88 +
57 57  = Troubleshooting =
58 58  
59 59  == ORA-01400: cannot insert NULL into ("XWIKI"."XWIKILARGESTRINGS"."XWL_ID") ==
... ... @@ -87,34 +87,16 @@
87 87  
88 88  This is actually caused by a wrong Oracle ##ojdbc## JAR being used. There are different JARs for every different minor version of Oracle. For example if you use the JDBC connector for Oracle 11g version 11.2.0.4.0 and your Oracle db version is 11.2.0.1.0 then you'll have the problem.
89 89  
90 -= Installing Oracle from a VM =
122 +== Errors due to missing RAM ==
91 91  
92 -An easy to test Oracle is to use a VM. Here are some easy steps:
124 +If you see one of the following errors in the XWiki logs, it may simply be that you don't allocate enough RAM to Oracle. This is especially true if you're running it in a VM or in a Docker Container. For example we know that 2GB is not enough for Oracle and 4GB is ok.
93 93  
94 -* [[Download the VM from the Oracle web site>>http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html]]
95 -* Install [[VirtualBox>>https://www.virtualbox.org/]] and import the VM in it
96 -* Note: I had to configure the VM network settings to use the "Bridged Adapter" instead of "NAT" in order to be able see it from my host machine
97 -* Start the VM and log in as ##oracle##/##oracle##
98 -* Note that IP address printed in the shell that opens up, for example: 192.168.0.49
99 -* In the shell, starts the manager: ##emctl start dbconsole##
100 -* Execute all the instructions above in the shell to create the ##xwiki## database (don't forget to download the JDBC driver and put it in ##WEB-INF/lib##). Tip: Put the following in a file (for example ##xwiki.sql## located on the Desktop) and execute {{code}}echo @Desktop/xwiki.sql | sqlplus system/oracle@orcl{{/code}}:(((
101 -{{code}}
102 -drop user xwiki cascade;
103 -create user xwiki identified by xwiki;
104 -select * from dba_data_files;
105 -create tablespace xwiki datafile '/home/oracle/app/oracle/oradata/orcl/xwiki01.dbf' size 1m autoextend on maxsize 1g;
106 -alter user xwiki default tablespace xwiki temporary tablespace temp;
107 -alter user xwiki quota unlimited on xwiki;
108 -grant create session to xwiki;
109 -grant create table to xwiki;
110 -grant create sequence to xwiki;
126 +{{code language='none'}}
127 +SQL Error: 0, SQLState: null
128 +Cannot get a connection, pool error Timeout waiting for idle object
129 +ORA-12519, TNS:no appropriate service handler found
130 +ORA-01435: user does not exist
111 111  {{/code}}
112 -)))
113 -* From your host machine, point your browser on http:~/~/192.168.0.49:1158/em and connect as ##system/oracle##
114 -* In your XWiki's ##hibernate.cfg.xml##, use:(((
115 -{{code}}
116 -<property name="connection.url">jdbc:oracle:thin:@192.168.0.49:1521:orcl</property>
117 -{{/code}}
118 -)))
119 -* Don't forget to drop the Oracle JDBC driver in your ##WEB-INF/lib## directory!
120 -* Enjoy ;)
132 +
133 +Note that it's possible to have these errors for other reasons too but you should at least check that the RAM is enough.
134 +

Get Connected