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

Spring JIRA | Geoffrey De Smet | 1 decade ago
  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

    Spring data Solr: IllegalArgumentException - this argument is required

    Stack Overflow | 3 years ago | micha
    java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it must not be null

  1. batwalrus76 4 times, last 3 weeks ago
  2. serious2monkeys 1 times, last 3 weeks ago
  3. tvrmsmith 1 times, last 1 month ago
  4. fima 1 times, last 2 months ago
  5. dafman 2 times, last 2 months ago
8 more registered users
87 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