Skip to content

Exception with Multipart File Upload #240

Closed
@jyangtj

Description

@jyangtj

Try to upload multiple files using mutation by following https://github.com/jaydenseric/graphql-multipart-request-spec. It failed with the following exception. Single file upload works fine. Any suggestions?

No serializer found for class java.io.ByteArrayInputStream and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: java.util.ArrayList[0]->org.eclipse.jetty.util.MultiPartInputStreamParser$MultiPart["inputStream"])
java.lang.IllegalArgumentException: No serializer found for class java.io.ByteArrayInputStream and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: java.util.ArrayList[0]->org.eclipse.jetty.util.MultiPartInputStreamParser$MultiPart["inputStream"])
at com.fasterxml.jackson.databind.ObjectMapper._convert(ObjectMapper.java:3750)
at com.fasterxml.jackson.databind.ObjectMapper.convertValue(ObjectMapper.java:3678)
at com.coxautodev.graphql.tools.MethodFieldResolver$createDataFetcher$$inlined$forEachIndexed$lambda$1.invoke(MethodFieldResolver.kt:83)
at com.coxautodev.graphql.tools.MethodFieldResolver$createDataFetcher$$inlined$forEachIndexed$lambda$1.invoke(MethodFieldResolver.kt:23)
at com.coxautodev.graphql.tools.MethodFieldResolverDataFetcher.get(MethodFieldResolver.kt:156)
at graphql.execution.instrumentation.dataloader.DataLoaderDispatcherInstrumentation.lambda$instrumentDataFetcher$0(DataLoaderDispatcherInstrumentation.java:86)
at graphql.execution.ExecutionStrategy.fetchField(ExecutionStrategy.java:261)
at graphql.execution.ExecutionStrategy.resolveFieldWithInfo(ExecutionStrategy.java:202)
at graphql.execution.AsyncExecutionStrategy.execute(AsyncExecutionStrategy.java:70)
at graphql.execution.Execution.executeOperation(Execution.java:159)
at graphql.execution.Execution.execute(Execution.java:101)
at graphql.GraphQL.execute(GraphQL.java:573)
at graphql.GraphQL.parseValidateAndExecute(GraphQL.java:515)
at graphql.GraphQL.executeAsync(GraphQL.java:489)
at graphql.GraphQL.execute(GraphQL.java:420)
at graphql.servlet.GraphQLQueryInvoker.query(GraphQLQueryInvoker.java:95)
at graphql.servlet.GraphQLQueryInvoker.query(GraphQLQueryInvoker.java:91)
at graphql.servlet.GraphQLQueryInvoker.query(GraphQLQueryInvoker.java:42)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions