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

Spring JIRA | Geoffrey De Smet | 1 decade ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  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

    @Autowired in @Before of spring-test is null

    Stack Overflow | 2 years ago | carcaret
    java.lang.IllegalArgumentException: Target object must not be null

  1. SteVio1989 3 times, last 1 week ago
  2. tvrmsmith 2 times, last 2 weeks ago
  3. johnxfly 1 times, last 1 month ago
  4. tomthomas 2 times, last 3 months ago
  5. treefolk 2 times, last 3 months ago
13 more registered users
82 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