RE: Question for Liferay 7 compatibility with oracle database

bo liu, modified 8 Years ago. New Member Posts: 9 Join Date: 7/20/17 Recent Posts
Hi all, I recently downloaded liferay 7 CE and trying to connect the database to oracle 12c, could someone tell me is that possible? Is liferay 7 CE compatible with oracle 12c? since I got some errors while trying to connect, if they are not compatible, is there any way around for me to set it up? Thanks!
thumbnail
David H Nebinger, modified 8 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
bo liu:
Hi all, I recently downloaded liferay 7 CE and trying to connect the database to oracle 12c, could someone tell me is that possible? Is liferay 7 CE compatible with oracle 12c? since I got some errors while trying to connect, if they are not compatible, is there any way around for me to set it up? Thanks!


The open source version of Liferay 7 CE only supports open source databases.








Come meet me at Devcon 2017 or 2017 LSNA!
Neelesh Sahay, modified 8 Years ago. New Member Posts: 14 Join Date: 7/21/17 Recent Posts
I had read somewhere that Liferay CE GA4 will support Oracle.
Based on your response, does it mean that even Liferay 7 CE GA4 will not support Oracle 12c?

Thanks,
NS
thumbnail
David H Nebinger, modified 8 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
Neelesh Sahay:
I had read somewhere that Liferay CE GA4 will support Oracle.
Based on your response, does it mean that even Liferay 7 CE GA4 will not support Oracle 12c?


There was no ambiguity in my response.

Some community members have reintroduced support for sql server, I believe, and that might be an avenue for you to pursue creating your own support for oracle, but there is no built in support for commercial databases in Liferay 7 CE.









Come meet me at Devcon 2017 or 2017 LSNA!
thumbnail
Jamie Sammons, modified 8 Years ago. Expert Posts: 367 Join Date: 9/5/14 Recent Posts
Here's a link to where you can build an Oracle DB driver for yourself: https://www.dontesta.it/en/2016/04/13/liferay-7-ce-how-to-add-support-for-oracle-db/
Neelesh Sahay, modified 8 Years ago. New Member Posts: 14 Join Date: 7/21/17 Recent Posts
Thank You.
thumbnail
Omkar Khandare, modified 8 Years ago. Junior Member Posts: 49 Join Date: 3/7/12 Recent Posts
Hi All,

I want to know Accessing Oracle DB from Liferay 7 CE Gradle Project is possible?
As I am working on such portlet,
I have created Spring MVC Portlet and Added Oracle DB Connection and Other aceess related code and tried adding dependency of Oracle JDBC Driver in build.gradle of project as "compile group: 'com.oracle', name: 'ojdbc14', version: '10.2.0.2.0'",
On "Gradle refresh" in eclipse it doesn't show any error.
But I could not able to build project, It Unable to resolve dependency.

Shows Error as below.

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':wars:tp-XXXXXX-Portlet:compileClasspath'.
> Could not find ojdbc14.jar (com.oracle:ojdbc14:10.2.0.2.0).
Searched in the following locations:
https://repo1.maven.org/maven2/com/oracle/ojdbc14/10.2.0.2.0/ojdbc14-10.2.0.2.0.jar


Is there any specific version of Oracle supports in such scenario Or How can i achieve such requirement.?

Thanks.
thumbnail
Olaf Kock, modified 8 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
I'm not expecting the oracle driver to be available from Maven Central (indeed, see here, only checksums). You might need to provide it yourself - in whatever way you'd like: By manually adding it to the project, by uploading it to your own repository that you're using besides maven central, or any other means.
Neelesh Sahay, modified 8 Years ago. New Member Posts: 14 Join Date: 7/21/17 Recent Posts
Thank You
David H Nebinger, modified 8 Years ago. New Member Post: 1 Join Date: 1/8/18 Recent Posts
The code you are linking was created for Liferay 7 CE GA1, and may need to be adopted for GA3 (read: You should not install GA1). Liferay 7 is increasingly modularized, and it is possible that some classes are transferred from the kernel to a module, which breaks the dependencies of the classpath (in the hope of maintaining API compatibility). As the technique to add compatibility with Oracle to Liferay seems pretty brute force (it goes to the global classpath instead of being a module), I can easily imagine it.
thumbnail
Omkar Khandare, modified 8 Years ago. Junior Member Posts: 49 Join Date: 3/7/12 Recent Posts
So How can i achieve that gradle module project in Liferay 7 accessing external Oracle DB and fetch required data from Table or Views by executing custom queries and getting result to use.?
thumbnail
Omkar Khandare, modified 8 Years ago. Junior Member Posts: 49 Join Date: 3/7/12 Recent Posts
Thanks. I got below solution and it worked for me.

Done entry in build.gradle dependencies as follows.

compile fileTree(dir: 'lib', include: '**/*.jar')

And I have used manually downloaded ojdbc6-11.2.0.3.jar and kept it into WEB-INF/lib/ojdbc6-11.2.0.3.jar

Here lib folder is created manually.
Pon selvanG, modified 7 Years ago. New Member Posts: 5 Join Date: 6/1/18 Recent Posts
Hi Omkar Khandare,

What are steps you have followed for connecting liferay 7 with Oracle as External database ?

Can you share that datails ?

Thanks in Advance.
thumbnail
Olaf Kock, modified 7 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
Pon selvanG

What are steps you have followed for connecting liferay 7 with Oracle as External database ?

Can you share that datails ?
Just scroll up a little bit: Jamie has posted a link. Follow that to find Antonio's Oracle-Implementation for Liferay CE
Pon selvanG, modified 7 Years ago. New Member Posts: 5 Join Date: 6/1/18 Recent Posts
Hi Olaf Kock,

Thanks for your Reply.

My requirement is.

Need to connect liferay dxp with oracle as external database. And fetch some details from oracle(2nd Demoticon database.

Please tell me.
thumbnail
Olaf Kock, modified 7 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
Pon selvanG
Need to connect liferay dxp with oracle as external database. And fetch some details from oracle(2nd Demoticon database.

I don't understand... Liferay 7 (CE) - as the subject assumes? Or Liferay DXP (the commercial offering)?
Liferay DXP works with Oracle out of the box. If you're developing your custom components ("2nd database" sounds like it), then I think this is the wrong thread and you should open a new one, post your own code and setup.

Whatever you do, you definitely need the appropriate driver. But without more details, it' impossible (for me) to come up with more details
thumbnail
Amos Fong, modified 7 Years ago. Junior Member Posts: 49 Join Date: 3/7/12 Recent Posts
Pon selvanGHi Omkar Khandare,

What are steps you have followed for connecting liferay 7 with Oracle as External database ?

Can you share that datails ?

Thanks in Advance.
I was working on Spring MVC portlet in Liferay 7 Community Edition
I written one Java code to connect to Oracle DB and execute query on it to get specific response.
As i mentioned in earlier post my code not able connect to the DB and i was facing JDBC driver issue.
So i have created folder named 'lib' into WEB-INF and put the jar into it.
Following is relevant path.
src/main/webapp/WEB-INF/lib/ojdbc6.jar
Then i have added below entry into dependencies section of build.gradle file.
compile fileTree(dir: 'lib', include: '**/*.jar')

That's it. Done.
​​​​​​​
If your project is module type then i think adding Import entry of Oracle jar into the bnd.bnd will help.


Hope this will help you.