Forums de discussion

Your request failed to complete

ruchi dubey, modifié il y a 11 années.

Your request failed to complete

New Member Publications: 9 Date d'inscription: 25/02/13 Publications récentes
Hi
I am working on liferay 6.0 with service builder. Service.xml builds successfully, after adding portlet to liferay and on clicking on save button I got this error
"your request failed to complete."
Can somebody please explain here why this error coming and the actual cause of this error.
Thanks
Ruchi
thumbnail
Jay Trivedi, modifié il y a 11 années.

RE: Your request failed to complete

Regular Member Publications: 109 Date d'inscription: 24/11/12 Publications récentes
Ruchi,
Better you Put down piece of codes. emoticon
thumbnail
Manish Yadav, modifié il y a 11 années.

RE: Your request failed to complete

Expert Publications: 493 Date d'inscription: 26/05/12 Publications récentes
can you provide log file ..what exception its showing
thumbnail
Hitoshi Ozawa, modifié il y a 11 années.

RE: Your request failed to complete

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
This is happening because you have a bug in your portlet code. The portlet is not working properly because of this bug.
The actual root of this error is the person who wrote the portlet did not write the program correctly.
thumbnail
Raja Nagendra Kumar, modifié il y a 11 années.

RE: Your request failed to complete

Expert Publications: 484 Date d'inscription: 02/03/06 Publications récentes
Which liferay bundle are you using.

If Tomcat Version, enable liferay debug logs at server using the details at http://www.liferay.com/community/wiki/-/wiki/Main/How+to+configure+the+logs+in+Liferay

When you are seeing "your request failed to complete." at browser, look at server logs, which should give the stack trace, which may have errors such as NullPointerException etc.. That should give the clues on what is wrong with the portlet you have developed

Regards,
Raja Nagendra Kumar,
www.tejasoft.com
ruchi dubey, modifié il y a 11 années.

RE: Your request failed to complete

New Member Publications: 9 Date d'inscription: 25/02/13 Publications récentes
Below I m putting code.
Service.xml

<service-builder package-path="com.liferay.book">
	<namespace>Book</namespace>
	<entity name="Book" local-service="true" remote-service="false">

		<!-- PK fields -->

		<column name="bookId" type="long" primary="true" />

		<!-- Other fields -->

		<column name="bookName" type="String" />
		<column name="isbn" type="String" />
		<column name="companyId" type="long" />
		<column name="groupId" type="long" />
		
		<order by="asc">
			<order-column name="bookName" />
		</order>	

		<finder name="G_PN" return-type="Collection">
			<finder-column name="groupId" />
			<finder-column name="bookName" />
		</finder>
		<finder name="GroupId" return-type="Collection">
			<finder-column name="groupId" />
		</finder>
		<finder name="CompanyId" return-type="Collection">
			<finder-column name="companyId" />
		</finder>
	</entity>
</service-builder>


BookLocalServiceImpl.java

public class BookLocalServiceImpl extends BookLocalServiceBaseImpl {
	
	public Book addBook(Book book, long userId) throws SystemException, PortalException{
		Book l = BookUtil.create(CounterLocalServiceUtil.increment(Book.class.getName()));
		resourceLocalService.addResources(book.getBookId(), book.getGroupId(), userId, Book.class.getName(), book.getPrimaryKey(), false, true, true);
		l.setIsbn(book.getIsbn());
		l.setBookName(book.getBookName());
		l.setCompanyId(book.getCompanyId());
		l.setGroupId(book.getGroupId());
		return bookPersistence.update(l, false);
		//return BookUtil.update(l, false);
	}
}


liberary1.java
public class Liberary1 extends MVCPortlet {

	public void addBook(ActionRequest request, ActionResponse response) throws SystemException, PortalException {
		String title = request.getParameter("bookName");
		String isbn = request.getParameter("bookSerial");
		ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);
			Book book = ActionUtil.productFromRequest(request);
			ArrayList<string> errors = new ArrayList<string>();
			if (BookRegValidator.validateProduct(book, errors)) {
				//BookLocalServiceUtil.addBook(title, isbn);
				BookLocalServiceUtil.addBook(title, isbn);
				//BookLocalServiceUtil.addBook(book, themeDisplay.getUserId());
				SessionMessages.add(request, "product-saved-successfully");
			}
			else {
				SessionErrors.add(request, "fields-required");
			}
	}
}</string></string>


portal.xml

<!--?xml version="1.0"?-->

<portlet-app version="2.0" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
	<portlet>
		<portlet-name>library</portlet-name>
		<display-name>Library</display-name>
		<portlet-class>com.liferay.util.bridges.mvc.MVCPortlet</portlet-class>
		<init-param>
			<name>view-jsp</name>
			<value>/view.jsp</value>
		</init-param>
		<expiration-cache>0</expiration-cache>
		<supports>
			<mime-type>text/html</mime-type>
		</supports>
		<portlet-info>
			<title>Library</title>
			<short-title>Library</short-title>
			<keywords>Library</keywords>
		</portlet-info>
		<security-role-ref>
			<role-name>administrator</role-name>
		</security-role-ref>
		<security-role-ref>
			<role-name>guest</role-name>
		</security-role-ref>
		<security-role-ref>
			<role-name>power-user</role-name>
		</security-role-ref>
		<security-role-ref>
			<role-name>user</role-name>
		</security-role-ref>
	</portlet>
	<portlet>
		<portlet-name>liberary1</portlet-name>
		<display-name>Liberary1</display-name>
		<portlet-class>com.test.Liberary1</portlet-class>
		<init-param>
			<name>view-jsp</name>
			<value>/html/liberary1/view.jsp</value>
		</init-param>
		<init-param>
		    <name>add-process-action-success-action</name>
    		<value>false</value>
		</init-param>
		<expiration-cache>0</expiration-cache>
		<supports>
			<mime-type>text/html</mime-type>
			<portlet-mode>view</portlet-mode>
		</supports>
		<portlet-info>
			<title>Liberary1</title>
			<short-title>Liberary1</short-title>
			<keywords></keywords>
		</portlet-info>
		<security-role-ref>
			<role-name>administrator</role-name>
		</security-role-ref>
		<security-role-ref>
			<role-name>guest</role-name>
		</security-role-ref>
		<security-role-ref>
			<role-name>power-user</role-name>
		</security-role-ref>
		<security-role-ref>
			<role-name>user</role-name>
		</security-role-ref>
	</portlet>
</portlet-app>


where is the problem please let me know...
thumbnail
Manish Yadav, modifié il y a 11 années.

RE: Your request failed to complete

Expert Publications: 493 Date d'inscription: 26/05/12 Publications récentes
can you please provide log files what. exception you are getting in console
ruchi dubey, modifié il y a 11 années.

RE: Your request failed to complete

New Member Publications: 9 Date d'inscription: 25/02/13 Publications récentes
No Exception coming at log.
However I resolved it as I forgot to put userId column at service builder.

well Thanks for all suggestions :-)
thumbnail
Kiran Yalavali, modifié il y a 8 années.

RE: Your request failed to complete

Regular Member Publications: 175 Date d'inscription: 15/10/14 Publications récentes
Hi ruchi,

I am getting the same error so how to resolve this issue pls help me.
thumbnail
Kiran Yalavali, modifié il y a 8 années.

RE: Your request failed to complete

Regular Member Publications: 175 Date d'inscription: 15/10/14 Publications récentes
Hi all,

Thanks for every one becouse solve my issue.