Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
I have been searching for up-to-date information on how to run OX on LifeRay. I am newbie to both OX and LifeRay. I installed latest Liferay version (6.1 It says Enterprise edition but I believe it is community edition) with included Tomcat.
I have been searching for a guideline on how to install and run an OX application on Liferay but only found descriptions of older versions. I also see some questions on Liferay now in the forum from experienced users specific related to the latest versions. So perhaps it is because of specific problems with latest versions that I do not get it. But a good reference documentation would help.
Can anybody point me a description that could help me?
OpenXava 4.7 works perfectly with Liferay 6.1. You can deploy the generated war in Liferay 6.1 just as any other standard portlet application.
Please, put here your concrete problems and we'll help you to solve it. When you'll achieve to deploy your application in Liferay 6.1 would be nice if you create a page with the instructions in the OpenXava wiki.
Help others in this forum as I help you.
Need more help? Get OpenXava professional support.
The problems that I have now relate apparently to the database connection. I can see the OX portlet in Liferay but the entities list gives the error: "Errors trying to obtain data list"
Note that I updated the context file of the liferay-tomcat just like the OX-tomcat: with exactly the same resource definition. Is that OK?
"Errors trying to obtain data list" is too generic. Put here the complete stacktrace produced in order to know the root of the problem.
I attach here the stack trace. I have 2 applications deployed: my own applucation and also the myschool application. Each of them works with a different database URL: For myschool the DB URL is is "jdbc:hsqldb:file:../data/my-school-db". For my own application ("Engine") the DB URL is "jdbc:hsqldb:hsql://localhost:1666".
Thanks for looking into this.
The problem is apparently related to the database connection (read connection refised in log file). I read the following in the documentation:
You must have configured the datasource of your application in the liferay tomcat, for example, adding an entry to openxava-portal-3.0/conf/context.xml and adding the JDBC driver to openxava-portal-3.0/common/lib.
I did only the first part: I updated the context file of the liferay-tomcat just like the OX-tomcat: with exactly the same resource definition, assuming that is the way to do it.
I did not do anything for the JDBC driver because I do not know what to do. Might the probem be related to that?
the problem could be that Hypersonic version of Liferay 6.1 and that one of your server does not match. Liferay 6.1 has a Hypersonic version that is not compatible with the one included in OpenXava for the samples. This is not a big problem, the solution is to start your database server using in the classpath the hypersonic java from Liferay 6.1 instead of the jar from openxava/tomcat.
I propose to take it step by step.
Hence a first subject:
I guess I have to execute “build – updateSchema” towards the liferay hypersonic db instead of towards the OX hypersonic db. (right?)
Therefore I put the URL from the liferay db in the file "persistence.xml":
<property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
<property name="hibernate.connection.url" value="jdbc:hsqldb:C:/Programs/liferay/data/hsql/lportal"/>
When I execute update schema from within eclipse it says table created. But when I look into the liferay tables, I see all the liferay tables but not my table.
I guess this is a problem.
Can anybody give me a hint.
updateSchema does not work well against a file HSQL. It's better to start the Hypersonic as a server to use updateSchema.
Moroever, to use the Liferay portal for your data is not very advisable. Create your own databases for your own data. You have to start your Hypersonic database using the jar included in Liferay in classpath.
That was it indeed. Now it works. As promised, I updated the wike page http://www.liferay.com/community/wiki/-/wiki/1071674/How+to+install+an+OpenXava+application+on+Liferay.
I will now dive into authorization with Lifeay and then into documents management with Liferay.
Thanks for your help,
As promised, I updated the wike page
As promised, I updated the wike page