cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.IllegalArgumentException:Table must be given

Former Member
0 Kudos
114

Hi all

when i tried deploying my table application,following exception occured...

whats this??

java.lang.IllegalArgumentException: Table must be given

at com.sap.tc.webdynpro.tests.utils.TableSorter.<init>(TableSorter.java:105)

at com.sap.tut.wd.tutwd_table_init.tablecomp.TableCompBasketView.wdDoModifyView(TableCompBasketView.java:148)

at com.sap.tut.wd.tutwd_table_init.tablecomp.wdp.InternalTableCompBasketView.wdDoModifyView(InternalTableCompBasketView.java:435)

at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doModifyView(DelegatingView.java:78)

at com.sap.tc.webdynpro.progmodel.view.View.modifyView(View.java:191)

at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doModifyView(ClientComponent.java:398)

at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.modifyView(ClientApplication.java:692)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:382)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:659)

at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)

at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:251)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)

at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Have you done this in the <i>wdDoModifyView()</i> method?

if (firstTime) {
      IWDTable table = (IWDTable) view.getElement("<table ID>");
      wdContext.currentContextElement().setCustomerTableSorter(
        new TableSorter(table, wdThis.wdGetSortCustomersAction(), null, new String[] { "CustomerTable_Name" }));
}

Because the TableSorter class calls the <i>init</i> method from its constructor and here's a section of the code from that method:

private void init(IWDTable table, IWDAction sortAction, Map comparators, String[] sortableColumns){
this.table = table;
if(sortableColumns == null){
sortableCols = null;
}else{
sortableCols = new HashMap();
for (int i = 0; i < sortableColumns.length; i++) {
sortableCols.put(sortableColumns<i>, sortableColumns<i>);
}
}

// sanity checks
if (sortAction == null)
throw new IllegalArgumentException("Sort action must be given");
if (table == null)
throw new IllegalArgumentException("Table must be given");
if (table.bindingOfDataSource() == null)
throw new IllegalArgumentException(
"Data source of table with id '" + table.getId() + "' must be bound");
//...

So in your case the table being passed is <i>null</i>. Also go through <a href="/people/bertram.ganz/blog/2006/03/07/enhanced-web-dynpro-java-tablesorter-for-sap-netweaver-04s blog.

Regards,

Satyajit.

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks