Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Preetha Pais
Portal development
April 4, 2013 1:02 AM
Answer

Preetha Pais

Rank: New Member

Posts: 3

Join Date: April 3, 2013

Recent Posts

Hi everybody,

I am new to liferay and I am doing a project using Liferay Portal 6.1 and Eclipse juno IDE.I have used DB2 as the databse.I have created a simple registration portlet which includes a registration form to enter the details of the new user.I want to save these user details into the database but when I try to save the details into database it saves null values .I have attached the files in the portlet and the error details in the console.

So kindly help me to solve this problem.

Thank you,
Preetha
Attachments: code.docx (240.4k)
Apoorva Prakash
RE: Portal development
April 4, 2013 2:50 AM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 659

Join Date: June 15, 2010

Recent Posts

Preetha Pais:
Hi everybody,

I am new to liferay and I am doing a project using Liferay Portal 6.1 and Eclipse juno IDE.I have used DB2 as the databse.I have created a simple registration portlet which includes a registration form to enter the details of the new user.I want to save these user details into the database but when I try to save the details into database it saves null values .I have attached the files in the portlet and the error details in the console.

So kindly help me to solve this problem.

Thank you,
Preetha


Hello Preetha,

You are supposed to use service builder for database connectivity. This is not correct way to achieve Liferay Database connectivity.

See this link to understand the concept of service builder.

HTH.

Thanks and Regards,
Apoorva Prakash
Apoorva Prakash
RE: Portal development
April 9, 2013 8:01 AM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 659

Join Date: June 15, 2010

Recent Posts

Preetha Pais:
Hello sir,
Thank u for the reply. I created a new greeting portlet and also created service.xml file in the docroot/WEB-INF folder. When i build that service it gives error. i have a doubt that whether i have to create a database before creating service.xml.

Can you please give me detailed description of how the service builder works and how to create the database in liferay..

I have also attached the error that i got when i build the service.xml file


Hello Preetha,

I cannot provide you pin point error as you have not mentioned the exact exception.

Make sure you not working on HSQL.

Liferay creates database schema at the time of you start Liferay after providing connection details (database driver, db name, username and password) in portal-ext.properties file for the first time. Make you sure you are doing it correctly.

The table (whose details you've mentioned in service.xml) is created by Liferay itself at the time of deployment.

HTH.

Thanks and Regards,
Apoorva Prakash
Manish Yadav
RE: Portal development
April 9, 2013 3:00 AM
Answer

Manish Yadav

Rank: Expert

Posts: 467

Join Date: May 26, 2012

Recent Posts

Hello Preetha Pais,

1. Above problem is due to JAVA_HOME path is present in your machine
2. First set path JAVA_HOME, path variable for java
3. create a portlet with Liferay MVC
4. Try to submit form using action class instead of .jsp
5. ServiceBuilder while create tables in database while deployement.You no need to create separately tables in db.
Preetha Pais
RE: Portal development
April 10, 2013 11:42 PM
Answer

Preetha Pais

Rank: New Member

Posts: 3

Join Date: April 3, 2013

Recent Posts

Thank you sir
We have created service.xml and its build successfully but we want to know the location where the table is created we are not able to findout and we are using db2 database for our project
Apoorva Prakash
RE: Portal development
April 10, 2013 11:59 PM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 659

Join Date: June 15, 2010

Recent Posts

Preetha Pais:
Thank you sir
We have created service.xml and its build successfully but we want to know the location where the table is created we are not able to findout and we are using db2 database for our project


Hello Preetha,

It will be created in database in the following format:
namespace_tableName (these both you specify in service.xml file)

HTH.

Thanks and Regards,
Apoorva Prakash