Opened 2 years ago

Closed 2 years ago

#1048 closed defect (fixed)

Release importer fails if the export contain integer enumerated annotation types

Reported by: Nicklas Nordborg Owned by:
Priority: critical Milestone: Relax v1.3
Component: net.sf.basedb.relax Keywords:
Cc:

Description (last modified by Nicklas Nordborg)

For example:

Error: Import of '/typedefs.json' failed: 
Value '98' is a 'class java.lang.Long' not a 'Integer'

Stack trace:

java.lang.RuntimeException: Import of '/typedefs.json' failed: Value '98' is a 'class java.lang.Long', not a 'Integer'
 at net.sf.basedb.relax.plugins.ReleaseImporterPlugin.doImport(ReleaseImporterPlugin.java:660)
 at net.sf.basedb.relax.plugins.ReleaseImporterPlugin.run(ReleaseImporterPlugin.java:323)
 at net.sf.basedb.core.PluginExecutionRequest.invoke(PluginExecutionRequest.java:117)
 at net.sf.basedb.core.InternalJobQueue$JobRunner.run(InternalJobQueue.java:573)
 at java.lang.Thread.run(Unknown Source) 
Caused by: net.sf.basedb.core.InvalidDataException: Value '98' is a 'class java.lang.Long', not a 'Integer'
 at net.sf.basedb.core.Type.validate(Type.java:595)
 at net.sf.basedb.core.AnnotationType.setValues(AnnotationType.java:1230)
 at net.sf.basedb.relax.plugins.ReleaseImporterPlugin$AnnotationTypeImporter.update(ReleaseImporterPlugin.java:1402) 
 at net.sf.basedb.relax.plugins.ReleaseImporterPlugin$AnnotationTypeImporter.update(ReleaseImporterPlugin.java:1357)
 at net.sf.basedb.relax.plugins.ReleaseImporterPlugin$ItemImporter.findOrCreateItem(ReleaseImporterPlugin.java:1085)
 at net.sf.basedb.relax.plugins.ReleaseImporterPlugin.importTypeDefs(ReleaseImporterPlugin.java:690)
 at net.sf.basedb.relax.plugins.ReleaseImporterPlugin.doImport(ReleaseImporterPlugin.java:599)
... 4 more

Change History (3)

comment:1 Changed 2 years ago by Nicklas Nordborg

Description: modified (diff)

comment:2 Changed 2 years ago by Nicklas Nordborg

(In [4782]) References #1048: Release importer fails if the export contain integer enumerated annotation types

Numerical enumerations are now passed through a conversion step which converts the number to the correct type/class.

comment:3 Changed 2 years ago by Nicklas Nordborg

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.