java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it cannot be null

Spring JIRA | Geoffrey De Smet | 1 decade ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    The constructor: public BaseTableModel(List rows) { setRows(rows); createColumnInfo(); } is creating the ColumnsInfo before BeanTableModel to set its message attribute, so BeanTableModel.createColumnNames() is thrown java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it cannot be null at org.springframework.util.Assert.notNull(Assert.java:90) at org.springframework.util.Assert.notNull(Assert.java:102) at org.springframework.richclient.table.BeanTableModel.createColumnNames(BeanTableModel.java:85) at org.springframework.richclient.table.BaseTableModel.createColumnInfo(BaseTableModel.java:72) at org.springframework.richclient.table.BeanTableModel.createColumnInfo(BeanTableModel.java:77) at org.springframework.richclient.table.BaseTableModel.<init>(BaseTableModel.java:44) at org.springframework.richclient.table.BaseTableModel.<init>(BaseTableModel.java:39) at org.springframework.richclient.table.BeanTableModel.<init>(BeanTableModel.java:49) at com.wplex.common.client.ui.BaseTableModel.<init>(BaseTableModel.java:30) Some code: public abstract class BaseTableModel extends BeanTableModel { public BaseTableModel(ValueObject vo, MessageSource messageSource) { super(vo.getClass(), messageSource); } } public class CompanyTableModel extends BaseTableModel { /** * @param messageSource */ public CompanyTableModel(MessageSource messageSource) { super(new CompanyVO(), messageSource); } } Startup: new CompanyTableModel((MessageSource) setApplicationContext().getBean("messageSource"))); //$NON-NLS-1$ Where MessageSource is not null! The createColumnInfo() invocation should be removed from BaseTableModel(List rows) constructor and callers of this constructor should be reviewed to avoid possible bugs. Thanks, Mauro.

    Spring JIRA | 1 decade ago | Mauro Ransolin
    java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it cannot be null
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    The constructor: public BaseTableModel(List rows) { setRows(rows); createColumnInfo(); } is creating the ColumnsInfo before BeanTableModel to set its message attribute, so BeanTableModel.createColumnNames() is thrown java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it cannot be null at org.springframework.util.Assert.notNull(Assert.java:90) at org.springframework.util.Assert.notNull(Assert.java:102) at org.springframework.richclient.table.BeanTableModel.createColumnNames(BeanTableModel.java:85) at org.springframework.richclient.table.BaseTableModel.createColumnInfo(BaseTableModel.java:72) at org.springframework.richclient.table.BeanTableModel.createColumnInfo(BeanTableModel.java:77) at org.springframework.richclient.table.BaseTableModel.<init>(BaseTableModel.java:44) at org.springframework.richclient.table.BaseTableModel.<init>(BaseTableModel.java:39) at org.springframework.richclient.table.BeanTableModel.<init>(BeanTableModel.java:49) at com.wplex.common.client.ui.BaseTableModel.<init>(BaseTableModel.java:30) Some code: public abstract class BaseTableModel extends BeanTableModel { public BaseTableModel(ValueObject vo, MessageSource messageSource) { super(vo.getClass(), messageSource); } } public class CompanyTableModel extends BaseTableModel { /** * @param messageSource */ public CompanyTableModel(MessageSource messageSource) { super(new CompanyVO(), messageSource); } } Startup: new CompanyTableModel((MessageSource) setApplicationContext().getBean("messageSource"))); //$NON-NLS-1$ Where MessageSource is not null! The createColumnInfo() invocation should be removed from BaseTableModel(List rows) constructor and callers of this constructor should be reviewed to avoid possible bugs. Thanks, Mauro.

    Spring JIRA | 1 decade ago | Mauro Ransolin
    java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it cannot be null
  4. 0

    Bean object must not be null in Spring MVC

    Stack Overflow | 3 years ago | Sivanagaiah
    java.lang.IllegalArgumentException: Bean object must not be null

  1. tvrmsmith 1 times, last 3 weeks ago
  2. tomthomas 2 times, last 2 months ago
  3. treefolk 2 times, last 2 months ago
  4. mauritius 1 times, last 2 months ago
  5. SteVio1989 1 times, last 2 months ago
12 more registered users
83 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    [Assertion failed] - this argument is required; it cannot be null

    at org.springframework.util.Assert.notNull()
  2. Spring Core
    Assert.notNull
    1. org.springframework.util.Assert.notNull(Assert.java:90)
    2. org.springframework.util.Assert.notNull(Assert.java:102)
    2 frames
  3. org.springframework.richclient
    GlazedTableModel.<init>
    1. org.springframework.richclient.table.support.GlazedTableModel.createColumnNames(GlazedTableModel.java:107)
    2. org.springframework.richclient.table.support.GlazedTableModel.createTableFormat(GlazedTableModel.java:133)
    3. org.springframework.richclient.table.support.GlazedTableModel.<init>(GlazedTableModel.java:62)
    4. org.springframework.richclient.table.support.GlazedTableModel.<init>(GlazedTableModel.java:54)
    4 frames