Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Integrate MongoDB with Liferay7.2
Dear Team,
if we are using MYSQL then we need to edit portal-ext.properties .
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=root
if we are using MongoDB then what we need to do changes.
Can you please let me know . Actually i am trying to Integrate MongoDB with Liferay.
RegardsRam
if we are using MYSQL then we need to edit portal-ext.properties .
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=root
if we are using MongoDB then what we need to do changes.
Can you please let me know . Actually i am trying to Integrate MongoDB with Liferay.
RegardsRam
Mongo has nothing to do with Liferay and/or JDBC (and especially service builder). Nothing at all changes from your Liferay implementation details.
For Mongo, you still need the Mongo jar(s) and create a client connection to Mongo and then you just consume it as you would in any other java code, nothing special.
If you're exposing across OSGi, you want to ensure you only expose your POJOs and not any of your Mongo class dependencies. Otherwise you'll bleed the dependencies across your module landscape and complicate your dependency management.
For Mongo, you still need the Mongo jar(s) and create a client connection to Mongo and then you just consume it as you would in any other java code, nothing special.
If you're exposing across OSGi, you want to ensure you only expose your POJOs and not any of your Mongo class dependencies. Otherwise you'll bleed the dependencies across your module landscape and complicate your dependency management.
Hi David
thank you....Regards
Ram
thank you....Regards
Ram
Hi ,
jdbc.default.driverClassName=mongodb.jdbc.MongoDriver
jdbc.default.password=admin
jdbc.default.url=jdbc.mongo://<localhost>:<27017>/<expertdb>
jdbc.default.username=welcome123
Error creating bean with name 'liferayDataSourceImpl' defined in class path resource [META-INF/infrastructure-spring.xml]: Invocation of init method failed; nested exception is java.lang.ClassNotFoundException: mongodb.jdbc.MongoDriver.
i am getting error mongodb jdbc mongoDrive
RegardsRam
jdbc.default.driverClassName=mongodb.jdbc.MongoDriver
jdbc.default.password=admin
jdbc.default.url=jdbc.mongo://<localhost>:<27017>/<expertdb>
jdbc.default.username=welcome123
Error creating bean with name 'liferayDataSourceImpl' defined in class path resource [META-INF/infrastructure-spring.xml]: Invocation of init method failed; nested exception is java.lang.ClassNotFoundException: mongodb.jdbc.MongoDriver.
i am getting error mongodb jdbc mongoDrive
RegardsRam
Ramalingaiah. D:
There is a certain number of database engines that Liferay is compatible with. The listed open source databases apply to CE, while DXP supports all of the listed ones. Mongo DB is not among them.
Hi ,
jdbc.default.driverClassName=mongodb.jdbc.MongoDriver
jdbc.default.password=admin
jdbc.default.url=jdbc.mongo://<localhost>:<27017>/<expertdb>
jdbc.default.username=welcome123
Error creating bean with name 'liferayDataSourceImpl' defined in class path resource [META-INF/infrastructure-spring.xml]: Invocation of init method failed; nested exception is java.lang.ClassNotFoundException: mongodb.jdbc.MongoDriver.
When David said "For Mongo, you still need the Mongo jar(s) and create a client connection to Mongo and then you just consume it as you would in any other java code, nothing special." he was referring to your custom code being able to access a MongoDB backend as you could build it in any other environment than Liferay.
For the Liferay database itself (which you configure through the properties that you list) the other sentence applies: "Mongo has nothing to do with Liferay and/or JDBC (and especially service builder)."
Dear Olaf Kock,
osgi not connecting mongodb jar versions ( mongo-java-driver-3.8.2 and mongo-java-driver-3.9.1),
which version mongodb support in liferay 7.2 ,
i am using liferay 7.2,
Regards
Ram
osgi not connecting mongodb jar versions ( mongo-java-driver-3.8.2 and mongo-java-driver-3.9.1),
which version mongodb support in liferay 7.2 ,
i am using liferay 7.2,
Regards
Ram
Ram, you really need to read up on Mongo I think before proceeding further.
Mongo connections are not created using JDBC properties and/or a JDBC URL. A mongo client is created and it is established via a network (host/port) connection.
There is no JDBC, there is no driver, etc. Whatever you are trying to do, it really looks like you are trying to treat Mongo as though it is any old RDBMS. It absolutely is not; you connect to it in a different way, you do CRUD operations on it in a different way, etc.
Mongo connections are not created using JDBC properties and/or a JDBC URL. A mongo client is created and it is established via a network (host/port) connection.
There is no JDBC, there is no driver, etc. Whatever you are trying to do, it really looks like you are trying to treat Mongo as though it is any old RDBMS. It absolutely is not; you connect to it in a different way, you do CRUD operations on it in a different way, etc.