I just tried to upgrade Vaadin to 6.6. I’m using HbnContainer and now I got this strange error :
java.lang.NullPointerException
at com.vaadin.data.hbnutil.HbnContainer.indexOfId(HbnContainer.java:1334)
at com.vaadin.ui.Select.getOptionsWithFilter(Select.java:350)
at com.vaadin.ui.Select.paintContent(Select.java:212)
at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
at com.vaadin.ui.Table.paintRow(Table.java:2679)
at com.vaadin.ui.Table.paintContent(Table.java:2504)
at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
at com.vaadin.ui.AbstractOrderedLayout.paintContent(AbstractOrderedLayout.java:171)
at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
at com.vaadin.ui.Panel.paintContent(Panel.java:255)
at com.vaadin.ui.Window.paintContent(Window.java:632)
at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.writeUidlResponce(AbstractCommunicationManager.java:952)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.paintAfterVariableChanges(AbstractCommunicationManager.java:839)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:765)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:662)
The code in question is the following:
public int indexOfId(Object itemId) {
Integer index = idToIndex.get(itemId);
return index;
}
The NPE occurs because the idToIndex map is empty, then index is null and the autounboxing fails.
Maybe the new Filtering API change has broken it somehow. In case you find out a fix, please post it to me and I’ll publish a compatible version to the directory. I can try to find a fix for this later this week.
I uploaded a new version of HbnContainer, but now when looking at your stack trace I guess it still wont work for your use case. Select components already appear to use the new API so it will break on the same place but with a bit more meaningful message.
Thanks for your answer, sorry I didn’t catch it earlier. I tried the new version HbnContainer 1.0.3 with Vaadin 6.6.0 and it still seems broken somehow.
The symptom is the same:
java.lang.NullPointerException
at com.vaadin.data.hbnutil.HbnContainer.indexOfId(HbnContainer.java:1338)
at com.vaadin.ui.Select.getOptionsWithFilter(Select.java:350)
at com.vaadin.ui.Select.paintContent(Select.java:212)
at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
at com.vaadin.ui.Table.paintRow(Table.java:2679)
at com.vaadin.ui.Table.paintContent(Table.java:2504)
at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
at com.vaadin.ui.AbstractOrderedLayout.paintContent(AbstractOrderedLayout.java:171)
at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
at com.vaadin.ui.Panel.paintContent(Panel.java:255)
at com.vaadin.ui.Window.paintContent(Window.java:632)
at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:755)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.writeUidlResponce(AbstractCommunicationManager.java:952)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.paintAfterVariableChanges(AbstractCommunicationManager.java:839)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:765)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:662)
In earlier Vaadin versions, I don’t think the method itself is called. I don’t know why :*)
Hi! I’m also trying to get HbnContainer 1.0.4 working with Vaadin 6.6 in a Liferay 6.0.6 portlet and having a little trouble. It is probably unrelated to the issues described in this thread that are fixed, but wondering if you could take a look. This is the example portlet that I was trying to get working:
https://github.com/garysweaver/vaadin-hibernate-portlet
Can’t promise when I find out time to look after this. It would help though if you can isolate the Liferay thing out of the palette. That way it takes less time for me to setup a proper debugging environment.
I’m assuming that the ability to generate Vaadin 6.6.0 apps as portlets works properly also, but all I checked was that the equivalent of Hello World worked before I started on this.