Skip to content

Legacy extension functions/controls causes AbstractMethodError #7488

@tfmorris

Description

@tfmorris

If you load a pre-2018 extension, such as the georefine extension, you will get an empty Help tab in the Expression Preview window caused by an AbstractMethodError for the new methods which were added to the Function interface during the conversion from org.json to Jackson for JSON serialization.

To Reproduce

Steps to reproduce the behavior:

  1. Install the georefine extension
  2. Open a project and use Transform... to load the GREL expression editor
  3. Click the Help tab.

Current Results

Help tab is disabled with no hint as to why.

Expected Behavior

At a minimum, the user should be informed what happened and what the offending Function/Control is. Ideally, the legacy JSON write method would be invoked to fetch the JSON to be inserted into the Jackson output.

Versions

  • OpenRefine: 3.0 or later
  • extension(s): pre-3.0

Additional context

Normally these extensions don't even load, but the author of this one released a new version that bundles the org.json JAR when OpenRefine removed it from the build.

Stack trace:

java.lang.AbstractMethodError
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:688)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:760)
	at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:183)
	at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeFields(MapSerializer.java:807)
	at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithoutTypeInfo(MapSerializer.java:763)
	at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:719)
	at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:34)
	at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:732)
	at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:760)
	at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:183)
	at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider._serialize(DefaultSerializerProvider.java:503)
	at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:342)
	at com.fasterxml.jackson.databind.ObjectWriter$Prefetch.serialize(ObjectWriter.java:1587)
	at com.fasterxml.jackson.databind.ObjectWriter._writeValueAndClose(ObjectWriter.java:1289)
	at com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter.java:1114)
	at com.google.refine.commands.HttpUtilities.respondJsonInternal(HttpUtilities.java:119)
	at com.google.refine.commands.HttpUtilities.respondJSON(HttpUtilities.java:107)
	at com.google.refine.commands.Command.respondJSON(Command.java:385)
	at com.google.refine.commands.Command.respondJSON(Command.java:375)
	at com.google.refine.commands.expr.GetExpressionLanguageInfoCommand.doGet(GetExpressionLanguageInfoCommand.java:70)

Metadata

Metadata

Assignees

Labels

Type: BugIssues related to software defects or unexpected behavior, which require resolution.extensionMaking it easier to extend OpenRefine's UI and backendgrelThe default expression language, GREL, could be improved in many ways!

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions