ListenerMethod Exception

Hi,

I am getting the following error, could someone help me on this?? Thanks.

SEVERE: Terminal error:
com.vaadin.event.ListenerMethod$MethodException: Invocation of method buttonClick in com.example.ui.INVNewProdForm failed.
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:530)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219)
at com.vaadin.ui.Button.fireClick(Button.java:567)
at com.vaadin.ui.Button.changeVariables(Button.java:223)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.changeVariables(AbstractCommunicationManager.java:1460)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1404)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1329)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:761)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:323)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at com.seeburger.httplistener.connectors.ListenerValve.invoke(ListenerValve.java:308)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:113)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 29
at oracle.jdbc.driver.OracleSql.computeBasicInfo(OracleSql.java:950)
at oracle.jdbc.driver.OracleSql.getSqlKind(OracleSql.java:623)
at oracle.jdbc.driver.OraclePreparedStatement.(OraclePreparedStatement.java:1212)
at oracle.jdbc.driver.T4CPreparedStatement.(T4CPreparedStatement.java:28)
at oracle.jdbc.driver.T4CDriverExtension.allocatePreparedStatement(T4CDriverExtension.java:68)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3140)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3042)
at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:6022)
at com.vaadin.data.util.sqlcontainer.query.TableQuery.executeUpdateReturnKeys(TableQuery.java:467)
at com.vaadin.data.util.sqlcontainer.query.TableQuery.storeRow(TableQuery.java:197)
at com.vaadin.data.util.sqlcontainer.SQLContainer.commit(SQLContainer.java:933)
at com.example.ui.INVNewProdForm.buttonClick(INVNewProdForm.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)

Hello,

The problem you encounter is related to the actual implementation of your listener. Though the details are scarce, quick web-search points to at least t
his SO post
that might help you.

HTH
Aleksandr

Thanks Alexander

Below is code, where I am preparing the Select statement. In all other SQL Queries are using vaadin TableQuery only. What is that I am missing?

    	Connection conn = getPool().reserveConnection();
    	Statement statement = conn.createStatement();
    	statement.executeQuery("select INV_CM_ID_SEQ.nextval MDID from dual");
    	ResultSet rs = statement.getResultSet();
    	while(rs.next()){
    		returnvalue = rs.getInt("MDID");	
    	}
    	System.out.println("Result Id:"+returnvalue);
    	rs.close();
    	statement.close();
    	conn.close();
    	getPool().releaseConnection(conn);

Finally figured out the issue for this Problem!!! :slight_smile:

Issue was with jdbc driver for Oracle 11g.

Previous used OJDBC Driver:
Jar File - ojdbc6.jar
Version - “11.1.0.7.0-Production”

Changed to this OJDBC Driver:
Jar File - ojdbc14.jar
Version - “10.2.0.4.0”

Please refer the discussion happened on this issue on Oracle Forum;

https://forums.oracle.com/forums/thread.jspa?messageID=4594768