The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

NullPointerException caused by null fields

jeanlucjeanluc Member Posts: 18 Contributor II
edited November 2018 in Help
I'm trying to process a CSV file which has several columns with timestamps (date+time). Some of the rows have nulls for those, fields, unfortunately.

This causes an NPE as seen below.
Exception: java.lang.NullPointerException
Message: null
Stack trace:

  com.rapidminer.operator.io.AbstractDataReader.generateDataRow(AbstractDataReader.java:481)
  com.rapidminer.operator.io.AbstractDataReader.createExampleSet(AbstractDataReader.java:513)
  com.rapidminer.operator.io.AbstractDataReader.createExampleSet(AbstractDataReader.java:495)
  com.rapidminer.operator.io.AbstractExampleSource.read(AbstractExampleSource.java:52)
  com.rapidminer.operator.io.AbstractExampleSource.read(AbstractExampleSource.java:36)
  com.rapidminer.operator.io.AbstractReader.doWork(AbstractReader.java:121)
  com.rapidminer.operator.Operator.execute(Operator.java:767)
  com.rapidminer.operator.execution.SimpleUnitExecutor.execute(SimpleUnitExecutor.java:51)
  com.rapidminer.operator.ExecutionUnit.execute(ExecutionUnit.java:709)
  com.rapidminer.operator.OperatorChain.doWork(OperatorChain.java:363)
  com.rapidminer.operator.ProcessRootOperator.doWork(ProcessRootOperator.java:345)
  com.rapidminer.operator.Operator.execute(Operator.java:767)
  com.rapidminer.Process.run(Process.java:745)
  com.rapidminer.Process.run(Process.java:689)
  com.rapidminer.Process.run(Process.java:665)
  com.rapidminer.Process.run(Process.java:655)
  com.rapidminer.gui.ProcessThread.run(ProcessThread.java:65)

Line 481 is
values = set.getDate(i).getTime();
Build is 5.0.001

Answers

  • jeanlucjeanluc Member Posts: 18 Contributor II
    A correction: I  found that the error was caused not by a null field (there was none in the particular field that I processed), but by an incorrect date format. Once I changed to match the file the processing went pass this stage. I'm still looking why it failed later with a different error, but that can be because I'm new to the tool.
  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    thanks for the hint. This exception should not occur in any case, even if you enter a wrong description. We have currently release a new version, you might download this. If this error still occurs, I would be very glad, if you could make an detailed entry in our bug tracker at bugs.rapid-i.com. This way, the programmer in charge of the import classes will get to know this.

    And don't hesitate to ask if you have another problem with RapidMiner. That's the forum for :)

    Greetings,
      Sebastian Land
Sign In or Register to comment.