I added the factory class, and was still getting the same error message.

Then I used this call instead of the one that takes 1 argument.

addMessageOutput(RedisOutput.class, RedisOutput.Factory.class);


I don't get that error message when loading the plugin. However, I'm 
getting this exception when I go to the "Manage Outputs"


2015-04-21_15:42:47.29923 2015-04-21 11:42:47,298 ERROR: 
org.graylog2.shared.rest.exceptionmappers.AnyExceptionClassMapper - 
Unhandled exception in REST resource
2015-04-21_15:42:47.29929 java.lang.IllegalStateException: This class 
should not be instantiated directly, this is a bug.
2015-04-21_15:42:47.29930       at 
org.graylog2.plugin.AbstractDescriptor.<init>(AbstractDescriptor.java:35)
2015-04-21_15:42:47.29930       at 
org.graylog2.plugin.outputs.MessageOutput$Descriptor.<init>(MessageOutput.java:47)
2015-04-21_15:42:47.29931       at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
2015-04-21_15:42:47.29931       at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
2015-04-21_15:42:47.29932       at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
2015-04-21_15:42:47.29932       at 
java.lang.reflect.Constructor.newInstance(Constructor.java:422)
2015-04-21_15:42:47.29933       at 
com.google.inject.internal.DefaultConstructionProxyFactory$2.newInstance(DefaultConstructionProxyFactory.java:85)
2015-04-21_15:42:47.29933       at 
com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
2015-04-21_15:42:47.29934       at 
com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
2015-04-21_15:42:47.29936       at 
com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
2015-04-21_15:42:47.29936       at 
com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
2015-04-21_15:42:47.29937       at 
com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
2015-04-21_15:42:47.29937       at 
com.google.inject.assistedinject.FactoryProvider2.invoke(FactoryProvider2.java:632)
2015-04-21_15:42:47.29938       at 
com.sun.proxy.$Proxy74.getDescriptor(Unknown Source)
2015-04-21_15:42:47.29938       at 
org.graylog2.outputs.MessageOutputFactory.getAvailableOutputs(MessageOutputFactory.java:51)
2015-04-21_15:42:47.29939       at 
org.graylog2.rest.resources.system.outputs.OutputResource.available(OutputResource.java:179)
2015-04-21_15:42:47.29939       at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2015-04-21_15:42:47.29940       at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2015-04-21_15:42:47.29940       at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2015-04-21_15:42:47.29941       at 
java.lang.reflect.Method.invoke(Method.java:497)
2015-04-21_15:42:47.29941       at 
org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
2015-04-21_15:42:47.29942       at 
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151)
2015-04-21_15:42:47.29943       at 
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:172)
2015-04-21_15:42:47.29943       at 
org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:195)
2015-04-21_15:42:47.29946       at 
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)
2015-04-21_15:42:47.29947       at 
org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:384)
2015-04-21_15:42:47.29947       at 
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:342)
2015-04-21_15:42:47.29947       at 
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
2015-04-21_15:42:47.29948       at 
org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271)
2015-04-21_15:42:47.29948       at 
org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
2015-04-21_15:42:47.29949       at 
org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
2015-04-21_15:42:47.29950       at 
org.glassfish.jersey.internal.Errors.process(Errors.java:315)
2015-04-21_15:42:47.29950       at 
org.glassfish.jersey.internal.Errors.process(Errors.java:297)
2015-04-21_15:42:47.29951       at 
org.glassfish.jersey.internal.Errors.process(Errors.java:267)
2015-04-21_15:42:47.29951       at 
org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
2015-04-21_15:42:47.29952       at 
org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
2015-04-21_15:42:47.29952       at 
org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1030)
2015-04-21_15:42:47.29953       at 
org.graylog2.jersey.container.netty.NettyContainer.messageReceived(NettyContainer.java:356)
2015-04-21_15:42:47.29953       at 
org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
2015-04-21_15:42:47.29953       at 
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
2015-04-21_15:42:47.29954       at 
org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
2015-04-21_15:42:47.29954       at 
org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
2015-04-21_15:42:47.29956       at 
org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
2015-04-21_15:42:47.29957       at 
com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)
2015-04-21_15:42:47.29957       at 
org.jboss.netty.handler.execution.MemoryAwareThreadPoolExecutor$MemoryAwareRunnable.run(MemoryAwareThreadPoolExecutor.java:622)
2015-04-21_15:42:47.29957       at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2015-04-21_15:42:47.29958       at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2015-04-21_15:42:47.29958       at java.lang.Thread.run(Thread.java:745)





On Tuesday, April 21, 2015 at 11:03:01 AM UTC-4, Jochen Schalanda wrote:
>
> Hi Mustafa,
>
> the whole plugin system of Graylog is very badly documented. Sorry for 
> that!
>
> You'll have to add a factory interface for your Output (see 
> https://github.com/Graylog2/graylog2-plugin-output-riemann/blob/84f6569e55b8b3a2f039f017befd2cf76b8460b5/src/main/java/org/graylog2/outputs/riemann/RiemannOutput.java#L170-179
>  
> for an example) which returns the configuration and the descriptor for the 
> Output.
>
> In the end this is required for AssistedInject (
> https://github.com/google/guice/wiki/AssistedInject) to work.
>
>
> Cheers,
> Jochen
>
> On Tuesday, 21 April 2015 16:36:28 UTC+2, Mustafa Khafateh wrote:
>>
>>
>> I'm creating a MessageOutput plugin as described here 
>> http://docs.graylog.org/en/latest/pages/plugins.html.
>>
>> I created required methods as empty.
>>
>> When I put the plugin and restart graylog-server, I'm getting this error 
>> in /var/log/graylog/server/current:
>> ERROR: org.graylog2.plugin.inject.Graylog2Module - Unable to find an 
>> inner class annotated with @FactoryClass in output class 
>> com.riverbed.RedisOutput. This output will not be available!
>>
>> What does it mean?
>>
>> One thing I noticed is in RedisOutputModule.java:configure(), I have
>> addMessageOutput(RedisOutput.class);
>>
>> However, in other output plugins I saw, installOutput is used. Is this 
>> what I need to do?
>>
>> e.g.:
>>
>> https://github.com/Graylog2/graylog2-plugin-output-riemann/blob/master/src/main/java/org/graylog2/outputs/riemann/RiemannOutputModule.java
>>
>> I have graylog version 1.0.1-1 (output of "aptitude show graylog")
>>
>> Thanks,
>> Mustafa
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"graylog2" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to