Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialization error while applying content pack #1434

Closed
sivasamyk opened this issue Sep 20, 2015 · 3 comments
Closed

Serialization error while applying content pack #1434

sivasamyk opened this issue Sep 20, 2015 · 3 comments
Assignees
Labels
bug
Milestone

Comments

@sivasamyk
Copy link

@sivasamyk sivasamyk commented Sep 20, 2015

After importing and applying the content pack, getting following error: can't serialize class org.graylog2.plugin.streams.Stream$MatchingType

MatchingType enum in Stream class needs to implement Serializable interface.

@joschi
Copy link
Contributor

@joschi joschi commented Sep 20, 2015

Enums are serializable by default (see https://docs.oracle.com/javase/1.5.0/docs/guide/serialization/spec/serial-arch.html#enum) so this is probably caused by another problem.

@joschi joschi added this to the 1.2.1 milestone Sep 20, 2015
@joschi
Copy link
Contributor

@joschi joschi commented Sep 20, 2015

@sivasamyk Please post the complete, unabridged error message you see in your Graylog server logs.

@sivasamyk
Copy link
Author

@sivasamyk sivasamyk commented Sep 20, 2015

2015-09-20 19:51:19,617 ERROR: org.graylog2.bundles.BundleImporter - Error while creating dashboards. Starting rollback.
java.lang.IllegalArgumentException: can't serialize class org.graylog2.plugin.streams.Stream$MatchingType
    at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:299)
    at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:194)
    at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:136)
    at com.mongodb.DefaultDBEncoder.writeObject(DefaultDBEncoder.java:36)
    at com.mongodb.OutMessage.putObject(OutMessage.java:289)
    at com.mongodb.OutMessage.writeUpdate(OutMessage.java:180)
    at com.mongodb.OutMessage.update(OutMessage.java:60)
    at com.mongodb.DBCollectionImpl.update(DBCollectionImpl.java:277)
    at com.mongodb.DBCollection.update(DBCollection.java:214)
    at com.mongodb.DBCollection.update(DBCollection.java:247)
    at org.graylog2.database.PersistedServiceImpl.save(PersistedServiceImpl.java:199)
    at org.graylog2.bundles.BundleImporter.createStream(BundleImporter.java:461)
    at org.graylog2.bundles.BundleImporter.createStreams(BundleImporter.java:440)
    at org.graylog2.bundles.BundleImporter.runImport(BundleImporter.java:135)
    at org.graylog2.bundles.BundleService.applyConfigurationBundle(BundleService.java:112)
    at org.graylog2.bundles.BundleService.applyConfigurationBundle(BundleService.java:105)
    at org.graylog2.rest.resources.system.bundles.BundleResource.applyBundle(BundleResource.java:174)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
    at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$VoidOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:143)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
    at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:308)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:291)
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1140)
    at org.graylog2.jersey.container.netty.NettyContainer.messageReceived(NettyContainer.java:356)
    at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
    at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
    at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
    at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
    at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
    at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)
    at org.jboss.netty.handler.execution.MemoryAwareThreadPoolExecutor$MemoryAwareRunnable.run(MemoryAwareThreadPoolExecutor.java:606)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
2015-09-20 19:51:19,727 ERROR: org.graylog2.shared.rest.exceptionmappers.AnyExceptionClassMapper - Unhandled exception in REST resource
java.lang.IllegalArgumentException: can't serialize class org.graylog2.plugin.streams.Stream$MatchingType
    at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:299)
    at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:194)
    at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:136)
    at com.mongodb.DefaultDBEncoder.writeObject(DefaultDBEncoder.java:36)
    at com.mongodb.OutMessage.putObject(OutMessage.java:289)
    at com.mongodb.OutMessage.writeUpdate(OutMessage.java:180)
    at com.mongodb.OutMessage.update(OutMessage.java:60)
    at com.mongodb.DBCollectionImpl.update(DBCollectionImpl.java:277)
    at com.mongodb.DBCollection.update(DBCollection.java:214)
    at com.mongodb.DBCollection.update(DBCollection.java:247)
    at org.graylog2.database.PersistedServiceImpl.save(PersistedServiceImpl.java:199)
    at org.graylog2.bundles.BundleImporter.createStream(BundleImporter.java:461)
    at org.graylog2.bundles.BundleImporter.createStreams(BundleImporter.java:440)
    at org.graylog2.bundles.BundleImporter.runImport(BundleImporter.java:135)
    at org.graylog2.bundles.BundleService.applyConfigurationBundle(BundleService.java:112)
    at org.graylog2.bundles.BundleService.applyConfigurationBundle(BundleService.java:105)
    at org.graylog2.rest.resources.system.bundles.BundleResource.applyBundle(BundleResource.java:174)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
    at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$VoidOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:143)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
    at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:308)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:291)
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1140)
    at org.graylog2.jersey.container.netty.NettyContainer.messageReceived(NettyContainer.java:356)
    at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
    at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
    at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
    at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
    at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
    at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)
    at org.jboss.netty.handler.execution.MemoryAwareThreadPoolExecutor$MemoryAwareRunnable.run(MemoryAwareThreadPoolExecutor.java:606)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants