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
Error with Postgres driver
Hi all, I am upgrading to Liferay 7.4 versión with JBoss 7.4 using this manual https://help.liferay.com/hc/es/articles/360028810012-Installing-Liferay-DXP-on-JBoss-EAP (Because i didn't find from 7.4, i don't know if work for this version). I put my Postgres driver in my \modules\com\liferay\portal\main folder and declare it in module.xml
<?xml version="1.0"?>
<module xmlns="urn:jboss:module:1.0" name="com.liferay.portal">
<resources>
<resource-root path="postgresql.jar" />
<resource-root path="annotations-api.jar" />
</resources>
<dependencies>
<module name="javax.api" />
<module name="javax.mail.api" />
<module name="javax.servlet.api" />
<module name="javax.servlet.jsp.api" />
<module name="javax.transaction.api" />
</dependencies>
</module>
i create \modules\org\postgres\main folder because when i was using Liferay 7.1 i was on...
In \standalone\configuration\stadalone.xml i declare my database like this
<subsystem xmlns="urn:jboss:domain:datasources:6.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/databaseName" pool-name="databaseName" enabled="true" use-java-context="true">
<connection-url>url database</connection-url>
<driver>postgresql</driver>
<security>
<user-name>user</user-name>
<password>password</password>
</security>
</datasource>
<drivers>
<driver name="postgresql" module="org.postgres">
<xa-datasource-class>org.postgresql.Driver</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
I have this errors
ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 41) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "postgresql")
]) - bug description: "WFLYJCA0114: Failed to load data source class: org.postgresql.Driver"
ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "databaseName")
]) - Fault description: {
"WFLYCTL0412: Required services not yet installed:" => ["jboss.jdbc-driver.postgresql"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"org.wildfly.data-source.databaseName is missing [jboss.jdbc-driver.postgresql]",
"jboss.driver-demander.java:jboss/datasources/databaseName is missing [jboss.jdbc-driver.postgresql]"
]
}
14:47:22,622 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "databaseName")
]) - Fault description: {
"WFLYCTL0412: Required services that are not yet installed:" => [
"jboss.jdbc-driver.postgresql",
"jboss.jdbc-driver.postgresql"
],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"org.wildfly.data-source.databaseName is missing [jboss.jdbc-driver.postgresql]",
"jboss.driver-demander.java:jboss/datasources/databaseName is missing [jboss.jdbc-driver.postgresql]",
"org.wildfly.data-source.databaseName is missing [jboss.jdbc-driver.postgresql]"
]
}
I have tried some solutions that I have found but no work:( I feel like JBoss can't find \modules\com\liferay\portal\main folder, i don't know what more do... this configuration worked for me in Liferay 7.1 but no in Liferay 7.4
Thanks for reading^-^
I have solved the problem by creating the following folders /postgresql/main in modules/system/layer/base/org and inside this I placed module.xml and the driver.