Opened 4 years ago

Closed 4 years ago

#2221 closed defect (fixed)

ClassCastException in item overview

Reported by: Nicklas Nordborg Owned by: everyone
Priority: minor Milestone: BASE 3.17
Component: core Version:
Keywords: Cc:

Description

Got this error when clicking on "Validate" in item overview for a sample.

class net.sf.basedb.core.RawBioAssay cannot be cast to 
  class net.sf.basedb.core.Subtypable (net.sf.basedb.core.RawBioAssay 
  and net.sf.basedb.core.Subtypable are in unnamed module of loader 
  org.apache.catalina.loader.ParallelWebappClassLoader @4fe9f4ca)

java.lang.ClassCastException
...at net.sf.basedb.util.overview.validator.SoftwareValidator.postValidate(SoftwareValidator.java:105)
...at net.sf.basedb.util.overview.validator.ExtensionNodeValidator.postValidate(ExtensionNodeValidator.java:153)
...at net.sf.basedb.util.overview.node.NodeFactory.createNode(NodeFactory.java:155)
...at net.sf.basedb.util.overview.loader.BasicItemNodeLoader.createItemNode(BasicItemNodeLoader.java:123)
...at net.sf.basedb.util.overview.loader.SoftwareLoader.createPropertyNode(SoftwareLoader.java:92)
...at net.sf.basedb.util.overview.loader.ExtensionChildNodeLoader.createPropertyNode(ExtensionChildNodeLoader.java:80)
...at net.sf.basedb.util.overview.loader.AutoChildNodeLoader.createPropertyNode(AutoChildNodeLoader.java:97)
...at net.sf.basedb.util.overview.loader.RawBioAssayLoader.loadPropertyChildNodes(RawBioAssayLoader.java:183)

...at net.sf.basedb.util.overview.loader.AbstractNodeLoader.loadChildNodesOfItemNode(AbstractNodeLoader.java:127)
...at net.sf.basedb.util.overview.loader.AbstractNodeLoader.loadChildNodes(AbstractNodeLoader.java:112)
...at net.sf.basedb.util.overview.loader.ExtensionChildNodeLoader.loadChildNodes(ExtensionChildNodeLoader.java:119)
...at net.sf.basedb.util.overview.loader.AutoChildNodeLoader.loadChildNodes(AutoChildNodeLoader.java:162)
...

Change History (1)

comment:1 by Nicklas Nordborg, 4 years ago

Resolution: fixed
Status: newclosed

In 7848:

Fixes #2221: ClassCastException in item overview

There was a bug that didn't check if an item (such as RawBioAssay) could be cast to a Subtypable item. The same bug was present also in the protocol and hardware validators and has been fixed there as well.

Note: See TracTickets for help on using tickets.