Instability when running two Vaadin portlets in portal?

Hi,
We configured our Liferay to handle multiple Vaadin portlets according to these directions:

http://www.liferay.com/community/wiki/-/wiki/Main/Developing%20Vaadin%20Applications%20as%20Liferay%20Portlets/pop_up#section-Developing+Vaadin+Applications+as+Liferay+Portlets-PrepareYourLiferay5.2ToHandleMultipleVaadinPortlets

However, occasionally the system gives the following exception for the other portlet, and the portal shows red message of malfuction in portlet (the other portlet works all the time):

09:39:19,688 ERROR [jsp:165]
java.lang.NullPointerException
at com.vaadin.terminal.gwt.server.AbstractWebApplicationContext.endTransaction(AbstractWebApplicatntext.java:86)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.ja4)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:29
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:618)
at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:700)
at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:419)
at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1467)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Have you faced anything like this? Thanks.

Liferay 5.2.3 / Vaadin 6.3.3

  • L -

The first few lines of the stack trace seem to be corrupted, so I cannot be certain of the line numbers and if there is something missing. However, the only way I see there could be a NPE from AbstractWebApplicationContext.endTransaction() is if a TransactionListener is null.

Do you add your own transaction listeners? Are you sure they are not null? Does your TransactionListener try to manipulate the list of TransactionListeners?

AbstractWebApplicationContext .java

71 synchronized (listeners) {
72 for (TransactionListener listener : listeners) {
73 try {
74 listener.transactionEnd(application, request);
75 } catch (final RuntimeException t) {
76 if (exceptions == null) {
77 exceptions = new LinkedList();
78 }
79 exceptions.add(t);
80 }

this gives NPE as far as our research tells us. The problem might be in our way to integrate with Spring.

… trying to find the solution.

Thanks for tip - I will write down the resolution when found… hope we will…

  • L -

I added a null check when registering a transaction listener and a note in the javadoc in
ticket 5127
.